Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Waiting for Ctrl+Up
#1
I wrote a little program to swap a window between monitors. It was handy enough to convert to an .exe to send to a friend. Because .exe don't support triggers I built in a wait for key event. My hot key is Ctrl-Up, but it catches the Ctrl alone. How can I wait for CU. Here's the code:
Code:
Copy      Help
int hand
int x y cx cy

mes "Running"

rep
,wait 0 KF CU ;; wait for Ctrl+Up
,
,hand=win
,GetWinXY hand x y cx cy ;;get window location
,,;Deb
,,if x > ScreenWidth-5 ;; if on primary monitor, send to secondary
,,,res hand
,,,mov 0 0 hand
,,,0.1
,,,max hand
,,else                ;; if on secondary monitor, send to primary
,,,res hand
,,,mov ScreenWidth 0 hand
,,,0.1
,,,max hand    
,,,
,,act hand


Thanks,
Matt B
Matt B


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)