Jump to content
Sign in to follow this  
srikanthsurabhi

HotKeySet

Recommended Posts

srikanthsurabhi

Hi All,

I am looking for a script that helps me send strings to an application say PuTTY when I hit Keys like F1,F2 etc

Opt("WinTitleMatchMode",2)

Opt("MustDeclareVars", 1)

WinWaitActive("PuTTY")

HotKeySet("{F1}","alreadyprocessed")

Func alreadyprocessed()

Send("Already Processed")

EndFunc

I tried using above script. It is not working. Please help me.

P.S. I am a newbie to AutoIT.

Thank you,

Srikanth

Share this post


Link to post
Share on other sites
srikanthsurabhi

Thank you it worked ;)

Opt("WinTitleMatchMode",2)

Opt("MustDeclareVars", 1)

WinWaitActive("PuTTY")

HotKeySet("{F1}","alreadyprocessed")

While 1

Sleep(10)

WEnd

Func alreadyprocessed()

; Unset the HotKey

HotKeySet("{F1}")

Sleep(30)

Send("Already Processed")

Sleep(800)

; Reset the HotKey

HotKeySet("{F1}", "alreadyprocessed")

EndFunc

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
Sign in to follow this  

×

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.