Zap Posted March 2, 2006 Share Posted March 2, 2006 heres the infohttp://img217.imageshack.us/img217/1866/13qi.pngall i want to do is click on to that image, which turns out not to be an image :Sany ideas?please keep in mind that i am a beginner at this Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 2, 2006 Moderators Share Posted March 2, 2006 (edited) Take a peak at IE.au3, and if you have tried that already, post what you've tried.Edit:Sorry here's the link: http://www.autoitscript.com/forum/index.php?showtopic=13398 Edited March 2, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
DaleHohm Posted March 2, 2006 Share Posted March 2, 2006 heres the infohttp://img217.imageshack.us/img217/1866/13qi.pngall i want to do is click on to that image, which turns out not to be an image :Sany ideas?please keep in mind that i am a beginner at this Zap, I know that you created code that was getting you pretty close in the PM's we exchanged. Please don't start over -- post the code you have and the last issue you were facing. You got to the point where you needed more help with basic debugging techniques than you did with IE.au3Dale 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...
Zap Posted March 2, 2006 Author Share Posted March 2, 2006 Ok heres what i've got for this part $src = "hero/itemicons/lowmace.jpg" $oInputs = _IETagNameGetCollection($o_IE, "input") For $oInput in $oInputs If $oInput.src = $src Then $oInput.click ExitLoop EndIf Next ConsoleWrite($oInput.src & @CR) <--- not sure what this one does tho :S Link to comment Share on other sites More sharing options...
Zap Posted March 3, 2006 Author Share Posted March 3, 2006 Still having trouble click on this thing whatever it is$src = "hero/itemicons/ironknife.jpg"$oInputs = _IETagNameGetCollection($oIE, "input")For $oInput in $oInputs If $oInput.src = $src Then ConsoleWrite($oInput.src & @CR) $oInput.click ExitLoop EndIfNexthttp://img217.imageshack.us/img217/1866/13qi.png is what i want to click and the info with it anyone able to gimme a few pointers? Link to comment Share on other sites More sharing options...
DaleHohm Posted March 3, 2006 Share Posted March 3, 2006 Ok heres what i've got for this part $src = "hero/itemicons/lowmace.jpg" $oInputs = _IETagNameGetCollection($o_IE, "input") For $oInput in $oInputs If $oInput.src = $src Then $oInput.click ExitLoop EndIf Next ConsoleWrite($oInput.src & @CR) <--- not sure what this one does tho :SPut the ConsoleWrite inside the For loop and it will should you the image source for each input element. Also, if you're not using SciTe, a MsgBox will suit you better. Might also want to check the input element "type" so that you only examine the type=image elements: $src = "hero/itemicons/lowmace.jpg" $oInputs = _IETagNameGetCollection($o_IE, "input") For $oInput in $oInputs If $oInput.type = "image" Then MsgBox(0, "Image Source", $oInput.src) If $oInput.src = $src Then $oInput.click ExitLoop EndIf EndIf Next 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...
Zap Posted March 4, 2006 Author Share Posted March 4, 2006 i did what you said but i am still getting the same error as before Link to comment Share on other sites More sharing options...
DaleHohm Posted March 4, 2006 Share Posted March 4, 2006 i did what you said but i am still getting the same error as beforeSorry, you haven't posted enough to help you. You'll need to post the error messsage and enough code to put it in context.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...
Zap Posted March 4, 2006 Author Share Posted March 4, 2006 http://img460.imageshack.us/img460/6947/18yn.pngis the error i am still getting :S Link to comment Share on other sites More sharing options...
DaleHohm Posted March 4, 2006 Share Posted March 4, 2006 http://img460.imageshack.us/img460/6947/18yn.pngis the error i am still getting :SSorry, if you want help you'll go back and reread my last reply and try again -- I won't try to drag it out of you.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...
nfwu Posted March 4, 2006 Share Posted March 4, 2006 Assuming you are using beta, does the collection "input" exist in the ... Wait a moment, i need more code... Go back to the declaration of $o_IE and everything up to the part that you break down. TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
Zap Posted March 4, 2006 Author Share Posted March 4, 2006 #include <IE.au3> $o_IE = _IECreate () _IENavigate ($o_IE, "http://www.herorpg.net/herorpg.php") _IEClickLinkByText ($o_IE, "Hunt") $oForm = _IEFormGetObjByName($o_IE, "battle") _IEFormSubmit($oForm) ;$oForm1 = _IEFormGetObjByName($o_IE, "fight") ;_IEFormSubmit($oForm1) ;$oSubmit = _IEFormElementGetObjByName($oForm1, "attack") ;$oSubmit.click ;$src = "hero/itemicons/ironknife.jpg" ;$oInputs = _IETagNameGetCollection($o_IE, "input") ;For $oInput in $oInputs ; If $oInput.type = "image" Then ; MsgBox(0, "Image Source", $oInput.src) ; If $oInput.src = $src Then ; $oInput.click ; ExitLoop ; EndIf ; EndIf ;Next is what i have and everything in ; wont work. Dale this is my 1st so called bot i have really no idea what i am doing its just this one part thats got me stuck after this i can do everything by myself Link to comment Share on other sites More sharing options...
DaleHohm Posted March 4, 2006 Share Posted March 4, 2006 #include <IE.au3> $o_IE = _IECreate () _IENavigate ($o_IE, "http://www.herorpg.net/herorpg.php") _IEClickLinkByText ($o_IE, "Hunt") $oForm = _IEFormGetObjByName($o_IE, "battle") _IEFormSubmit($oForm) ;$oForm1 = _IEFormGetObjByName($o_IE, "fight") ;_IEFormSubmit($oForm1) ;$oSubmit = _IEFormElementGetObjByName($oForm1, "attack") ;$oSubmit.click ;$src = "hero/itemicons/ironknife.jpg" ;$oInputs = _IETagNameGetCollection($o_IE, "input") ;For $oInput in $oInputs ; If $oInput.type = "image" Then ; MsgBox(0, "Image Source", $oInput.src) ; If $oInput.src = $src Then ; $oInput.click ; ExitLoop ; EndIf ; EndIf ;Next is what i have and everything in ; wont work. Dale this is my 1st so called bot i have really no idea what i am doing its just this one part thats got me stuck after this i can do everything by myselfOne likely issue is that it is trying to get element information from a page that has not yet loaded. After your $oSubmit.click add the line _IELoadWait($o_IE) This will make the script wait until the page is fully loaded before it moves to the next command. Most of the IE.au3 commands that cause page loads on this have an _IELoadWait built into them, but since you are interacting directly with the .click method you need to manage this yourself. Dale 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...
Zap Posted March 4, 2006 Author Share Posted March 4, 2006 Thanks i got it working now 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