confucion Posted February 11, 2006 Posted February 11, 2006 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.
D4rk^S0ul Posted February 11, 2006 Posted February 11, 2006 Just use winexists, if's to see if a window is open and if it is hotkey the things u need else it doesnt hotkey it
Valuater Posted February 11, 2006 Posted February 11, 2006 yes... if winRxits("untitled -") then hotKeySet() endif if winRxits("word document???") then hotKeySet() endif 8)
cal Posted February 11, 2006 Posted February 11, 2006 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.
confucion Posted February 11, 2006 Author Posted February 11, 2006 (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 February 11, 2006 by confucion
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