Jump to content

HotKeySet


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...