Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;1. toggle on with f11
- ;2. capture window with f12
- ;3. toggle off with f11
- ;redo from 1 if you want to start again
- #NoEnv
- #Persistent,On
- #SingleInstance,Force
- SetWinDelay,0
- SetControlDelay,0
- SetBatchLines,-1
- SendMode,Input
- ;SetKeyDelay,0
- hotkeys=z
- toggle=1
- DOLOOP:
- If(toggle = 1)
- {
- Loop
- {
- if(toggle=0)
- break
- ControlSend,%ctrl%,{z},ahk_id %win%
- ControlSend,%ctrl%,{z DOWN},ahk_id %win%
- sleep,1
- }
- }
- Return
- F11::
- toggle := !toggle
- TrayTip,%toggle%,-,2
- Return
- F12::
- win:=WinExist("A")
- Loop
- {
- parent:=DllCall("GetParent",UInt,win)
- If parent=0
- Break
- win:=parent
- }
- ControlGetFocus,ctrl,ahk_id %win%
- winGetClass,class,ahk_id %win%
- TrayTip,%class% %ctrl% %win%,3,3
- GoSub,DOLOOP
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement