Jump to content

Select arrow with Auto-IT


Recommended Posts

Hi all,

I'm very new to Auto-IT, I've been given the task of updating scripts developed by someone else. I've run into a problem trying to re-order a list on a certain web page on IE. I can select the table row, but when I try to select the up button I can't seem to get it to work, running this command on the page -

Local $oInputs = _IETagNameGetCollection($sobj, "INPUT")

For $oInput In $oInputs

c(StringStripWS($oInput.value, 3))

.

.

where $sobj is the window & 'c()' is a comment, I get this result -

2010-08-05_161124: j_id7

2010-08-05_161124: 0

2010-08-05_161124: j_id853:j_id924

2010-08-05_161124: auditStatus

2010-08-05_161124: 4

2010-08-05_161124: efewf

2010-08-05_161124: ewfewf

2010-08-05_161124: Add

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: Edit

2010-08-05_161124: Delete

2010-08-05_161124: 0

2010-08-05_161124: 0

2010-08-05_161124: j_id853:j_id924

2010-08-05_161124: OK

2010-08-05_161124: OK

2010-08-05_161124: X

2010-08-05_161124: efewf

2010-08-05_161124: efewf

2010-08-05_161124: Ok

2010-08-05_161124: Cancel

2010-08-05_161124: Add

2010-08-05_161124: Cancel

2010-08-05_161124: Delete

2010-08-05_161124: Cancel

the code for the arrow I want to select looks like this, where I want to select 'moveUpBut' -

</div>

<div id="shiftRow"><span id="auditStatus:j_id86">Shift Row</span><input id="auditStatus:moveUpBut" name="auditStatus:moveUpBut" onclick="A4J.AJAX.Submit('auditStatus:j_id60','auditStatus',event,{'oncomplete':function(request,event,data){disableConfigMgmtonload('auditStatus', 'statusLabelTable');},'parameters':{'auditStatus:moveUpBut':'auditStatus:moveUpBut'} ,'actionUrl':'/aud-web/jsp/ManageStatusLabels.jsf'} );return false;" class="shiftRowUp" type="button" /><br /><input id="auditStatus:moveDownBut" name="auditStatus:moveDownBut" onclick="A4J.AJAX.Submit('auditStatus:j_id60','auditStatus',event,{'oncomplete':function(request,event,data){disableConfigMgmtonload('auditStatus', 'statusLabelTable');},'parameters':{'auditStatus:moveDownBut':'auditStatus:moveDownBut'} ,'actionUrl':'/aud-web/jsp/ManageStatusLabels.jsf'} );return false;" class="shiftRowDown" type="button" />

</div>

Please let me know if there's more info you need to help. Any help is very much appreciated :blink:

Link to comment
Share on other sites

That seems way over complicated. What's the point of listing all the other INPUT tags?

$oUpButton = _IEGetObjByName($obj, "auditStatus:moveUpBut")
_IEAction($oUpButton, "click")

You might use _IEFormElementGetObjByName() vice _IEGetObjByName(), and if _IEAction() doesn't trigger the onclick event for it, try the other tricks in the help file under that function.

:blink:

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

That seems way over complicated. What's the point of listing all the other INPUT tags?

$oUpButton = _IEGetObjByName($obj, "auditStatus:moveUpBut")
_IEAction($oUpButton, "click")

You might use _IEFormElementGetObjByName() vice _IEGetObjByName(), and if _IEAction() doesn't trigger the onclick event for it, try the other tricks in the help file under that function.

:blink:

Thanks PsaltyDS,

That done the trick!

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...