; Daggerfall Tool Repository ; -- HackFall Project ; --- AHK scripts ; ---- DelphiSnake 2010-2011 ; ----- with thanks to LocalHosed ; ; this was working when I last used it running DOSBox on winXP. However, I've forgotten which versions ; of DOSBox and AHK were used and new versions could break this script. ; I haven't re-tested this! ; Make back-ups of your save games before testing! ; Maybe I will review and clean this up soon ; #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Notrayicon ; need to use a process mang to kill it (hopefully script nukes self SetKeyDelay, 10, 10 ; This gives a delay between up and down presses, so that games will more easily detect SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. CoordMode, Mouse, Screen #singleinstance ignore ;Once program running, dont run twice #InstallMouseHook #Persistent Settitlematchmode 1 Run, DF.lnk WinWaitActive, ahk_class SDL_app WinWaitClose, ahk_class SDL_app ExitApp #Ifwinactive, ahk_class SDL_app ; This makes holding down the left mouse button simulate repeated clicking ; Useful for scrolling through long inventories ; ~$*LButton:: Loop { Sleep 250 ; time in milliseconds, 1sec == 1000 GetKeyState, LBvar, LButton, P If LBvar = U ; lmb released so break loop break SendEvent {Click} } return ; This is a toggle for swinging weapons so you don't need to hold down the RMB. ; Click, swing away, click again to exit swing mode. ; After trying it out I decided I didn't like it and discontinued use. ~$*RButton Up:: ; Check our swinging variable ; If true, we're swinging, so stop swinging ; Otherwise, we want to swing if swinging { SendEvent {Click up right} } else { SendEvent {Click down right} } ; Set the swinging variable to the opposite of what it currently is swinging := !swinging ; Return out of this section return #UseHook SetDefaultMouseSpeed, 0 ;SetMouseDelay, Delay (in ms), -1 for none 0 for smallest poss SetMouseDelay, -1 ;SetKeyDelay, 0, 250, Play ; Note that both 0 and -1 are the same in SendPlay mode. ;SetMouseDelay, 250, Play ;QUICKSAVE IN 1ST SLOT (SAVE0) F7:: ; To use: setup SAVE0 by manually saving a game and give the slot a title, eg "Quick Save" ; Press F7 while playing and the script will automagically save your game to SAVE0, ; keeping the title you entered earlier. SendEvent {Esc down} Sleep 20 SendEvent {Esc up} Sleep 20 SendPlay {Click 40, -94, 0} ;SendPlay {Click 40, -94, 0} ;SendEvent {Click Rel, 32, 32} ;this clicked SAVE5 for me ; OR you could use TAB x here to tab to whichever slot you want to use, but SAVE0 is faster ; as it's selected by default ;SendEvent {TAB 5} SendEvent {Enter 2} return ; Another way of doing it, above preferred for me ;~F7 Up::DF_QuickSave1() DF_QuickSave1() { SendEvent {Esc down} Sleep 25 SendEvent {Esc up} Sleep 25 SendPlay {Click 3, 2, 0} Sleep 1000 SendPlay {Click Rel, 232, 220} {Enter 2} return } #UseHook Off #Ifwinactive ; tags off the Dosbox only window