반응형
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- 식의 설명
- IF (식)
- 배열
- Blocks
- StringGetPos
- SetEnv
- 식
- EnvSet
- SetKeyDelay
- EnvDiv
- EnvAdd
- Menu
- SetControlDelay
- MouseClick
- Threads
- EnvMult
- if(식)
- IfInString
- Var:=식
- DetectHiddenWindows
- autohotkey
- IfWinExist
- SetTitleMatchMode
- ControlGetText
- ControlSend
- if
- 함수
- SetMouseDelay
- API
- EnvSub
Archives
- Today
- Total
ㄴrㅎnㅂrㄹrㄱi
AHK Automated Installation 본문
반응형
The following script:
- Checks the latest version of ahk installation from web
- Let you select web or local ahk installation file
- Shows download progress while file is being downloaded.
- Backs up registry entries for Compiler/Editor etc. of AHK scripts
- Exits all running uncompiled ahk scripts (asks you to confirm this step)
- Runs installation and automates the process
- Loads back old registry settings
- Runs the scripts exited during installation and upto 3 custom files as per user reqmt (can be your 24*7 scripts or anything else)
IMPORTANT : Compile this script before running.
- Checks the latest version of ahk installation from web
- Let you select web or local ahk installation file
- Shows download progress while file is being downloaded.
- Backs up registry entries for Compiler/Editor etc. of AHK scripts
- Exits all running uncompiled ahk scripts (asks you to confirm this step)
- Runs installation and automates the process
- Loads back old registry settings
- Runs the scripts exited during installation and upto 3 custom files as per user reqmt (can be your 24*7 scripts or anything else)
IMPORTANT : Compile this script before running.
DetectHiddenWindows On ;___________________________________________ ; CONFIGURATION AREA DownloadURL = http://www.autohotkey.com/download DownloadFolder = %A_Desktop% ;UnComment to save all keys RegRead, RegCmp, HKEY_CLASSES_ROOT, AutoHotkeyScript\Shell\Compile\Command, RegRead, RegEdt, HKEY_CLASSES_ROOT, AutoHotkeyScript\Shell\Edit\Command, RegRead, RegOpn, HKEY_CLASSES_ROOT, AutoHotkeyScript\Shell\Open\Command, RegRead, RegRun, HKEY_CLASSES_ROOT, AutoHotkeyScript\Shell\Run\Command, ;Scripts/programs to run after installation Run1 = E:\dos\batch\ManFriday.ahk Run2 = E:\dos\batch\AhkIcons.ahk Run3 = ;___________________________________________ RunScripts = %Run1%`n%Run2%`n%Run3% ;get version from system RegRead, AHKPATH, HKEY_CLASSES_ROOT, AutoHotkeyScript\Shell\Run\Command, StringGetPos, POS, AHKPATH, \AutoHotkey.exe StringLeft, AHKPATH, AHKPATH, %POS% StringReplace, AHKPATH, AHKPATH, ",, A FileGetVersion, CurrVer, %AHKPath%\AutoHotkey.exe ;get version from web Random, Rnd1, 1, 1000 Random, Rnd2, 1, 1000 FileDelete, %Temp%\LatestVer.txt URLDownloadToFile, %DownloadURL%/CurrentVersion.txt?%Rnd1%=%Rnd2%, %Temp%\LatestVer.txt FileReadLine, LatestVer, %Temp%\LatestVer.txt, 1 MsgBox, 3, AHK AutoInstaller, Latest Version`t: %LatestVer%`nLocal Version`t: %CurrVer%`n`nPress Yes to download and install latest version.`nPress No to install from local file.`nPress Cancel to Exit. IfMsgBox, Cancel ExitApp IfMsgBox, Yes { StringReplace, LatestVer2, LatestVer, .,, All TrayTip, AHK AutoInstaller, Downloading`nPlease Wait.... SetTimer, GetSize, 2000 URLDownloadToFile, %DownloadURL%/AutoHotkeyInstall.exe?%Rnd1%=%Rnd2%, %DownloadFolder%\AutoHotkey%LatestVer2%.exe IfNotEqual, ErrorLevel, 0 { TrayTip Msgbox,, AHK AutoInstaller, There was a problem downloading the installation file. ExitApp } SetTimer, GetSize, Off TrayTip Installer = %DownloadFolder%\AutoHotkey%LatestVer2%.exe } IfMsgBox, No FileSelectFile, Installer, 1,, Select AutoHotkey Installation File, AutoHotkey (*.exe) IfNotExist, %Installer%, ExitApp Process, Exist, AutoHotkey.exe IfNotEqual, ErrorLevel, 0 { MsgBox, 4, AHK AutoInstaller, Exit all running scripts? IfMsgBox, Yes { ;Function by Chris WinGet, List, List, ahk_class AutoHotkey Loop, %List% { ListItem := List%A_Index% WinGetTitle, Title, ahk_id %ListItem% StringGetPos, Pos, Title, %A_Space%- AutoHotkey v if pos < 0 ; Compiled scripts can be left running without harm. continue ; Skip this script, since it's an EXE. StringLeft, ScriptFileName, Title, %Pos% RunScripts = %RunScripts%`n%ScriptFileName% } Loop { Process, Exist, AutoHotkey.exe IfEqual, ErrorLevel, 0, Break Process, Close, AutoHotkey.exe } } } Run, %Installer% TrayTip, AHK AutoInstaller, Downloading`nPlease Wait.... ;Output from AutoScriptWriter WinWait, AutoHotkey 1.0., Welcome to the AutoH IfWinNotActive, AutoHotkey 1.0., Welcome to the AutoH, WinActivate, AutoHotkey 1.0., Welcome to the AutoH WinWaitActive, AutoHotkey 1.0., Welcome to the AutoH Send, {ALTDOWN}n{ALTUP} WinWait, AutoHotkey 1.0. , Nullsoft Install Sys IfWinNotActive, AutoHotkey 1.0. , Nullsoft Install Sys, WinActivate, AutoHotkey 1.0. , Nullsoft Install Sys WinWaitActive, AutoHotkey 1.0. , Nullsoft Install Sys Send, {ALTDOWN}a{ALTUP}{DOWN 2}{SPACE}{ALTDOWN}n{ALTUP}{ALTDOWN}i{ALTUP} WinWait, AutoHotkey 1.0. , Completing the AutoH IfWinNotActive, AutoHotkey 1.0. , Completing the AutoH, WinActivate, AutoHotkey 1.0. , Completing the AutoH WinWaitActive, AutoHotkey 1.0. , Completing the AutoH Send, {ALTDOWN}s{ALTUP}{ALTDOWN}f{ALTUP} TrayTip IfNotEqual, RegCmp, RegWrite, REG_SZ, HKEY_CLASSES_ROOT, AutoHotkeyScript\Shell\Compile\Command,, %RegCmp% IfNotEqual, RegEdt, RegWrite, REG_SZ, HKEY_CLASSES_ROOT, AutoHotkeyScript\Shell\Edit\Command,, %RegEdt% IfNotEqual, RegOpn, RegWrite, REG_SZ, HKEY_CLASSES_ROOT, AutoHotkeyScript\Shell\Open\Command,, %RegOpn% IfNotEqual, RegRun, RegWrite, REG_SZ, HKEY_CLASSES_ROOT, AutoHotkeyScript\Shell\Run\Command,, %RegRun% Sort, RunScripts, U Loop, Parse, RunScripts, `n IfExist, %A_LoopField%, Run, %A_LoopField%,, UseErrorLevel GetSize: FileGetSize, FSize, %DownloadFolder%\AutoHotkey%LatestVer2%.exe, K IfEqual, FSize, FSize0, Return IfNotEqual, ErrorLevel, 1 TrayTip, AHK AutoInstaller, Downloading`nPlease Wait....`n%FSize% Kb FSize0 = %FSize% Return
반응형
'AUTOHOTKEY > 스크립트' 카테고리의 다른 글
ado com (0) | 2007.11.10 |
---|---|
AHK BBCodeWriter v7.0.2 - An offline BBCode Editor (0) | 2007.11.04 |
#INCLUDE SQLite.ahk - Functions to access SQLite3 DB's (0) | 2007.11.04 |
DllCall: Basic FTP Functions (0) | 2007.10.29 |
이미지파일을 HEX 변환 생성하는 프로그램 (0) | 2007.10.24 |
Comments