hello everybody
I need to automate uploading image via Autoit to my wordpress blog
here is my code
$url = "https://engnajjar.wordpress.com/wp-admin/media-new.php?browser-uploader"
Local $oIE =_IECreate($url)
Local $async_upload = _IEGetObjById($oIE, "async-upload")
Local $upload_btn = _IEGetObjById($oIE, "html-upload")
_IEAction($async_upload, "click")
Sleep(1000)
$hChoose = WinGetHandle("[CLASS:#32770]")
WinWaitActive($hChoose, "Choose File to Upload", 10)
ControlFocus($hChoose,"","Edit1")
Sleep(1000)
ControlSetText($hChoose, "", "Edit1", "C:\Users\administrator\Pictures\image.jpg")
ControlClick($hChoose, "", "Button1")
when the code open popup upload dialog it can't set image location text in edit box to select image
the code still wait popup upload dialog although the dialog is active.
when I close the dialog, the code back to work then exit without detect the dialog.
where is the problem in my code please ?