But executing them in succession will miss many steps
Even if I add "sleep" to every operation, it doesn't solve
The script manually sets the selection for the image
Then automatically sends the cut and paste and saves it to the specified location
it work for paint.net
Some Wintitle contain Chinese
Code: Select all
paintdotnet := "ahk_exe paintdotnet.exe"
A_Clipboard := "F:\Documents\Pictures\001 00412222.jpg"
ControlSend("^+x", ,paintdotnet), Sleep(100) ;crop image
ControlSend("^+s", ,paintdotnet), Sleep(100) ;saveas windows
WinWait(_saveAS := "另存为 " paintdotnet), ControlSend("^a^v", "Edit1", _saveAS), Sleep(100) ;paste path to saveas windows
while ControlGetText("Edit1", _saveAS) != A_Clipboard ;check if paste?
ControlSend("^a^v", "Edit1", _saveAS), Sleep(100)
ControlSend("{Enter}", "Edit1", _saveAS), Sleep(100) ;enter for saveas windows
WinWait("保存配置"), ControlSend("{Enter}", ,paintdotnet), Sleep(100) ;enter for save configuration windows
WinWait("paint.net"),ControlSend("^w", ,paintdotnet), Sleep(100) ;close picture tag