naru Posted August 17, 2017 Share Posted August 17, 2017 ;winactivate ("") Local $sData = ClipGet() if stringlen($sData) = 12 I tried Local $sData = ClipGet() if stringlen($sData) = 12 then winactivate ("myappname") But not working properly I want to automatically focus on windows when i copy 12 digits number to my clipboard Link to comment Share on other sites More sharing options...
genius257 Posted August 17, 2017 Share Posted August 17, 2017 Hi @Nareshm Use GUIRegisterMsg with WM_DRAWCLIPBOARD to know when clipboard changes or look into Clipboard UDF. Then get clipboard contents and compare length/content with your desired rules. I suggest using regular expression like "^\d{12}$" My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now