#SingleInstance ignore OperaUSBSourceDirName = operausb1063 OperaU3NeedUpdate = 1 DeleteOperaUSBexeFromU3 = 1 ExtractOperagolokAppendDirName = 1 ; 設定 WinRAR 的執行檔完整路徑 ; 一定要用 WinRAR,不可以用 rar,否則無法處理 zip 格式 WinRARFullPath = c:\Program Files\WinRAR\WinRAR.exe ; 設定系統列圖示及訊息 Menu, Tray, Tip, Opera Nalakuvara Package Builder Menu, Tray, Icon, material\opera.ico, 1, 1 ; 取得目前螢幕可用區域解析度資訊 SysGet, MonitorWorkArea, MonitorWorkArea ; 顯示目前進度 Progress, b2 m p0 r0-100 t w%MonitorWorkAreaRight% x0 y0 c11 zh0, Checking version strings..., Current Progress:, Current Progress ; 提示目前散落各檔案內的版本資訊 ; material\check.diz ; material\installer.diz ; material\operator.diz ; material\operau3.diz ; material\operausb.diz ; material\patch.diz ; operapaf\App\AppInfo\AppInfo.ini ; OperaU3\manifest\manifest.u3i ; script\check.ahk ; script\strings.ahk FileReadLine, CurrentCheckDizLine, material\check.diz, 6 CurrentCheckDiz := RegExReplace(CurrentCheckDizLine, "Title=Opera Nalakuvara ([0-9.]+) Packages Validator$", "$1") FileReadLine, CurrentInstallerDizLine, material\installer.diz, 6 CurrentInstallerDiz := RegExReplace(CurrentInstallerDizLine, "Title=Opera Nalakuvara ([0-9.]+) Full Installation Package$", "$1") FileReadLine, CurrentOperaTorDizLine, material\operator.diz, 1 CurrentOperaTorDiz := RegExReplace(CurrentOperaTorDizLine, "OperaTor Nalakuvara ([0-9.]+)$", "$1") FileReadLine, CurrentOperaU3DizLine, material\operau3.diz, 1 CurrentOperaU3Diz := RegExReplace(CurrentOperaU3DizLine, "Opera@U3 Nalakuvara ([0-9.]+)$", "$1") FileReadLine, CurrentOperaUSBDizLine, material\operausb.diz, 1 CurrentOperaUSBDiz := RegExReplace(CurrentOperaUSBDizLine, "Opera@USB Nalakuvara ([0-9.]+)$", "$1") FileReadLine, CurrentPatchDizLine, material\patch.diz, 6 CurrentPatchDiz := RegExReplace(CurrentPatchDizLine, "Title=Opera Nalakuvara ([0-9.]+) Patch Package$", "$1") IniRead, CurrentAppInfoIniPackageVersion, operapaf\App\AppInfo\AppInfo.ini, Version, PackageVersion IniRead, CurrentAppInfoIniDisplayVersion, operapaf\App\AppInfo\AppInfo.ini, Version, DisplayVersion FileReadLine, CurrentManifestU3iLine, OperaU3\manifest\manifest.u3i, 2 CurrentManifestU3i := RegExReplace(CurrentManifestU3iLine, ".+version=.([0-9.]+).>$", "$1") FileReadLine, CurrentCheckAhkLine, script\check.ahk, 3 CurrentCheckAhk := RegExReplace(CurrentCheckAhkLine, "NalakuvaraVersion = ([0-9.]+)$", "$1") FileReadLine, CurrentStringsAhkLine, script\strings.ahk, 2 CurrentStringsAhk := RegExReplace(CurrentStringsAhkLine, "NalakuvaraVersion = ([0-9.]+)$", "$1") MsgBox, 33, Confirming Version Strings, Overall:`n %CurrentStringsAhk% (strings.ahk) `n`nFull:`n %CurrentInstallerDiz% (installer.diz) `n`nPatch:`n %CurrentPatchDiz% (patch.diz) `n`nUSB:`n %CurrentOperaUSBDiz% (operausb.diz)`n`nU3:`n %CurrentManifestU3i% (manifest.u3i)`n %CurrentOperaU3Diz% (operau3.diz)`n`nPortableApps:`n %CurrentAppInfoIniPackageVersion% (AppInfo.ini)`n %CurrentAppInfoIniDisplayVersion%`n`nTor:`n %CurrentOperaTorDiz% (operator.diz)`n`nChecker:`n %CurrentCheckAhk% (check.ahk) `n %CurrentCheckDiz% (check.diz) `n`nStart building packages? IfMsgBox Cancel { ExitApp } Progress, , Selecting what to build... ; 繪製 GUI Gui, Add, Button, x46 y167 w50 h20 Default, &Build Gui, Add, Button, x16 y17 w25 h14 gFullOnly, --> Gui, Add, CheckBox, x46 y17 w170 h14 Checked vIfFull, Build &Full Installation Package Gui, Add, Button, x16 y37 w25 h14 gPatchOnly, --> Gui, Add, CheckBox, x46 y37 w170 h14 Checked vIfPatch, Build &Patch Package Gui, Add, Button, x16 y57 w25 h14 gUSBOnly, --> Gui, Add, CheckBox, x46 y57 w170 h14 Checked vIfUSB, Build Opera@&USB Package Gui, Add, Button, x16 y77 w25 h14 gU3Only, --> Gui, Add, CheckBox, x46 y77 w170 h14 Checked vIfU3, Build Opera@U&3 Package Gui, Add, Button, x16 y97 w25 h14 gPAFOnly, --> Gui, Add, CheckBox, x46 y97 w170 h14 Checked vIfPAF, Build Portable&Apps Package Gui, Add, Button, x16 y117 w25 h14 gPortableOnly, --> Gui, Add, CheckBox, x46 y117 w170 h14 Checked vIfPortable, Build P&ortable Packages Gui, Add, Button, x16 y137 w25 h14 gTorOnly, --> Gui, Add, CheckBox, x46 y137 w170 h14 Checked vIfTor, Build Opera&Tor Package Gui, Add, Button, x106 y167 w50 h20, &Checker Gui, Add, Button, x166 y167 w50 h20, E&xit Gui, Show, xCenter yCenter h203 w236, Nalakuvara Package Builder Return FullOnly: IfFull = 1 Gui, Destroy Goto, building PatchOnly: IfPatch = 1 Gui, Destroy Goto, building USBOnly: IfUSB = 1 Gui, Destroy Goto, building U3Only: IfU3 = 1 Gui, Destroy Goto, building PAFOnly: IfPAF = 1 Gui, Destroy Goto, building PortableOnly: IfPortable = 1 Gui, Destroy Goto, building TorOnly: IfTor = 1 Gui, Destroy Goto, building ButtonBuild: Gui, Submit building: ; 計算總共要製作多少套件 CountTotal = 0 If (IfFull = 1) { CountTotal := CountTotal + 1 } If (IfPatch = 1) { CountTotal := CountTotal + 1 } If (IfUSB = 1) { CountTotal := CountTotal + 1 } If (IfU3 = 1) { CountTotal := CountTotal + 1 } If (IfPAF = 1) { CountTotal := CountTotal + 1 } If (IfPortable = 1) { CountTotal := CountTotal + 1 } If (IfTor = 1) { CountTotal := CountTotal + 1 } CountCurrent = 0 ; 建立完整安裝套件 If (IfFull = 1) { CountCurrent := CountCurrent + 1 Progress, b2 m p0 r0-100 t w%MonitorWorkAreaRight% x0 y0 c11, [ %CountCurrent% / %CountTotal% ] Building Full Installation Package..., Current Progress:, Current Progress IfExist, operawin\installer.exe { FileSetAttrib, -R, operawin\installer.exe FileDelete, operawin\installer.exe } Progress, 20 RunWait, Ahk2Exe\Ahk2Exe.exe /in script\installer.ahk /out operawin\installer.exe /icon material\opera.ico Progress, 50 FileSetAttrib, -R, operawin\*.*, 1, 1 Progress, 60 RunWait, %WinRARFullPath% x -y osie\osie.zip operawin\osie\ Progress, 65 IfExist, operawin\hack { FileSetAttrib, -R, operawin\hack, 1, 1 FileRemoveDir, operawin\hack, 1 } Progress, 70 RunWait, %WinRARFullPath% x -y hack\opera-c2a.zip operawin\hack\ Progress, 80 RunWait, %WinRARFullPath% a -afrar -av -iicon..\material\opera.ico -iimg..\material\Nalakuvara.bmp -k -m5 -md4096 -r -rr10p -s -sfx -t -tk -xpatch.exe -z..\material\installer.diz ..\Working\Opera-%CurrentInstallerDiz%.Nalakuvara.exe *.*, operawin Progress, 100 } ; 建立補綴套件 If (IfPatch = 1) { CountCurrent := CountCurrent + 1 Progress, b2 m p0 r0-100 t w%MonitorWorkAreaRight% x0 y0 c11, [ %CountCurrent% / %CountTotal% ] Building Patch Package..., Current Progress:, Current Progress IfExist, operawin\patch.exe { FileSetAttrib, -R, operawin\patch.exe FileDelete, operawin\patch.exe } Progress, 20 RunWait, Ahk2Exe\Ahk2Exe.exe /in script\patch.ahk /out operawin\patch.exe /icon material\opera.ico Progress, 50 FileSetAttrib, -R, operawin\*.*, 1, 1 Progress, 60 RunWait, %WinRARFullPath% x -y osie\osie.zip operawin\osie\ Progress, 65 IfExist, operawin\hack { FileSetAttrib, -R, operawin\hack, 1, 1 FileRemoveDir, operawin\hack, 1 } Progress, 70 RunWait, %WinRARFullPath% x -y hack\opera-c2a.zip operawin\hack\ Progress, 80 RunWait, %WinRARFullPath% a -afrar -av -iicon..\material\opera.ico -iimg..\material\Nalakuvara.bmp -k -m5 -md4096 -r -rr10p -s -sfx -t -tk -xeula.txt -xinstaller.exe -xOpera*.exe -xOpera*.msi -z..\material\patch.diz ..\Working\Opera-%CurrentPatchDiz%.Nalakuvara-Patch.Only.exe *.*, operawin Progress, 100 } ; 建立 Opera@USB 套件 If (IfUSB = 1) { CountCurrent := CountCurrent + 1 Progress, b2 m p0 r0-100 t w%MonitorWorkAreaRight% x0 y0 c11, [ %CountCurrent% / %CountTotal% ] Building Opera@USB Package..., Current Progress:, Current Progress FileSetAttrib, -RHS, OperaUSB\*.*, 1, 1 Progress, 10 IfExist, OperaUSB\OperaUSB { FileRemoveDir, OperaUSB\OperaUSB, 1 } RunWait, %WinRARFullPath% x -y OperaUSB\operausb.zip OperaUSB\ Progress, 20 FileSetAttrib, -R, OperaUSB\%OperaUSBSourceDirName%\*.*, 1, 1 Progress, 25 FileMoveDir, OperaUSB\%OperaUSBSourceDirName%, OperaUSB\OperaUSB, R, 1 Sleep, 3000 IfExist, OperaUSB\%OperaUSBSourceDirName% { FileMoveDir, OperaUSB\%OperaUSBSourceDirName%, OperaUSB\OperaUSB, R } Progress, 30 FileSetAttrib, -R, OperaUSB\OperaUSB\*.*, 1, 1 Progress, 35 FileDelete, OperaUSB\OperaUSB\profile\styles\user\_Antiflash.css Progress, 37 FileDelete, OperaUSB\OperaUSB\profile\styles\user\_bantiad.css Progress, 40 FileCopyDir, OperaUSB\Nalakuvara, OperaUSB\OperaUSB, 1 Progress, 50 FileSetAttrib, -R, OperaUSB\OperaUSB\*.*, 1, 1 Progress, 60 RunWait, %WinRARFullPath% x -y osie\osie.zip OperaUSB\OperaUSB\osie\ Progress, 65 RunWait, %WinRARFullPath% x -y hack\opera-c2a.zip OperaUSB\OperaUSB\.hack\ Progress, 70 FileSetAttrib, +HS, OperaUSB\OperaUSB\.hack, 2 Progress, 80 IfExist, OperaUSB\OperaUSB\OperaUSB.exe { FileDelete, OperaUSB\OperaUSB\OperaUSB.exe } RunWait, Ahk2Exe\Ahk2Exe.exe /in script\operausb.ahk /out OperaUSB\OperaUSB\OperaUSB.exe /icon material\opera.ico Progress, 90 RunWait, %WinRARFullPath% a -afrar -av -ep1 -k -m5 -md4096 -r -rr10p -s -t -tk -zmaterial\operausb.diz Working\OperaUSB-%CurrentOperaUSBDiz%.Nalakuvara.rar OperaUSB\OperaUSB Progress, 100 } BuildU3Packages: ; 建立 Opera@U3 套件 If (IfU3 = 1) { CountCurrent := CountCurrent + 1 Progress, b2 m p0 r0-100 t w%MonitorWorkAreaRight% x0 y0 c11, [ %CountCurrent% / %CountTotal% ] Building Opera@U3 Packages..., Current Progress:, Current Progress FileSetAttrib, -R, OperaU3\*.*, 1, 1 Progress, 5 IfExist, OperaU3\device { FileRemoveDir, OperaU3\device, 1 } Progress, 10 If (OperaU3NeedUpdate = 1) { RunWait, %WinRARFullPath% x -y OperaU3\upd_int.zip OperaU3\device\ FileSetAttrib, -R, OperaU3\device\*.*, 1, 1 Progress, 15 } FileCopyDir, OperaUSB\Nalakuvara, OperaU3\device, 1 Progress, 20 FileSetAttrib, -R, OperaU3\device\*.*, 1, 1 Progress, 25 IniWrite, Opera@U3 Nalakuvara `%v, OperaU3\device\profile\operaprefs.ini, User Prefs, Title Progress, 28 IniWrite, 1, OperaU3\device\nalakuvara.ini, ZTermApplet, DeleteZtermrcOnExit Progress, 30 IfExist, OperaU3\OperaNalakuvaraU3.u3p { FileDelete, OperaU3\OperaNalakuvaraU3.u3p } Progress, 35 FileCopy, OperaU3\operau3.u3p, OperaU3\OperaNalakuvaraU3.u3p, 1 Progress, 40 If (DeleteOperaUSBexeFromU3 = 1) { RunWait, %WinRARFullPath% d -afzip OperaU3\OperaNalakuvaraU3.u3p device\OperaUSB.exe Progress, 43 } RunWait, %WinRARFullPath% d -afzip OperaU3\OperaNalakuvaraU3.u3p device\profile\styles\user\_Antiflash.css Progress, 44 RunWait, %WinRARFullPath% d -afzip OperaU3\OperaNalakuvaraU3.u3p device\profile\styles\user\_bantiad.css Progress, 45 RunWait, %WinRARFullPath% x -y osie\osie.zip OperaU3\device\osie\ Progress, 47 RunWait, %WinRARFullPath% x -y hack\opera-c2a.zip OperaU3\device\ Progress, 50 IfExist, OperaU3\device\operau3.exe { FileDelete, OperaU3\device\operau3.exe } Progress, 55 RunWait, Ahk2Exe\Ahk2Exe.exe /in script\operau3.ahk /out OperaU3\device\operau3.exe /icon material\opera.ico Progress, 60 RunWait, %WinRARFullPath% a -afzip -av- -ep1 -s- -t -tk OperaU3\OperaNalakuvaraU3.u3p OperaU3\device OperaU3\manifest Progress, 70 RunWait, %WinRARFullPath% a -afrar -av -ep -k -m5 -md4096 -rr10p -s -t -tk -zmaterial\operau3.diz Working\OperaU3-%CurrentManifestU3i%.Nalakuvara.rar OperaU3\OperaNalakuvaraU3.u3p Progress, 90 RunWait, U3P2EXE\U3P2EXE.exe -File "OperaU3\OperaNalakuvaraU3.u3p" -TargetDir "Working" -Installer "OperaU3-%CurrentManifestU3i%.Nalakuvara.Installer.exe" -Version "%CurrentManifestU3i%" -Display "Opera@U3 Nalakuvara" -Icon "material\opera.ico" -Force Progress, 100 } ; 建立 PortableApps 套件 If (IfPAF = 1) { CountCurrent := CountCurrent + 1 Progress, b2 m p0 r0-100 t w%MonitorWorkAreaRight% x0 y0 c11, [ %CountCurrent% / %CountTotal% ] Building PortableApps Package..., Current Progress:, Current Progress FileSetAttrib, -R, operapaf\*.*, 1, 1 Progress, 5 IfExist, operapaf\App\OperaNalakuvara { FileRemoveDir, operapaf\App\OperaNalakuvara, 1 } Progress, 10 RunWait, %WinRARFullPath% x -y OperaUSB\operausb.zip operapaf\App\ Progress, 20 FileSetAttrib, -R, operapaf\App\%OperaUSBSourceDirName%\*.*, 1, 1 Progress, 25 FileMoveDir, operapaf\App\%OperaUSBSourceDirName%, operapaf\App\OperaNalakuvara, R Sleep, 3000 IfExist, operapaf\App\%OperaUSBSourceDirName% { FileMoveDir, operapaf\App\%OperaUSBSourceDirName%, operapaf\App\OperaNalakuvara, R } Progress, 35 FileSetAttrib, -R, operapaf\App\OperaNalakuvara\*.*, 1, 1 Progress, 40 FileCopyDir, OperaUSB\Nalakuvara, operapaf\App\OperaNalakuvara, 1 Progress, 45 FileSetAttrib, -R, operapaf\App\OperaNalakuvara\*.*, 1, 1 Progress, 50 IniWrite, Opera Nalakuvara PortableApp `%v, operapaf\App\OperaNalakuvara\profile\operaprefs.ini, User Prefs, Title Progress, 55 IniWrite, 1, operapaf\App\OperaNalakuvara\nalakuvara.ini, ZTermApplet, DeleteZtermrcOnExit Progress, 60 RunWait, %WinRARFullPath% x -y osie\osie.zip operapaf\App\OperaNalakuvara\osie\ Progress, 65 RunWait, %WinRARFullPath% x -y hack\opera-c2a.zip operapaf\Other\Help\hack\ Progress, 70 IfExist, operapaf\operapaf.exe { FileDelete, operapaf\operapaf.exe } Progress, 75 RunWait, Ahk2Exe\Ahk2Exe.exe /in script\operapaf.ahk /out operapaf\operapaf.exe /icon material\opera.ico Progress, 85 RunWait, PortableApps.comInstaller\PortableApps.comInstaller.exe %A_WorkingDir%\operapaf, PortableApps.comInstaller Progress, 95 FileMove, OperaNalakuvaraPortableApp_*.paf.exe, Working\OperaNalakuvaraPortableApp-%CurrentAppInfoIniPackageVersion%.paf.exe Progress, 100 } ; 建立 OperaPortable (Personal/OneUse) 套件 If (IfPortable = 1) { CountCurrent := CountCurrent + 1 Progress, b2 m p0 r0-100 t w%MonitorWorkAreaRight% x0 y0 c11, [ %CountCurrent% / %CountTotal% ] Building OperaPortable Packages..., Current Progress:, Current Progress FileSetAttrib, -R, operagolok\*.*, 1, 1 Progress, 5 IfExist, operagolok\operagolok { FileRemoveDir, operagolok\operagolok, 1 } Progress, 10 If (ExtractOperagolokAppendDirName = 1) { RunWait, %WinRARFullPath% x -ad -y operagolok\operagolok.rar operagolok\ } else { RunWait, %WinRARFullPath% x -y operagolok\operagolok.rar operagolok\ } Progress, 20 FileSetAttrib, -R, operagolok\operagolok\*.*, 1, 1 Progress, 30 FileCopyDir, operagolok\Nalakuvara, operagolok\operagolok, 1 Progress, 40 FileSetAttrib, -R, operagolok\operagolok\*.*, 1, 1 Progress, 50 IfNotExist, operagolok\operagolok\compiled { FileCreateDir, operagolok\operagolok\compiled } Progress, 54 SetWorkingDir, operagolok\operagolok Progress, 55 RunWait, makensis.exe /DLANG=zh-tw operagolok.nsi Progress, 75 RunWait, makensis.exe /DLANG=zh-tw /DPERSONAL operagolok.nsi Progress, 95 SetWorkingDir, %A_ScriptDir% Progress, 96 FileMove, operagolok\operagolok\compiled\opera-portable-oneuse-zh-tw-*.exe, Working\OperaPortableOneUse-%CurrentStringsAhk%.Nalakuvara.exe Progress, 98 FileMove, operagolok\operagolok\compiled\opera-portable-personal-zh-tw-*.exe, Working\OperaPortablePersonal-%CurrentStringsAhk%.Nalakuvara.exe Progress, 100 } ; 建立 OperaTor 套件 If (IfTor = 1) { CountCurrent := CountCurrent + 1 Progress, b2 m p0 r0-100 t w%MonitorWorkAreaRight% x0 y0 c11, [ %CountCurrent% / %CountTotal% ] Building OperaTor Package..., Current Progress:, Current Progress FileSetAttrib, -RHS, OperaTor\*.*, 1, 1 Progress, 10 IfExist, OperaTor\OperaTor { FileRemoveDir, OperaTor\OperaTor, 1 } Progress, 13 FileCreateDir, OperaTor\OperaTor Progress, 16 RunWait, %WinRARFullPath% x -y OperaUSB\operausb.zip OperaTor\ Progress, 20 FileSetAttrib, -R, OperaTor\%OperaUSBSourceDirName%\*.*, 1, 1 Progress, 25 FileMoveDir, OperaTor\%OperaUSBSourceDirName%, OperaTor\OperaTor\Opera, R, 1 Sleep, 3000 IfExist, OperaTor\%OperaUSBSourceDirName% { FileMoveDir, OperaTor\%OperaUSBSourceDirName%, OperaTor\OperaTor\Opera, R } Progress, 30 FileSetAttrib, -R, OperaTor\OperaTor\Opera\*.*, 1, 1 Progress, 35 FileDelete, OperaTor\OperaTor\Opera\profile\styles\user\_Antiflash.css Progress, 40 FileDelete, OperaTor\OperaTor\Opera\profile\styles\user\_bantiad.css Progress, 45 FileCopyDir, OperaUSB\Nalakuvara, OperaTor\OperaTor\Opera, 1 Progress, 50 FileSetAttrib, -R, OperaTor\OperaTor\*.*, 1, 1 Progress, 55 FileCopyDir, OperaTor\Nalakuvara, OperaTor\OperaTor, 1 Progress, 60 FileSetAttrib, -R, OperaTor\OperaTor\*.*, 1, 1 Progress, 64 IniWrite, 1, OperaTor\OperaTor\Opera\nalakuvara.ini, ZTermApplet, DeleteZtermrcOnExit Progress, 65 RunWait, %WinRARFullPath% x -y osie\osie.zip OperaTor\OperaTor\Opera\osie\ Progress, 70 RunWait, %WinRARFullPath% x -y hack\opera-c2a.zip OperaTor\OperaTor\.hack\ Progress, 80 FileSetAttrib, +HS, OperaTor\OperaTor\.hack, 2 Progress, 85 IfExist, OperaTor\OperaTor\OperaTorNalakuvara.exe { FileDelete, OperaTor\OperaTor\OperaTorNalakuvara } RunWait, Ahk2Exe\Ahk2Exe.exe /in script\operator.ahk /out OperaTor\OperaTor\OperaTorNalakuvara.exe /icon material\opera.ico Progress, 90 RunWait, %WinRARFullPath% a -afrar -av -ep1 -k -m5 -md4096 -r -rr10p -s -t -tk -zmaterial\operator.diz Working\OperaTor-%CurrentOperaTorDiz%.Nalakuvara.rar OperaTor\OperaTor Progress, 100 } Progress, b2 m p0 r0-100 t w%MonitorWorkAreaRight% x0 y0 c11 zh0, Finished. Sleep, 1000 Goto, GuiClose ButtonChecker: Gui, Destroy ; 建立檢驗程式 Progress, b2 m p0 r0-100 t w%MonitorWorkAreaRight% x0 y0 c11, (1/1) Building Checker..., Current Progress:, Current Progress IfExist, script\check.exe { FileSetAttrib, -R, script\check.exe FileDelete, script\check.exe } Progress, 20 RunWait, Ahk2Exe\Ahk2Exe.exe /in script\check.ahk /out script\check.exe /icon material\opera.ico Progress, 50 FileSetAttrib, -R, script\check.exe Progress, 60 FileSetAttrib, -R, script\MD5Lib.dll Progress, 70 FileSetAttrib, -R, material\opera.ico Progress, 80 RunWait, %WinRARFullPath% a -afrar -av -iicon..\material\opera.ico -iimg..\material\Nalakuvara.bmp -k -m5 -md4096 -ncheck.exe -nMD5Lib.dll -nopera.ico -r- -rr10p -s -sfx -t -tk -z..\material\check.diz ..\Working\NalakuvaraCheck-%CurrentCheckAhk%.exe *.* ..\material\opera.ico, script Progress, 100 Progress, b2 m p0 r0-100 t w%MonitorWorkAreaRight% x0 y0 c11 zh0, Finished. Sleep, 1000 Goto, GuiClose ButtonExit: GuiClose: Progress, Off ExitApp