Jump to content

Different ways to click a button


nbala75
 Share

Recommended Posts

If an element has no name or id, then you can either get a collection of all matching elements (all INPUT tags, for example), and then loop through the collection looking for an attribute you have, like value or innnerText.

Another technique I have used is to get it relative to another element the does have an id or name. You can find parent, child, nextSibling, etc. to get the one you want.

:)

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

Get the collection of all INPUT tags with _IETagNameGetCollection(), then loop through the collection to find the one with .value = "Cancel". There is a demo script in the help file.

:)

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

Thanx for ur help and will try that function

Btw i have another issue

This sounds weird for me....still better to ask experts. I have been trying to sort this from yday evening but nothing moves on...and i dont want to open a new thread for this...hope u read this and help me out

Look at this simple code and tell me why this is not working out...

MsgBox(0,$tprice&" "&$osl+0.05) ;Msgbox 1

If $tprice=$osl+0.05 then

MsgBox(0,"","iam inside loop") ;Msgbox 2

Endif

Msgbox 1 pops out msg giving out both the values as given below:--

Posted Image

I can see both the values are same and still it is not going inside the If condition loop and the Msgbox 2 never fires....i really dont know what iam missing here.... looks weird for me :);)

Link to comment
Share on other sites

MsgBox(0,$tprice&" "&$osl+0.05) ;Msgbox 1

If $tprice=$osl+0.05 then

MsgBox(0,"","iam inside loop") ;Msgbox 2

Endif

$tprice = 50.1

$osl = 50.05

MsgBox(0,"Title", $tprice & " " & $osl + 0.05) ;Msgbox 1

If StringCompare($tprice, $osl+0.05) = 0 then

MsgBox(0,"Title","iam inside loop") ;Msgbox 2

Endif

Edited by rogue5099
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...