magnifier512 Posted March 31, 2008 Share Posted March 31, 2008 I have a page with this button <input type="submit" value="» OK «" style="font-size: 10pt;" /> Now my problem is how to click this button. Usually I use "_IEGetObjById" or "_IEGetObjByName" but since this button doesn't have an ID or Name this didn't work. Link to comment Share on other sites More sharing options...
d4rk Posted March 31, 2008 Share Posted March 31, 2008 Wait .... have a look, if it a SUBMIT button, is sure won't have a ID or name, have a look at this in the UDFs "_IEFormSubmit" [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
magnifier512 Posted March 31, 2008 Author Share Posted March 31, 2008 (edited) $oIE = _IECreateEmbedded() $oFrame = _IEFrameGetObjByName($oIE, "main") $oQuery = _IEGetObjByName($oFrame, "submit") _IEAction($oQuery, "click") That are the commands I used for other buttons like this one <input name="submit" type="submit" value="Rekrutieren" style="font-size: 10pt;" /> However, I allready tried _IEFormSubmit ($oFrame) and it didn't work. Edited March 31, 2008 by magnifier512 Link to comment Share on other sites More sharing options...
Ealric Posted March 31, 2008 Share Posted March 31, 2008 $oIE = _IECreateEmbedded() $oFrame = _IEFrameGetObjByName($oIE, "main") $oQuery = _IEGetObjByName($oFrame, "submit") _IEAction($oQuery, "click") That are the commands I used for other buttons like this one <input name="submit" type="submit" value="Rekrutieren" style="font-size: 10pt;" /> However, I allready tried _IEFormSubmit ($oFrame) and it didn't work. _IEFormSubmit ($oQuery) My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic] Link to comment Share on other sites More sharing options...
magnifier512 Posted March 31, 2008 Author Share Posted March 31, 2008 my fault but this still won't work. I can't use _IEGetObjByName($oFrame,"submit") since the button doesn't have an entry "name=submit", same thing with the ID. The button only has entries for "type" and "value" (see first post). Is there any way to select it with this information? Link to comment Share on other sites More sharing options...
magnifier512 Posted April 1, 2008 Author Share Posted April 1, 2008 I got a solution $oObjects = _IETagNameGetCollection($oFrame, "input") For $oObject In $oObjects If StringInStr($oObject.value, "OK") Then _IEAction($oObject, "click") ExitLoop EndIf Next Link to comment Share on other sites More sharing options...
FreeFry Posted April 1, 2008 Share Posted April 1, 2008 I got a solution $oObjects = _IETagNameGetCollection($oFrame, "input") For $oObject In $oObjects If StringInStr($oObject.value, "OK") Then _IEAction($oObject, "click") ExitLoop EndIf Next Or just find the index of the submit element, and use $submitObj = _IEFormElementGetCollection($oForm, index-here) to get the correct object. Then click on it with _IEAction($submitObj, "click"). To find the index of the element, I've made this javascript code(I have to attach it, otherwise the forum fucks it up): Just paste that code into your webbrowsers address field when you're at the site, and it will tell you the index of all the elements with type=submit. (the index is the element[index-here] part) Link to comment Share on other sites More sharing options...
magnifier512 Posted April 1, 2008 Author Share Posted April 1, 2008 nice little script, thx 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