Changed the hotkeys around too - I ordered it from Notepad's perspective, so F11 is "Load" (From MT to Notepad) and F12 is "Save" From notepad to MT.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
coordmode, mouse, window
loadx = 75
loady = 70
textx = 50
texty = 150
savex = 160
savey = 70
closex = 595
closey = 10
F11::
WinActivate, MapTool
send {F9}
WinWait,ahk_class SunAwtDialog, , 2
if ErrorLevel{
return
}
MouseMove, %loadx%, %loady%
Click
WinWait,ahk_class SunAwtDialog, , 2
Send {Enter}
Sleep, 1000
MouseMove, %textx%, %texty%
Click
Send, ^a
Send, ^c
MouseMove, %closex%, %closey%
Click
WinActivate, ahk_class Notepad++
Send, ^a
Send, ^v
return
F12::
WinActivate, ahk_class Notepad++
Send, ^a
Send, ^c
Send, ^z
WinActivate, MapTool
send {F9}
WinWait,ahk_class SunAwtDialog, , 2
if ErrorLevel{
return
}
MouseMove, %textx%, %texty%
Click
Send, ^a
Send, ^v
MouseMove, %savex%, %savey%
Click
Sleep, 500
MouseMove, %closex%, %closey%
Click
return