Enforcer Posted April 22, 2007 Share Posted April 22, 2007 got something like web page... (Peace of page) url: http://xdump.by.ru/bla.htmlThere exists Button MaxDSL Go URL and Image Button...I need to navigate from there and emulate click on it, then to 2 links from it - but its not so simple, and I can't do it by myself... Need Help of Expert...I was Tryed to do something like this, but it's not finished and have errors:#include <IE.au3>$oIE = _IECreate ("http://xdump.by.ru/bla.html",0,1);$oIE = _IECreate ("java script:%20oc(2,%201);",0,1)_IENavigate("java script:%20oc(2,%201);") ;<------------------;_IELinkClickByText("java script:%20oc(2,%201);")_IENavigate("http://192.168.173.66:8080/serviceStop/refresh/home?service=PrDSL9&group=2") _IENavigate("http://192.168.173.66:8080/serviceStop/refresh/home?service=PrDSL15&group=2") This need for our network - to automaticly enable Internet service ! - PLZ HELP ! [RU] Zone Link to comment Share on other sites More sharing options...
DaleHohm Posted April 22, 2007 Share Posted April 22, 2007 I looked at the source for the link you supplied and I din't see anything like the ("java script:%20oc(2,%201);" or http://192.168.173.66:8080/serviceStop/ref...SL9&group=2 you are trying to work with.You'll need to provide more, but preferably simpler, information.You may do better trying to get a reference to the object that you would typically click on (perhaps using _IETagNameGetCollection) and then using _IEAction($oXXX, "click")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 More sharing options...
Enforcer Posted April 22, 2007 Author Share Posted April 22, 2007 mdee... Page Secured a little... It's hard from me... How Identify objects ???... [RU] Zone Link to comment Share on other sites More sharing options...
DaleHohm Posted April 22, 2007 Share Posted April 22, 2007 Work through the _IE* examples in the helpfile. 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 More sharing options...
pacman1176 Posted April 27, 2007 Share Posted April 27, 2007 I have found in using the IE Navigate function that it doesn't allow you to enter javascript as if you entered it on an actual IE. It would just say page cannot be displayed. I fixed it by making the simple change inside of the function. Func _IENavigate2(ByRef $o_object, $s_Url, $f_wait = 1) If Not IsObj($o_object) Then __IEErrorNotify("Error", "_IENavigate2", "$_IEStatus_InvalidDataType") SetError($_IEStatus_InvalidDataType, 1) Return 0 EndIf ; If Not __IEIsObjType($o_object, "documentContainer") Then __IEErrorNotify("Error", "_IENavigate2", "$_IEStatus_InvalidObjectType") SetError($_IEStatus_InvalidObjectType, 1) Return 0 EndIf ; $o_object.navigate2 ($s_Url) If $f_wait Then _IELoadWait($o_object) SetError(@error) Return -1 EndIf SetError($_IEStatus_Success) Return -1 EndFunc ;==>_IENavigate2 The key change was in the line: $o_object.navigate2 ($s_Url) It is origionally $o_object.navigate This helped me use Javascript. Although your problem seems to be finding the right object. The page didn't load for me properly so I can't really tell. Link to comment Share on other sites More sharing options...
DaleHohm Posted April 27, 2007 Share Posted April 27, 2007 This helped me use Javascript.How so? 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 More sharing options...
Enforcer Posted April 27, 2007 Author Share Posted April 27, 2007 Some Proger heped me with my program but still exists few bugs... Take a look: #include <IE.au3> While 1 $var = Ping("217.26.150.5",2000) If $var = 0 Then $svar = Ping("192.168.170.66",400);SOME IP If $svar = 4 Then sleep(200) else $oIE = _IECreate ("http://some URL",0,1) $oForm = _IEFormGetObjByName ($oIE, "authenticateForm") $oQuery = _IEFormElementGetObjByName ($oForm, "username") $oQuery2 = _IEFormElementGetObjByName ($oForm, "password") _IEFormElementSetValue ($oQuery, "Some Login") _IEFormElementSetValue ($oQuery2, "Some Password") _IEFormSubmit ($oForm) _IENavigate($oIE,"java script:%20oc(2,%201);") ;<---------------- :) THIS WORKS TOO... _IENavigate($oIE,"http://192.168.173.66:8080/serviceStart/refresh/home?service=PrDSL9&group=2") ;<------ THIS JUST CANT WORK THERE, I NEED TO SIMULATE CLICK ON PICTURE BIUT I CANT... SO PROGRAM STILL NOT FINISHED... _IENavigate($oIE,"http://192.168.173.66:8080/serviceStart/refresh/home?service=PrDSL15&group=2") ;<------- THIS TOO... endif else sleep(60) endif sleep(5600) WEnd Soo... Here what we got [RU] Zone Link to comment Share on other sites More sharing options...
pacman1176 Posted April 27, 2007 Share Posted April 27, 2007 (edited) How so?There's a certain game web based game I play, where you can enter javascript into the address bar which produces the same result as clicking certain buttons. Entering the javscript with $o_object.navigate resulted in a page cannot be displayed, but changing it to $o_object.navigate2, it worked. I based the change off of VB6's .navigate2.I can show you the code if you need to see what I'm talking about. Just you though. Edited April 27, 2007 by pacman1176 Link to comment Share on other sites More sharing options...
DaleHohm Posted April 27, 2007 Share Posted April 27, 2007 I'd like to see an example of the javascript you enter into the address bar... 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 More sharing options...
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