Jump to content

Recommended Posts

Posted

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? :P

Posted

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.

Posted

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? :P

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
Posted

Use the IE.au3 UDF, get the collection of "input" tags, loop through the collection looking for .value = "send it!".

:P

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? :(

Posted

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? :P

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
Posted

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)

:P

You're awesome mate :(

I'll check it out tomorrow.

Greetings from germany, voryn

Posted

You're awesome mate :P

I'll check it out tomorrow.

Greetings from germany, voryn

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")

Posted

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

:P

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...