Only shortcut is Alt + Ctrl + P.
If calculator Speedcrunch.exe is not open, this shortcut will open it.
Afterward, this shortcut is toggle for hide/show Speedcrunch.exe window. Even taskbar button will be hidden.
If program is minimized, this shortcut will restore window and will place it on the top.
If calculator window is behind some other program, this shortcut will bring Speedcrunch.exe window on top.
When calculator window is hidden, focus will go back to last active window. Last active window will be remembered in C:\SpeedCrunchONOFF.txt INI file.
For this reason you have to make one "C:\SpeedCrunchONOFF.txt" INI file, and you have to place this text inside of it.
Code: Select all
[Etc]
LastActiveWindow=
This is text of a script.
Code: Select all
#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Window
SendMode Input
#SingleInstance Force
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1
^!p::
SpeedCrunchONOFF:
SetTitleMatchMode, 3
ErrorLevel = % ProcessExist( "speedcrunch.exe" )
ProcessExist(Name){
Process,Exist,%Name%
return Errorlevel
}
If ErrorLevel = 0
{
Run C:\Program Files (x86)\SpeedCrunch\speedcrunch.exe
Return
}
IfWinActive, SpeedCrunch
{
WinHide, SpeedCrunch
IniRead, returnActiveWindowTitle, C:\SpeedCrunchONOFF.txt, Etc, LastActiveWindow
WinActivate, % returnActiveWindowTitle
Return
}
Else
{
WinGetActiveTitle, goActiveWindowTitle
IniWrite, % goActiveWindowTitle, C:\SpeedCrunchONOFF.txt, Etc, LastActiveWindow
WinRestore, SpeedCrunch
WinShow, SpeedCrunch
WinActivate, SpeedCrunch
Return
}
Return