From 05800d08a98cf5d411cf99884007da9c2901385b Mon Sep 17 00:00:00 2001 From: Yuriy Date: Fri, 15 Dec 2023 16:35:35 -0500 Subject: [PATCH] added automated compiler for Chromedriver-mover --- Chromedriver-Mover-Compiler.ahk | 71 +++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Chromedriver-Mover-Compiler.ahk diff --git a/Chromedriver-Mover-Compiler.ahk b/Chromedriver-Mover-Compiler.ahk new file mode 100644 index 0000000..1e325e8 --- /dev/null +++ b/Chromedriver-Mover-Compiler.ahk @@ -0,0 +1,71 @@ +;---ENVIRONMENT--------------------------------------------------------------------- +#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. +;#Warn ; Enable warnings to assist with detecting common errors. +;DetectHiddenWindows, On +#SingleInstance, Force +DetectHiddenWindows, ON +SendMode Input ; Recommended for new scripts due to its superior speed and reliability. +SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. +;SetKeyDelay, 500 +CoordMode, ToolTip, Screen +CoordMode, Mouse, Screen +; #NoTrayIcon +; Menu, Tray, Icon, RMScriptManager.ico + +;---Notes/Extra Info/#Includes------------------------------------------------------ + + +;---VARIABLES----------------------------------------------------------------------- + +;---MAIN SCRIPT--------------------------------------------------------------------- + +AHKFilepath = %A_ScriptDir%\Chromedriver-Mover.ahk +Exefilepath = %A_ScriptDir%\Chromedriver-Mover.exe +icopath = %A_ScriptDir%\Chromedriver-Mover.ico + + + +; Kill any active intances of the uploaders so the .exe file can be overwriten by the compilation +process, close, Chromedriver-Mover.exe + +sleep, 1000 + +; Delete the .exe file so it can be repalced +if(FileExist(Exefilepath)){ + FileDelete, %Exefilepath% + if(ErrorLevel){ + msgbox, failed to delete Exe file. Please delete manually and re-run the compiler. + ExitApp + } +} + + +if(!FileExist(AHKFilepath)){ + msgbox, %AHKFilepath% does not exist`nExiting + ExitApp +} + + +if(!FileExist(icopath)){ + msgbox, %icopath% does not exist`nExiting + ExitApp +} + + +run, %comspec% /c ""C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe" /in "%AHKFilepath%" /out "%exefilepath%" /icon "%icopath%"" + +ExitApp + + + + + + + + + + + + + +;---FUNCTIONS-----------------------------------------------------------------------