1 (изменено: X_vorost, 2020-02-28 08:45:27)

Тема: AHK: Открытие и закрытие скриптов с помощью кнопок в менюшке

Скрипт открывает другой скрипт (готовый), но не закрывает тот же (готовый) скрипт.
Хочу сделать менюшку, по нажатию клавиши, но проблема в том, что скрипт в обратную сторону не закрывается по нажатию кнопки, которая находится в самой менюшке.

#HotkeyInterval 0

version = 1.0
traytip, FastZoom by Voodoo v.%version%, Запущенно в фоновом режиме!, 5, 1
PID := DllCall("GetCurrentProcessId")
Process, Priority, %PID%, High

GUI, +HwndMyGui
GUI, Add, Button, g1, Kraken/SV-98/MSR/AX308/Scout
GUI, Add, Button, g2, Close Kr/SV/MSR/AX/Sc
GUI, Add, Button, g3, Gold AX308
GUI, Add, Button, g4, Close AX308
GUI, Add, Button, g5, Truvelo
GUI, Add, Button, g6, Close Truvelo
GUI, Add, Button, g7, Bushmaster
GUI, Add, Button, g8, Close BA50
Return

#if WinActive("ahk_id" MyGui)
WheelDown::Send {Right}
WheelUp::Send {Left}
#if

`:: GUI, Show
` up::
Send, {Space}
GUI, Hide
Return

1:
Run, Kraken_SV-98_MSR_AX308_Scout.ahk
Return
2:
WinClose, %A_WorkingDir%\Kraken_SV-98_MSR_AX308_Scout.ahk ahk_class AutoHotkey
return

3:
Run, Gold_AX308.ahk
Return
4:
WinClose, %A_WorkingDir%\Gold_AX308.ahk ahk_class AutoHotkey
return

5:
Run, Truvelo.ahk
Return
6:
WinClose, %A_WorkingDir%\Truvelo.ahk ahk_class AutoHotkey
return

7:
Run, Bushmaster.ahk
Return
8:
WinClose, %A_WorkingDir%\Bushmaster.ahk ahk_class AutoHotkey
return
													
Return
   
Insert:: ExitApp

Return