Jump to content

Internet Explorer and PHP


Rodger
 Share

Recommended Posts

I have the following situation:

On some webpages you have all kinds of input fields and a button. I "programmed" the click on the button like this :

.....

.....

_IEFormImageClick ($oIE, "go further.gif", "src",0,0)

MsgBox(1, "Next Step", "Press Ok/Cancel")

Now the problem:

The moment the button "go further" is clicked by AutoIt, a php script is runned which checks if the input fields are not empty or are correctly filled. If this is not the case, the php script generates a "Microsoft Internet Explorer" Message box with the message and you need to press "Ok". The AutoIt script does not go further with displaying the ""Next Step" messagebox but waits until you press "OK" in the "Microsoft Internet Explorer" messagebox.

How can I solve this?

Thanks in Advance!!

Link to comment
Share on other sites

Please see the 2nd example for _IEAction

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Please see the 2nd example for _IEAction

Dale

Hello,

I tried it but AutoIt is still waiting for me to click "ok" on the Microsoft Internet Explorer messagebox before it goes further. By the way, I tried also the example and I still need to click on "OK" before AutoiIt goes further.

Any other ideas?

Link to comment
Share on other sites

Hello,

I tried it but AutoIt is still waiting for me to click "ok" on the Microsoft Internet Explorer messagebox before it goes further. By the way, I tried also the example and I still need to click on "OK" before AutoiIt goes further.

Any other ideas?

Look at the IE message box with Au3Info. It is likely a standard Windows API dialog, not an IE window. So you click OK on it with standard ControlClick() vice _IE* functions.

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Look at the IE message box with Au3Info. It is likely a standard Windows API dialog, not an IE window. So you click OK on it with standard ControlClick() vice _IE* functions.

:P

Well the point is that the

_IEFormImageClick ($oIE, "go further.gif", "src")

is a button which start a php script (at least I think it's a php script) for checking the fields. This php script generates the MIE messagebox so the AutoIt script stops after it executed the line _IEFormImageClick ($oIE, "go further.gif", "src"). After you pressed "OK" then the AutoIt script goes to the next program line.

It doesn't matter is you say:

_IEFormImageClick ($oIE, "go further.gif", "src")

ControlClick("Microsoft Internet Explorer","","OK")

It looks like AutoIt is not in control after _IEFormImageClick ($oIE, "go further.gif", "src") is executed and the php script is started for checking and when wrong is generating the message box; AutoIt seems to be out of focus until you press the MIE "OK" button.

It's more or less the same as the 2nd example of _IEAction, I still need to press ok before the script goes further.......

Maybe somebody encountered and solved this problem before....

Link to comment
Share on other sites

_IEImgClick() by default calls _IELoadWait(). Use the $f_wait = 0 flag (see help file) to continue without waiting for the page to load.

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Well the point is that the

_IEFormImageClick ($oIE, "go further.gif", "src")

is a button which start a php script (at least I think it's a php script) for checking the fields. This php script generates the MIE messagebox so the AutoIt script stops after it executed the line _IEFormImageClick ($oIE, "go further.gif", "src"). After you pressed "OK" then the AutoIt script goes to the next program line.

It doesn't matter is you say:

_IEFormImageClick ($oIE, "go further.gif", "src")

ControlClick("Microsoft Internet Explorer","","OK")

It looks like AutoIt is not in control after _IEFormImageClick ($oIE, "go further.gif", "src") is executed and the php script is started for checking and when wrong is generating the message box; AutoIt seems to be out of focus until you press the MIE "OK" button.

It's more or less the same as the 2nd example of _IEAction, I still need to press ok before the script goes further.......

Maybe somebody encountered and solved this problem before....

Are you certain you implemented the concept in the example I pointed you to? The key to that example is that it avoids activating the click with any _IE function. Instead, it gives the element focus and then sends a Keyboard Enter with ControlClick. This prevents the _IE functions from getting tied up by the DOM the script will not stall.

Please show your code if this does not resolve your issue.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Are you certain you implemented the concept in the example I pointed you to? The key to that example is that it avoids activating the click with any _IE function. Instead, it gives the element focus and then sends a Keyboard Enter with ControlClick. This prevents the _IE functions from getting tied up by the DOM the script will not stall.

Please show your code if this does not resolve your issue.

Dale

I found out what I did wrong. I gave a wrong name in the _IEGetObjByName....

It works now.

Thkx

Link to comment
Share on other sites

  • 1 month later...

...
_IEImgClick ($oIE, "/tra/booking.nsf/b-searchnl.gif")
ConsoleWrite($text)
WinWait("Windows Internet Explorer", "Kinderen")
ControlClick("Windows Internet Explorer", "Kinderen", "[CLASS:Button; TEXT:OK; Instance:1;]")
...

This don't work in IE7. This no console write $text. Anybody know why?

Sorry for my English :/

Link to comment
Share on other sites

...
_IEImgClick ($oIE, "/tra/booking.nsf/b-searchnl.gif")
ConsoleWrite($text)
WinWait("Windows Internet Explorer", "Kinderen")
ControlClick("Windows Internet Explorer", "Kinderen", "[CLASS:Button; TEXT:OK; Instance:1;]")
...

This don't work in IE7. This no console write $text. Anybody know why?

Sorry for my English :/

Please start a new thread. Also, you need to provide much more detail.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...