Advertisement
sdini

script.

Jan 4th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; the '*' is Wildcard: Fire the hotkey even if extra modifiers are being held down.
  2. *F10:: ; Hotkey will toggle status, F-11 key
  3. Confine := !Confine
  4.  
  5. ClipCursor( Confine, 13, 13, A_screenwidth-12, A_screenheight-12)
  6. Return
  7.  
  8.  
  9. ClipCursor( Confine=True, x1=0 , y1=0, x2=1, y2=1 ) {
  10.  VarSetCapacity(R,16,0),  NumPut(x1,&R+0),NumPut(y1,&R+4),NumPut(x2,&R+8),NumPut(y2,&R+12)
  11. Return Confine ? DllCall( "ClipCursor", UInt,&R ) : DllCall( "ClipCursor" )
  12. }
  13.  
  14. ;This function turns the special key cluster above the arrows into a 10key.
  15. ;This will be toggled with the option key to help migrate over from a full size key board.
  16. waffles:=0
  17.  
  18. ; waffles:=!waffles .... This assigns waffles to the value of NOT waffles. so lets say waffles starts out TRUE (1).
  19. ;you then turn waffles to NOT TRUE. which is FALSE (0). so now waffles is set to FALSE. and then lets say you toggle it again.
  20. ;you set waffles to NOT FALSE, which is TRUE. waffles is now set to TRUE. .... 1 is true, 0 is false. ! is NOT.
  21. AppsKey::
  22.     waffles:=1
  23.      SetScrollLockState, AlwaysOn ; Scrlock is turned on when the script is first run
  24. return
  25.  
  26. ; If you stack hotkeys like this, they all trigger the same code underneath
  27. ~F12::
  28.     waffles := 0
  29.      SetScrollLockState, off ; Scrlock is turned off showing that it is off.
  30. return
  31.  
  32. #if (waffles=1)
  33.     PrintScreen::7
  34.     ScrollLock::8
  35.     Pause:: 9
  36.     Ins::4
  37.     Home::5
  38.     PgUp::6
  39.     Del::1
  40.     End::2
  41.     PgDn::3
  42.     SC11D::0 ; this is RCtrl but for my keyboard it registers as unknown. if yours registers a RCtrl use that instead.
  43. #if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement