|
7 | 7 | ;@Ahk2Exe-SetDescription EC Autoclicker |
8 | 8 | ;@Ahk2Exe-SetVersion 1.1.5 |
9 | 9 |
|
| 10 | +GITHUB_REPO := "Expertcoderz/EC-Autoclicker" |
| 11 | + |
10 | 12 | FILE_EXT := ".ac-profile" |
11 | 13 | REG_KEY_PATH := "HKCU\Software\Expertcoderz\Autoclicker" |
12 | 14 | RegCreateKey REG_KEY_PATH "\Profiles" |
@@ -154,9 +156,9 @@ PersistentOptions := [ |
154 | 156 |
|
155 | 157 | HelpMenu := Menu() |
156 | 158 | HelpMenu.Add SZ_TABLE.Menu_Help_OnlineHelp |
157 | | - , (*) => Run("https://github.com/Expertcoderz/EC-Autoclicker#readme") |
| 159 | + , (*) => Run("https://github.com/" GITHUB_REPO "#readme") |
158 | 160 | HelpMenu.Add SZ_TABLE.Menu_Help_Report |
159 | | - , (*) => Run("https://github.com/Expertcoderz/EC-Autoclicker/issues/new/choose") |
| 161 | + , (*) => Run("https://github.com/" GITHUB_REPO "/issues/new/choose") |
160 | 162 | HelpMenu.Add SZ_TABLE.Menu_Help_Update |
161 | 163 | , (*) => CheckForUpdates(true) |
162 | 164 | if !A_IsCompiled |
@@ -749,7 +751,7 @@ ProfileManage(*) { |
749 | 751 |
|
750 | 752 | ProfileImport(*) { |
751 | 753 | local fileLocations := FileSelect("M", |
752 | | - , "Import Autoclicker Profile(s)", "Autoclicker Profiles (*.ac-profile)" |
| 754 | + , "Import Autoclicker Profile(s)", "Autoclicker Profiles (*" FILE_EXT ")" |
753 | 755 | ) |
754 | 756 | local fileLocation |
755 | 757 | for fileLocation in fileLocations { |
@@ -975,7 +977,7 @@ AboutOpen(*) { |
975 | 977 | AboutGui.AddText "xp+50 yp", "EC Autoclicker version " (A_IsCompiled ? SubStr(FileGetVersion(A_ScriptFullPath), 1, -2) : "?") |
976 | 978 | AboutGui.SetFont |
977 | 979 | AboutGui.AddText "xp wp", "An open-source configurable autoclicking utility for Windows." |
978 | | - AboutGui.AddLink "xp", "<a href=`"https://github.com/Expertcoderz/EC-Autoclicker`">https://github.com/Expertcoderz/EC-Autoclicker</a>" |
| 980 | + AboutGui.AddLink "xp", '<a href="https://github.com/' GITHUB_REPO '">https://github.com/' GITHUB_REPO "</a>" |
979 | 981 |
|
980 | 982 | add_log "Created About GUI" |
981 | 983 | } |
@@ -1087,7 +1089,7 @@ Please connect to the internet and try again. |
1087 | 1089 | add_log "Checking for updates" |
1088 | 1090 |
|
1089 | 1091 | local oHttp := ComObject("WinHttp.Winhttprequest.5.1") |
1090 | | - oHttp.open "GET", "https://api.github.com/repos/Expertcoderz/EC-Autoclicker/releases/latest" |
| 1092 | + oHttp.open "GET", "https://api.github.com/repos/" GITHUB_REPO "/releases/latest" |
1091 | 1093 | oHttp.send |
1092 | 1094 |
|
1093 | 1095 | local verNumMatch |
@@ -1122,17 +1124,18 @@ Your current version is {}. Would you like to update now? |
1122 | 1124 |
|
1123 | 1125 | add_log "Downloading file" |
1124 | 1126 |
|
1125 | | - try Download "https://github.com/Expertcoderz/EC-Autoclicker/releases/latest/download/EC-Autoclicker.exe" |
| 1127 | + try Download "https://github.com/" GITHUB_REPO "/releases/latest/download/EC-Autoclicker.exe" |
1126 | 1128 | , downloadFilePath |
1127 | 1129 | catch as e |
1128 | 1130 | MsgBox "An error occurred in attempting to download the latest version of EC Autoclicker.`n`nMessage: " e.Message |
1129 | 1131 | , "Update", "Iconx 262144" |
1130 | 1132 | else { |
1131 | 1133 | add_log("File downloaded") |
1132 | | - Run "powershell -windowstyle Hidden -command start-sleep 1;" |
1133 | | - . 'remove-item "' A_ScriptFullPath '";' |
1134 | | - . 'rename-item "' downloadFilePath '" "' A_ScriptName '";' |
1135 | | - . 'start-process "' A_ScriptDir '\EC-Autoclicker.exe /updated"', , "Hide" |
| 1134 | + Run "powershell.exe -WindowStyle Hidden -Command Start-Sleep -Seconds 1;" |
| 1135 | + . 'Remove-Item -LiteralPath "' A_ScriptFullPath '";' |
| 1136 | + . 'Rename-Item -LiteralPath "' downloadFilePath '" -NewName "' A_ScriptName '";' |
| 1137 | + . 'Start-Process -FilePath "' A_ScriptDir '\EC-Autoclicker.exe /updated"' |
| 1138 | + , , "Hide" |
1136 | 1139 | ExitApp |
1137 | 1140 | } |
1138 | 1141 | } |
|
0 commit comments