Voryn Posted October 20, 2008 Share Posted October 20, 2008 Hi there, as mentioned in the topic im looking for a solution for the following problem: I want to submit a form where the sumbit button hasn't an id or name. Here's the HTML Code with the button i want to trigger: <table cellspacing="0" cellpadding="0" border="0" class="class1"> <tr> <td class="submit" colspan="3"><input onfocus="func();" class="class2" type="button" value="send it!"></td> </tr> </table> Any ideas? Link to comment Share on other sites More sharing options...
Bert Posted October 20, 2008 Share Posted October 20, 2008 Is the form web based? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Voryn Posted October 20, 2008 Author Share Posted October 20, 2008 Yes. What i missed to mention: i can't trigger it via collection index because the form isn't static in it's elements so the index would change from time to time. Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 20, 2008 Share Posted October 20, 2008 Hi there, as mentioned in the topic im looking for a solution for the following problem: I want to submit a form where the sumbit button hasn't an id or name. Here's the HTML Code with the button i want to trigger: <table cellspacing="0" cellpadding="0" border="0" class="class1"> <tr> <td class="submit" colspan="3"><input onfocus="func();" class="class2" type="button" value="send it!"></td> </tr> </table> Any ideas? Use the IE.au3 UDF, get the collection of "input" tags, loop through the collection looking for .value = "send it!". Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Voryn Posted October 20, 2008 Author Share Posted October 20, 2008 Use the IE.au3 UDF, get the collection of "input" tags, loop through the collection looking for .value = "send it!". Mhm i'm allready using some functions of the IE UDF but i guess to crawl through the collection is a bit too advanced for my current AutoIt skills, could you spare a code example with me? Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 20, 2008 Share Posted October 20, 2008 Mhm i'm allready using some functions of the IE UDF but i guess to crawl through the collection is a bit too advanced for my current AutoIt skills, could you spare a code example with me? Something like this: #include <IE.au3> $oIE = _IECreate("http://your.site.com") ; This may need more drilling down into the DOM... $colInputs = _IETagNameGetCollection($oIE, "input") $sMsg = "" For $oInput In $colInputs $sMsg &= "Input type=" & $oInput.type & ", value=" & $oInput.value & @CRLF If String($oInput.value) = "send it!" Then MsgBox(64, "Found", "Found 'send it!' input...") Next MsgBox(0, "Input Tags", $sMsg) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Voryn Posted October 20, 2008 Author Share Posted October 20, 2008 Something like this: #include <IE.au3> $oIE = _IECreate("http://your.site.com") ; This may need more drilling down into the DOM... $colInputs = _IETagNameGetCollection($oIE, "input") $sMsg = "" For $oInput In $colInputs $sMsg &= "Input type=" & $oInput.type & ", value=" & $oInput.value & @CRLF If String($oInput.value) = "send it!" Then MsgBox(64, "Found", "Found 'send it!' input...") Next MsgBox(0, "Input Tags", $sMsg) You're awesome mate I'll check it out tomorrow. Greetings from germany, voryn Link to comment Share on other sites More sharing options...
Voryn Posted October 21, 2008 Author Share Posted October 21, 2008 You're awesome mate I'll check it out tomorrow.Greetings from germany, vorynMhm i tried around with this a little now but i have no clue how to use this so i can actually trigger my result with _IEAction($whatever,"click") Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 21, 2008 Share Posted October 21, 2008 Mhm i tried around with this a little now but i have no clue how to use this so i can actually trigger my result with _IEAction($whatever,"click") Like this: #include <IE.au3> $oIE = _IECreate("http://your.site.com") ; This may need more drilling down into the DOM... $colInputs = _IETagNameGetCollection($oIE, "input") $sMsg = "" For $oInput In $colInputs If String($oInput.value) = "send it!" Then _IEAction($oInput, "click") MsgBox(64, "Click", "Clicked on 'send it' input tag.", 5) ExitLoop EndIf Next Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Voryn Posted October 21, 2008 Author Share Posted October 21, 2008 It finally works, thanks for helping out a noob Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 21, 2008 Share Posted October 21, 2008 It finally works, thanks for helping out a noob You're welcome. I'm not that far off noobiness myself. (Yes, that's a word.) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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