Jump to content
Nareshm

Automatic Activate Windows when i Copy some text

Recommended Posts

Nareshm

;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

Share this post


Link to post
Share on other sites
genius257

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}$"

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.