Jump to content

URGENT! _IELinkClick freezes with javascript input window


Recommended Posts

when the link is clicked a input window to enter the id to find shows up

_IELinkClickByText($oIE, "Find", 0, 0)

won't move on past this line, even though the window shows when it gets to this line..

even using _IEAction($oLink, "click") freezes..

here's the link's href:

href="java script:submitAction_win0(document.win0,'$ICField5$hfind$0');"

i can get everything but this to work, and this is a crucial feature used often and if i can get it to work i can write many more scripts to handle our tasks... ive been using mouse position and clicks, but the links position changes...

any suggestions?

this is for work so time is of the escence according to my boss =P

thanks!

Link to comment
Share on other sites

when the link is clicked a input window to enter the id to find shows up

_IELinkClickByText($oIE, "Find", 0, 0)

won't move on past this line, even though the window shows when it gets to this line..

even using _IEAction($oLink, "click") freezes..

here's the link's href:

href="java script:submitAction_win0(document.win0,'$ICField5$hfind$0');"

i can get everything but this to work, and this is a crucial feature used often and if i can get it to work i can write many more scripts to handle our tasks... ive been using mouse position and clicks, but the links position changes...

any suggestions?

this is for work so time is of the escence according to my boss =P

thanks!

The onclick Javascript is blocking execution of your script until it returns control to the browser. You are setting "wait" to false, but unfortunately that is tied to a page load rather than to something tied to the event processing.

You'll need to take AutoIt out of that event processing loop in order to continue your script (so that you can click an alert for example). You can do this by simulating a link activation by giving focus to a specific link and then using Send or ControlSend to activate it... control returns immediately to AuoIt and you can continue.

For Example:

_IEAction($oLink, "focus")
Send("{Enter}")oÝ÷ ÚÚºÚ"µÍÒQPXÝ[Û    ÌÍÛÓ[Ë ][ÝÙØÝÉ][ÝÊBÌÍÚÛHÒQTÜQÙ]
    ÌÍÛÒQK  ][ÝÚÛ    ][ÝÊBÛÛÛÙ[
    ÌÍÚÛ    ][ÝÉ][ÝË    ][ÝÉ][ÝË    ][ÝÉ][ÝË    ][ÝÞÑ[I][ÝÊ

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

The onclick Javascript is blocking execution of your script until it returns control to the browser. You are setting "wait" to false, but unfortunately that is tied to a page load rather than to something tied to the event processing.

You'll need to take AutoIt out of that event processing loop in order to continue your script (so that you can click an alert for example). You can do this by simulating a link activation by giving focus to a specific link and then using Send or ControlSend to activate it... control returns immediately to AuoIt and you can continue.

For Example:

_IEAction($oLink, "focus")
Send("{Enter}")oÝ÷ ÚÚºÚ"µÍÒQPXÝ[Û    ÌÍÛÓ[Ë ][ÝÙØÝÉ][ÝÊBÌÍÚÛHÒQTÜQÙ]
    ÌÍÛÒQK  ][ÝÚÛ    ][ÝÊBÛÛÛÙ[
    ÌÍÚÛ    ][ÝÉ][ÝË    ][ÝÉ][ÝË    ][ÝÉ][ÝË    ][ÝÞÑ[I][ÝÊ

Dale

thanks a ton! your first option worked perfectly, the second not so much because for some reason it would move on without entering the value in the popup window. But the first one is great! thanks again, now i can impress my bosses even more! haha
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...