Jump to content

Recommended Posts

Posted

Is it possible to change the global hotkeys depending on which application window is focused?

Like if I open a new notepad window, ^T would type in the current time for me

then if I open a new word doc, the same ^T would type in my signature whenever I end a letter.

Posted

I have a couple of scripts that do this.

Have your hotkey call a case statement.

Then call different functions from the case statment depending on what window is active.

Posted (edited)

Do I put the If...Then statement in the main body of the program?

While 1
    Sleep(1000)
WEnd

or outside of it?

I tried using If WinActive but that resulted in an error in the main body. Isn't WinActive more appropriate for this since it checks if the app is frontmost rather than just exisiting amongst all the other windows?

Another thing is that if I set a hotkey to catch +a and want to fireoff sendkey("{UP}") I have to do SHIFT-DOWN-A, SHIFT-DOWN-A, SHIFT-DOWN-A to send 3 {UP} instead of SHIFT-DOWN-AAA

Kind of annoying, is there a workaround?

Edited by confucion

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
  • Recently Browsing   0 members

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