Skip to content

Instantly share code, notes, and snippets.

@ifree
Created January 6, 2015 11:48
Show Gist options
  • Save ifree/933099ad9ed521fe7ee5 to your computer and use it in GitHub Desktop.
Save ifree/933099ad9ed521fe7ee5 to your computer and use it in GitHub Desktop.
auto confirm save upk
#include <Constants.au3>
#include <WinAPI.au3>
#include <Array.au3>
#include <WindowsConstants.au3>
#include <Debug.au3>
_DebugSetup("", True)
Local $win = WinWait("Save Package")
Local $win_handle = WinGetHandle("Save Package")
Local $num = 0
While $win
$path = "path-to-dest"
ControlClick($win_handle, "", "[CLASS:ToolbarWindow32;INSTANCE:3]", "left", 1, 400)
ControlSetText($win_handle, "", "[CLASSNN:" & ControlGetFocus($win_handle) & "]", $path)
Send("{Enter}")
ControlClick($win_handle, "&Save", "[CLASS:Button;INSTANCE:1]")
$win = WinWait("Save Package", "", 60)
WEnd
MsgBox($MB_OK, "info", "finished")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment