fisofo Posted November 10, 2006 Posted November 10, 2006 Here's the code:For $x = 0 to 9 HotKeySet("#{NUMPAD" & $x & "}", "SplitViewMon") Next Func SplitViewMon() $i += 1 Do $g=$i Sleep(200) Until $g==$i Switch $i Case 1 Send("!{NUMPAD" & Number(StringMid(@HotKeyPressed, 9, 1)) & "}") Case Else Send("^`") EndSwitch $i = 0 EndFuncIn case anyone is wondering, i'm using this software in conjunction with Splitview and Ultramon. When a key is pressed once, it sends a hotkey that splitview picks up and moves a window to a side of the screen. When a key is pressed twice, it sends a hotkey that ultramon picks up and it whips the window to the next monitor.Anyway, It works just fine if I press the windows key and hit a numpad number... but i was hoping it would detect a key pressed again while still holding the windows key. For example:-I press #, -then I press and release {NUMPAD5}-The script runs-While still holding #, I press {NUMPAD7}-script doesn't run, it sends a 7 to the active window. Can I get this to run the script again?Thanks!
Cue Posted November 11, 2006 Posted November 11, 2006 (edited) Do $g=$i Sleep(200) Until $g==$i that looks familiar try Disabling hotkeys just before the switch and reset after. also "case else" does Send("^`") depending on how many times you pressed it, is that what you want to happen edit: gave wrong info Edited November 11, 2006 by Cue
Cue Posted November 11, 2006 Posted November 11, 2006 one more thing instead of Send("!{NUMPAD" & Number(StringMid(@HotKeyPressed, 9, 1)) & "}") u can use Send("!"&StringTrimLeft ( @HotKeyPressed, 1))
fisofo Posted November 11, 2006 Author Posted November 11, 2006 (edited) Do $g=$i Sleep(200) Until $g==$ithat looks familiar try Disabling hotkeys just before the switch and reset after. also "case else" does Send("^`") depending on how many times you pressed it, is that what you want to happenedit: gave wrong infoYes, thank you Cue shoot... just realized my selection of keys conflicts with something else... but thanks for the suggestions, i'll try it out. Oh, and yes, the case else is functioning how i want it to... thanks for the help! Edited November 11, 2006 by fisofo
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