Jump to content

About _IEImgClick and something, strange phenomenon.


yookee
 Share

Recommended Posts

My script is used to auto login OA system from IE. When it runs by Go(F5) in SciTE, can login successfully, these is nothing. I execute it by compiled exe file, login too, but will show dialog box with AutoIt Error.

Error: The requested action with this object has failed.

At the end of my script, I add two MsgBox to see what happened.

MsgBox(0, "Debug", "1")

_IEImgClick($oIE, "login_btn_off.gif", "src")

MsgBox(0, "Debug", "2")

It will show msgbox1, then login, and then show msgbox2, without error.

But if comment msgbox1, there would not show msgbox2 after login, show error and script go finished.

So can't find cause by _IEErrorHandlerRegister.

Why?

Edited by yookee
Link to comment
Share on other sites

Can you show your whole script? More then likely it means that the page isn't loading fully, and the extra half second you have to click on the message box allows it to load. Sometimes clicking an object in a page causes the page to reload, and you have to use an IELoadWait command.

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
Link to comment
Share on other sites

yookee,

I apologize for misdirecting you, I skimmed the OP and didn't pay attention to the fact you were automating a site login.

Unfortunately site auto-login is against the forum rules. http://www.autoitscript.com/forum/forum-2/announcement-13-forum-rules/

Also, really doesn't seem like you read my original post.....

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
Link to comment
Share on other sites

Oh, I'm sorry for that. My original idea is not talking about auto-login, just why msgbox2 didn't execute.

yookee,

I apologize for misdirecting you, I skimmed the OP and didn't pay attention to the fact you were automating a site login.

Unfortunately site auto-login is against the forum rules. http://www.autoitscript.com/forum/forum-2/announcement-13-forum-rules/

Also, really doesn't seem like you read my original post.....

Link to comment
Share on other sites

The page is redirected, so _IELoadWait is waitting and waitting again, timeout.

But, because of waitting, the error disappears.

Why?

You've to add an IEwait, otherwise, your script check the field before the page loads.

Hope this help you (check in the documentation how to use this)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...