Scripting GAE launcher with AutoIT?

2019-03-03 11:13发布

Can AutoIT script GAE launcher so that I don't have to type my password each time I deploy?

1条回答
beautiful°
2楼-- · 2019-03-03 11:25

AutoIt can automate the GUI no problem. There are 2 edit boxes (Edit1 and Edit2) so you can practically take the notepad examples and change them a little bit. If you want something running in the background then do something like this as a wrapper around the launcher.

Local $sLauncherPath = "C:\Program Files\Google\google_appengine\launcher\GoogleAppEngineLauncher.exe"

Local $iPid = Run($sLauncherPath)

Local $hWin
While ProcessExists($iPid)
    $hWin = WinWait("Deploy Application to Google", "", 1)

    If $hWin And WinGetProcess($hWin) = $iPid Then
        ControlSetText($hWin, "", "Edit1", "MyEmail@Domain.com")
        ControlSetText($hWin, "", "Edit2", "MyPassword123")

        ControlClick($hWin, "", "Button2")

        WinWaitClose($hWin)
    EndIf
WEnd

Alternatively, you can deploy the app from the command line.

查看更多
登录 后发表回答