lanux128

SC_Toggle

Apr 10th, 2015
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;ahk_class TMainForm
  2. ;ahk_exe ScreenshotCaptor.exe
  3. SC = %PROGRAMS%\DonationCoder\SC\ScreenshotCaptor.exe
  4. SplitPath, SC, SC_Exe, SC_Dir
  5.  
  6. IfWinActive, % "ahk_exe" . SC_Exe
  7. {
  8.     ;WinMinimize, % "ahk_exe" . SC_Exe
  9.   Run, %SC% -minimize, %SC_Dir%, UseErrorLevel
  10. }
  11. Else
  12. {
  13.   IfWinExist, % "ahk_exe" . SC_Exe
  14.   {
  15.   WinGet, winid, ID, % "ahk_exe" . SC_Exe
  16.   DllCall(“SwitchToThisWindow”, “UInt”, winid, “UInt”, 1)
  17.   }
  18.   Else
  19.   {
  20.   Run, %SC% -show, %SC_Dir%, UseErrorLevel
  21.   }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment