Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance Force
- if not A_IsAdmin
- {
- Run *RunAs "%A_ScriptFullPath%"
- ExitApp
- }
- ;;;;;;;;;;;;;;;;;;;;; Text to Speech ;;;;;;;;;;;;;;;;;;;;;;;
- ttsEnabled = true
- ttsVolume = 100
- SAPI := ComObjCreate("SAPI.SpVoice")
- SAPI.volume := 100
- ;;;;;;;;;;;;;;;;;;;;;;;; Update Process ;;;;;;;;;;;;;;;;;;;;;;;;;
- update(major, minor)
- {
- FileCopy, DFscript.ahk, *.bak
- FileCopy, functions.ahk, *.bak
- URLDownloadToFile, http://dfscript.comuf.com/files/beta/functions.ahk, functions.ahk
- URLDownloadToFile, http://dfscript.comuf.com/files/beta/DFscript.ahk, DFscript.ahk
- ;URLDownloadToFile, http://pastebin.com/raw.php?i=fNJMTXTc, DFscript.ahk
- ;URLDownloadToFile, http://pastebin.com/raw.php?i=HaziAzKp, functions.ahk
- IniWrite, %Nmajor%, c:\DFscript\config.ini, version, major
- IniWrite, %Nminor%, c:\DFscript\config.ini, version, minor
- return
- }
- ;;;;Configuration File;;;;
- config=
- (
- [Hotkeys]
- mountLeft=Left
- mountRight=Right
- [version]
- major=2
- minor=0
- [Togglekeys]
- autoFire=+^LButton
- instaCast=+^RButton
- insta=0
- auto=0
- [Filepath]
- loc=
- )
- IfNotExist, c:\DFscript\config.ini
- {
- FileCreateDir, C:\DFscript
- FileAppend %config%, c:\DFscript\config.ini
- }
- FileDelete, c:\DFscript\version.ini
- URLDownloadToFile, http://pastebin.com/raw.php?i=EU0zv5nS, c:\DFscript\version.ini
- global Nmajor := getIni("c:\DFscript\version.ini", "version", "major")
- global Nminor := getIni("c:\DFscript\version.ini", "version", "minor")
- global major := getIni("c:\DFscript\config.ini", "version", "major")
- global minor := getIni("c:\DFscript\config.ini", "version", "minor")
- ;;;;;;;;;;;;;;;;;;; Update Check ;;;;;;;;;;;;;;;;;;;
- major := getIni("c:\DFscript\config.ini", "version", "major")
- minor := getIni("c:\DFscript\config.ini", "version", "minor")
- Menu, Tray, Add, Add Hotkeys, run
- if (major < Nmajor) or (major = Nmajor and minor < Nminor)
- {
- Gui 2: Add, ActiveX, x0 y0 w980 h600 vWB, Shell.Explorer
- WB.Navigate("http://www.ahkgaming.com/changelog.html")
- Gui 2: Add, Button, x0 y600 w327 h40 , View Source (2 files)
- Gui 2: Add, Button, x654 y600 w327 h40 , Download Update
- Gui 2: Add, Button, x327 y600 w327 h40, Cancel
- Gui 2: Show, Center h640 w980, New Update Available
- return
- }
- ;;;;;;;;;;;;;;;;;;; Welcome Message ;;;;;;;;;;;;;;;;;;;
- welcomeMsg = Welcome to Darkfall.
- say(welcomeMsg)
- ;;;;;;;;;;;;;;;;;;;;;;;;; Hotkey Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- 2ButtonCancel:
- Gui, 2: Hide
- reloadkeys:
- #Include functions.ahk
- run:
- Gui, Add, GroupBox, x56 y47 w190 h110 , Extra Mount Keys (Optional):
- Gui, Add, Text, x66 y67 w90 h20 , Mount Left:
- Gui, Add, Text, x66 y97 w90 h20 , Mount Right:
- Gui, Add, Hotkey, x166 y67 w70 h23 vmountLeft, %mountLeft% ;left action
- Gui, Add, Hotkey, x166 y97 w70 h23 vmountRight, %mountRight% ;right action
- Gui, Add, GroupBox, x56 y167 w320 h150 , Toggle Keys
- Gui, Add, Text, x66 y197 w110 h20 , Toggle AutoFire:
- Gui, Add, Hotkey, x196 y197 w120 h23 vautoFire, %autoFire%
- Gui, Add, Text, x66 y257 w110 h20 , Toggle Inst-Cast:
- Gui, Add, Hotkey, x196 y257 w120 h23 vinstaCast, %instaCast%
- Gui, Add, Text, x76 y220 w150 h20 , Default: ctrl+shift+Lbutton
- Gui, Add, Text, x76 y280 w160 h20 , Default: ctrl+shift+Rbutton
- Gui, Show
- return
- ~esc::
- {
- IniWrite, %auto%, c:\DFscript\config.ini, Togglekeys, auto
- IniWrite, %insta%, c:\DFscript\config.ini, Togglekeys, insta
- goto, reloadkeys
- }
- return
- 2ButtonDownloadUpdate:
- update(Nmajory, Nminor)
- Reload
- return
- 2GuiClose:
- ExitApp
- 2ButtonViewSource(2files):
- run http://pastebin.com/raw.php?i=fNJMTXTc
- run http://pastebin.com/raw.php?i=HaziAzKp
- return
- GuiClose:
- Gui,Submit
- IniWrite, %mountLeft%, c:\DFscript\config.ini, Hotkeys, mountLeft
- IniWrite, %mountRight%, c:\DFscript\config.ini, Hotkeys, mountRight
- IniWrite, %autoFire%, c:\DFscript\config.ini, Togglekeys, autoFire
- IniWrite, %instaCast%, c:\DFscript\config.ini, Togglekeys, instaCast
- Gui, Destroy
Advertisement
Add Comment
Please, Sign In to add comment