Created
April 30, 2016 15:32
-
-
Save jploudre/e0eeba10f0a93a2962776b7b0a9ff5af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Key Parts of Ghoster Script | |
| #SingleInstance,Force | |
| SetBatchLines,-1 | |
| SetWindelay,0 | |
| OnExit,QUIT | |
| START: | |
| Gosub,READINI | |
| Gosub,TRAYMENU | |
| CoordMode,Mouse,Screen | |
| WinGet,oldid,ID,A | |
| WinGet,oldtop,ExStyle,ahk_id %oldid% | |
| oldtop:=oldtop & 0x8 | |
| Gui,+ToolWindow +AlwaysOnTop -Disabled -SysMenu -Caption | |
| Gui,Margin,0,0 | |
| If backcolor<> | |
| Gui,Color,%backcolor% | |
| Gui,Show,X0 Y0 W%A_ScreenWidth% H%A_ScreenHeight%,GhosterWindow | |
| WinSet,Transparent,%transparency%,GhosterWindow | |
| LOOP: | |
| Sleep,50 | |
| WinGet,winid,ID,A | |
| If winid<>%oldid% | |
| { | |
| WinGet,wintop,ExStyle,ahk_id %winid% | |
| wintop:=wintop & 0x8 | |
| If oldtop | |
| WinSet,AlwaysOnTop,On,ahk_id %oldid% | |
| Else | |
| WinSet,AlwaysOnTop,Off,ahk_id %oldid% | |
| If !showontop | |
| WinSet,Top,,GhosterWindow | |
| WinGetClass,winclass,ahk_id %winid% | |
| If showdesktop | |
| If winclass=Progman | |
| WinHide,GhosterWindow | |
| Else | |
| WinShow,GhosterWindow | |
| WinSet,Top,,ahk_id %winid% | |
| If jump | |
| WinSet,AlwaysOnTop,On,ahk_id %winid% | |
| oldid=%winid% | |
| oldtop=%wintop% | |
| } | |
| MouseGetPos,x,y | |
| SetEnv,x1,%x% | |
| SetEnv,y1,%y% | |
| EnvAdd,x1,1 | |
| EnvAdd,y1,1 | |
| EnvSub,x,1 | |
| EnvSub,y,1 | |
| WinSet,Region,0-0 %A_ScreenWidth%-0 %A_ScreenWidth%-%A_ScreenHeight% 0-%A_ScreenHeight% 0-0 %x%-%y% %x1%-%y% %x1%-%y1% %x%-%y1% %x%-%y%,GhosterWindow | |
| Goto,LOOP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment