Тема: AHK: перезапуск скомпилированного скрипта
Добрый день. С расширением .ahk все работает корректно, но если компилироваться в .exe, то вылезает окно что старая версия скрипта уже запущена. То есть скрипт перезапускается почему-то в скомпилированном виде.
Gui, Add, Button, x12 y29 w190 h40 , Index-ALL
Gui, Add, Button, x212 y29 w190 h90 , IP(10.74)
Gui, Add, Button, x12 y79 w190 h40 , Index-N
Gui, Show, x448 y478 h155 w420,
Return
ButtonIndex-ALL:
InputBox, UserInput, Enter Name, INDEX?:, , 300, 150
InputBox, UserInput1, Enter Name, WHO?:, , 300, 150
FileAppend,
(
ping x-%UserInput%-%UserInput1% -t ;пример
) ,C:\Users\Roman.Chernov\Desktop\batman.bat
Run, C:\Users\Roman.Chernov\Desktop\batman.bat
sleep 2000
FileDelete, C:\Users\Roman.Chernov\Desktop\batman.bat
Return
;________________________________________
ButtonIndex-N:
InputBox, UserInput, Enter Name, INDEX?:, , 300, 150
FileAppend,
(
ping x-%UserInput%-x -t ;пример
) ,C:\Users\Roman.Chernov\Desktop\batman.bat
Run, C:\Users\Roman.Chernov\Desktop\batman.bat
sleep 2000
FileDelete, C:\Users\Roman.Chernov\Desktop\batman.bat
Return
;________________________________________
ButtonIP(10.74):
InputBox, UserInput, Enter Name, IP?:10.74..., , 300, 150
FileAppend,
(
ping 10.74.%UserInput% -t
) ,C:\Users\Roman.Chernov\Desktop\batman.bat
Run, C:\Users\Roman.Chernov\Desktop\batman.bat
sleep 2000
FileDelete, C:\Users\Roman.Chernov\Desktop\batman.bat
Return
GuiClose:
ExitApp