gunnagitcha Posted January 11, 2007 Posted January 11, 2007 so you see here the button "mine" well i was wondering if there was a way to make it click the button other than the ghetto rig way ive been using (pixelsearch) im pretty sure ive seen stuff like it but in my limited knowledge of autoit and coding i don't know what it is >.< if it involves the source this is all ive found<input type=button value=" Mine " name=y1g8ngz onclick="x10d99c(y1g8ngz);"> <input type=hidden name=buttoncheck value="&b8uf&"> <a href=.></a><a href=.></a>
Psibernetic Posted January 11, 2007 Posted January 11, 2007 I attempted to do some research for you in IE_click...but I got stumped...never could get it to work... I would reecommend a quick fix hehe... CODE $neededTabs= ;test it manually and input here..though im sure you figured that out on your own $Counter=0 While $Counter<$neededTabs send("{tab}") $Counter=$Counter+1 WEnd send("{Enter}") [sup]Psibernetic[/sup]My Creations:X-HideSecuracy
gunnagitcha Posted January 11, 2007 Author Posted January 11, 2007 I attempted to do some research for you in IE_click...but I got stumped...never could get it to work... I would reecommend a quick fix hehe... CODE$neededTabs= ;test it manually and input here..though im sure you figured that out on your own$Counter=0While $Counter<$neededTabs send("{tab}") $Counter=$Counter+1WEndsend("{Enter}")yea i think _IEFormSubmit is something i need to check into but i have no clue how to use it
DaleHohm Posted January 11, 2007 Posted January 11, 2007 Unless there are some hidden complexities, you should be able to easily do this with IE.au3. You must first get a reference to the IE window with _IEAttach (or _IECreate if you can go directly to this URL). Then use _IEGetObjByName to get a reference to the button, followed by an _IEAction to click on it. For example: #include <IE.au3> $oIE = _IEAttach("the document title goes here") $oButton = _IEGetObjByName($oIE, "y1g8ngz") _IEAction($oButton, "click") _IELoadWait($oIE) ; optional 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
gunnagitcha Posted January 11, 2007 Author Posted January 11, 2007 (edited) Unless there are some hidden complexities, you should be able to easily do this with IE.au3. You must first get a reference to the IE window with _IEAttach (or _IECreate if you can go directly to this URL). Then use _IEGetObjByName to get a reference to the button, followed by an _IEAction to click on it. For example: #include <IE.au3> $oIE = _IEAttach("the document title goes here") $oButton = _IEGetObjByName($oIE, "y1g8ngz") _IEAction($oButton, "click") _IELoadWait($oIE) ; optional Dale thats what im looking for, however the button changed i guess because now when i look at the source it says this <img scr=i/w/sp_.gif height=8><img src=i/w/sp_.gif height=5><br> <input type=button value=" Mine " name=yitc4a onclick="x16m7un(yitc4a);"> <input type=hidden name=buttoncheck value="&br7d&"> <a href=.></a> so im thinking it needs to click on the sp_.gif so how would you do that never mind on the whole sp_.gif thing because it is everywhere throughout the source any clue what to do >.< *edit #2* ive been messing around and this is what happens, every time the page refreshes the name changes for the button, but if you use the name it does work, but i was hoping to loop this action :\ so every time the page refreshes the 6 digit number/letter combination changes so is there any other way to get it to use that button? Edited January 11, 2007 by gunnagitcha
DaleHohm Posted January 12, 2007 Posted January 12, 2007 (edited) A little more complicated, but see if this makes sense: #include <IE.au3> $oIE = _IEAttach("the document title goes here") $oInputs = _IETagNameGetCollection($oIE, "input") For $oInput in $oInputs If String($oInput.value) = " Mine " Then _IEAction($oInput, "click") ExitLoop EndIf Next _IELoadWait($oIE) ; optional Dale Edit: typo in example Edited January 12, 2007 by DaleHohm 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
gunnagitcha Posted January 12, 2007 Author Posted January 12, 2007 A little more complicated, but see if this makes sense: #include <IE.au3> $oIE = _IEAttach("the document title goes here") $oInputs = _IETagNameGetCollection($oIE, "input") For $oInput in $oInputs If String($oInput.value) = " Mine " Then _IEAction($oInput, "click") ExitLoop EndIf Next _IELoadWait($oIE) ; optional Dale Edit: typo in example makes total sense and works perfectly thanks a whole whole bunch
gunnagitcha Posted January 17, 2007 Author Posted January 17, 2007 makes total sense and works perfectly thanks a whole whole bunch that code worked fine for a while but i think they changed the site.....now the source for the button is this..... <script language="javascript"> function xvgnlz(obj) { if(obj.value == " Mine ") when i run the old script on the page it says For $oInput in $oInputs^ ERROR Error: Variable must be of type "Object".
Moderators big_daddy Posted January 17, 2007 Moderators Posted January 17, 2007 that code worked fine for a while but i think they changed the site.....now the source for the button is this..... <script language="javascript"> function xvgnlz(obj) { if(obj.value == " Mine ") when i run the old script on the page it saysThat is definitely not the source for the button, maybe the function that is linked to the onclick event of the button, but not the button itself.
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