DaleHohm Posted September 18, 2006 Posted September 18, 2006 Any ideas?The text link needs to be an exact match. Notice in your source that "Dialing Plan " has a space after it. Include that and you shoudl be all set.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
mnchartier Posted September 19, 2006 Author Posted September 19, 2006 You have to be kidding me, thanks for picking that out.
mnchartier Posted September 19, 2006 Author Posted September 19, 2006 Okay, new problem, when I am setting menus in an area it opens a popup window to select an extension. I can not get any source off the popup, I can get a window name but can not attach the popup. It seems that the script stops until I actually select a link or close the popup then the script resumes. Here is the section of code from the main page, <TABLE ID=_mi CLASS=menu BORDER=0 CELLSPACING=0 CELLPADDING=0 width="100%"> <thead VALIGN=TOP ALIGN=LEFT> <TH></TH> <TH>Operation</TH> <TH>Ext</TH> <TH></TH> <TH>Operation</TH> <TH>Ext</TH> </thead> <TR VALIGN=TOP ALIGN=LEFT> <TD>0</TD> <TD><SELECT ID=A0></SELECT></TD> <TD nowrap ID=B0 class="c" onclick="DivC(0)" _ExtListID="" _ExtListName="" nowrap>---</TD> <TD width="2%" nowrap>8</TD> <TD><SELECT ID=A8></SELECT></TD> <TD nowrap ID=B8 class="c" onclick="DivC(8)" _ExtListID="" _ExtListName="">---</TD> This is what the site does when the link is clicked, this is the popup. expandcollapse popupfunction DivC(i) { var a= document.all, y= a("B" + i),xx; if(!y.disabled) { var x= a("A" + i), opt= x.selectedIndex; if(opt >= 0) { var opCode0 = a("A" + i).value; if (gEnableDeptAA) { if(i == 15) { if (opCode0 == 7 || opCode0 == 9 || opCode0 == 15) { // xx=new Array(dnoptNone, dnoptExtList); getExtList(); } } else { if (opCode0==5) { xx=new Array(dnoptVoiceMailLogin, dnoptMenus); getVal(xx); } else if (opCode0==7 || opCode0==15) { xx=new Array(dnoptOperator, dnoptTelephones, dnoptMAE, dnoptWorkgroups, dnoptNightbell, dnoptRoutepoints, dnoptHuntGroups); // xx=new Array(dnoptOperator, dnoptTelephones, dnoptMAE, dnoptWorkgroups, dnoptNightbell, dnoptRoutepoints); getVal(xx); } else if (opCode0==9) { xx=new Array(dnoptMailboxes, dnoptWorkgroupMailboxes); getVal(xx); } else if (opCode0==1 || (opCode0 > 11 && opCode0 < 15)) { // xx=new Array(dnoptNone, dnoptExtList); getExtList(); } event.cancelBubble= true;
DaleHohm Posted September 19, 2006 Posted September 19, 2006 That's actually a pretty involved question to pile onto an existing topic. The answer depends on whether the popup is an HTML window or a standard windows dialog. One way to figure that out is to use AutoIt Window Info and see if it contains the control Internet Explorer_Server1, if so it is an HTML window and you can _IEAttach to it as a dialogbox. If not, use standard AutoIt Win* functions. If it is the later, it likely stalls script execution until you click it. If this is the case, there are several other topics that deal with that situation and use .focus, Send or ControlSend as part of the solution. Those keywords may be enough for you to find them with search. 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
mnchartier Posted September 19, 2006 Author Posted September 19, 2006 (edited) Well here is the info from the AutoIT infoPress CTRL-ALT-F to freeze the display.>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: Dialing Numbers -- Web Page DialogClass: Internet Explorer_TridentDlgFrameSize: X: 440 Y: 160 W: 400 H: 480>>>>>>>>>>> Mouse Details <<<<<<<<<<<Screen: X: 562 Y: 177Cursor ID: 2>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: 0x365390 Dec: 3560336>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size:Control ID:ClassNameNN:Text:>>>>>>>>>>> Status Bar Text <<<<<<<<<<<(1): http://10.99.0.10/shorewaredirector/pop_up...deExt=undefined(2): Trusted sites>>>>>>>>>>> Visible Window Text <<<<<<<<<<<http://10.99.0.10/shorewaredirector/pop_up...deExt=undefined????>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<I'm thinking that I should be able to use this some how for referencing it ; Class: Internet Explorer_TridentDlgFrameI have tried the _IEAttach("Dialing Numbers -- Web Page Dialog","Title")and with the window controls, and either way the script pauses until I close that web dialog box Edited September 20, 2006 by mnchartier
mnchartier Posted September 20, 2006 Author Posted September 20, 2006 Did some more testing on this tried to use a submit form to click the link that failed but then the script continued to run. This is the code that I am using for this section Func AutoAttend() Call ("MainFrame") $TOCPANE = _IEFrameGetObjByName ($Director, "TOCPANE") ; TOC Frame Frame #3 _IELinkClickByText($TOCPANE, "Auto-Attendant Menus") ; Selects Auto-Attendant Menus Link $Text = _IEFrameGetObjByName ($Director, "TEXT") ; Grabs the right Pane _IELinkClickByText($Text, "Add new ") ; Clicks on Go to add new User _IELoadWait($Director) ; Waits for Page to load $Info = WinExists("Information Bar") If $Info = 1 Then WinClose("Information Bar") ;close info window if it exists EndIf $ScheduleIDObj = _IEGetObjByName($Text, "ScheduleID") ; grabs schedule object _IEFormElementOptionselect ($ScheduleIDObj,"Open Hrs", 1, "byText") ; selects Open Hrs for schedule $PoundObj = _IEGetObjByName($Text,"A11") ; selects A11 which is the # function of the Auto Attendant _IEFormElementOptionselect($PoundObj,"Dial by first name",1,"byText") ; selects Dial by First Name $StarObj = _IEGetObjByName($Text,"A10") ; selects A10 which is * function on the auto attendant _IEFormElementOptionselect($StarObj,"Go to Menu",1,"byText") ; selects Go to Menu on the Auto Attendant $B10Obj = _IEGetObjByName($Text,"B10") ; selects the B10 link to select Voice Mail Login extension $B10 = _IEAction($B10Obj,"click") ; Clicks on B10 $PopUp = _IEAttach("Dialing Numbers -- Web Page Dialog","DialogBox") ; Attaches to the PopUp Dialog Box MsgBox(1,"Attach",@extended) ; checks to see if the _IEAttach was successful $sHTML = _IEDocReadHTML ($PopUp) ; Read the HTML source of the Dialog Box MsgBox(0, "Document Source", $sHTML) ; Display the Source EndFunc This is were the script pauses until I close out the dialog box $B10 = _IEAction($B10Obj,"click") ; Clicks on B10 I have tried winexists and also winwaitactive immediately after the above line and it only hits the next line after I close out the dialog box.
DaleHohm Posted September 20, 2006 Posted September 20, 2006 See this post for a technique you can use to work around this.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
mnchartier Posted September 20, 2006 Author Posted September 20, 2006 I'll give that a try, but my actual goal is to select a link that is on that window.
DaleHohm Posted September 20, 2006 Posted September 20, 2006 You can give focus to a link in the same way and then SEND a SPACE to activate it. 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
mnchartier Posted September 21, 2006 Author Posted September 21, 2006 So it would be something like this [autoit] $B10Obj = _IEGetObjByName($Text,"B10") ; selects the B10 link to select Voice Mail Login extension $B10 = _IEAction($B10Obj,"click") ; Clicks on B10 $B10.focus expandcollapse popup not sure on this never had to do it before, I'm still kind of new at this. Should the focus be on the link that I click that opens the window or to the window itself? (adsbygoogle = window.adsbygoogle || []).push({}); DaleHohm Posted September 21, 2006 DaleHohm MVPs 5.9k 11 Think of IE as an API... Posted September 21, 2006 No, like this: $B10Obj = _IEGetObjByName($Text,"B10") ; selects the B10 link to select Voice Mail Login extension ;;;;$B10 = _IEAction($B10Obj,"click") ; Clicks on B10 $B10.focus Send("{SPACE}") 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
mnchartier Posted September 21, 2006 Author Posted September 21, 2006 Used this $B10Obj = _IEGetObjByName($Text,"B10") ; selects the B10 link to select Voice Mail Login extension $B10Obj.focus Send("{SPACE}") And the window never comes up, also tried with ENTER.
DaleHohm Posted September 21, 2006 Posted September 21, 2006 Used this $B10Obj = _IEGetObjByName($Text,"B10") ; selects the B10 link to select Voice Mail Login extension $B10Obj.focus Send("{SPACE}") And the window never comes up, also tried with ENTER.Check IsObj() and ObjName() on your $B10Obj Check your source code to what sort of onXxxx event is tied to it... if it is onclick I would expect this to work. 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now