so i figured out a way to save and set a variable on a single line so it ends up doing the same thing just without having any dependencies
Code: Select all
autoTrim, % ("off"), restore_at := a_autoTrim
autoTrim, % restore_at
setBatchLines, % (-1), restore_bl := a_batchLines
setBatchLines, % restore_bl
setControlDelay, % (-1), restore_cd := a_controlDelay
setControlDelay, % restore_cd
coordMode, caret, % ("client"), restore_cmc := a_coordModeCaret
coordMode, caret, % restore_cmc
coordMode, mouse, % ("client"), restore_cmme := a_coordModeMenu
coordMode, mouse, % restore_cmme
coordMode, mouse, % ("client"), restore_cmm := a_coordModeMouse
coordMode, mouse, % restore_cmm
coordMode, pixel, % ("client"), restore_cmp := a_coordModePixel
coordMode, pixel, % restore_cmp
coordMode, toolTip, % ("client"), restore_cmtt := a_coordModeToolTip
coordMode, toolTip, % restore_cmtt
setDefaultMouseSpeed, % (0), restore_dms := a_defaultMouseSpeed
setDefaultMouseSpeed, % restore_dms
detectHiddenText, % ("on"), restore_dht := a_detectHiddenText
detectHiddenText, % restore_dht
detectHiddenWindows, % ("on"), restore_dhw := a_detectHiddenWindows
detectHiddenWindows, % restore_dhw
isCritical, % ("off"), restore_ic := a_isCritical
isCritical, % restore_ic
sendMode, % ("input"), restore_sm := a_sendMode
sendMode, % restore_sm
stringCaseSense, % ("on"), restore_scs := a_stringCaseSense
stringCaseSense, % restore_scs
setTitleMatchMode, % (2), restore_tmm := a_titleMatchMode
setTitleMatchMode, % restore_tmm
setTitleMatchMode, % ("slow"), restore_tmms := a_titleMatchModeSpeed
setTitleMatchMode, % restore_tmms
setWinDelay, % (-1), restore_wde := a_winDelay
setWinDelay, % restore_wde
setWorkingDir, % (a_scriptDir), restore_wd := a_workingDir
setWorkingDir, % restore_wd
Code: Select all
detectHiddenWindows, % ("on"), restore_dhw := a_detectHiddenWindows
winGet, running, list, ahk_class AutoHotkey
loop % running
{
winGetTitle, title, % "ahk_id " running%a_index%
script_path := regExReplace(title, "\s-\sAutoHotkey\s.*")
path_list .= (path_list = "" ? "":"`n") . script_path
}
detectHiddenWindows, % restore_dhw
msgBox, % path_list
and heres a small script i made so they can be quickly added whenever you need them.
ctrl+alt + b to show the menu. the first line is pasted and the second is added to the clipboard so you can paste it further down yourself