warren Posted September 19, 2009 Posted September 19, 2009 (edited) Hi: I am new to this forum,and also a newbie to the autoit.my problem is I can't click a button to enter a website,the website's source code is below: <input type="button" class="button" value="Cancel Purchase > >" onclick="locationjump('act=paysubs&nocp=1&CODE=cancel');" /> my autoit code is below: $oInputs = _IETagNameGetCollection($oIE,"input") For $oInput In $oInputs if $oInput.value = "Cancel Purchase > > " Then _IEAction($oInput,"click") ExitLoop EndIf Next but the click doesn't work,what mistake I make?please help me,thanks in advance Edited September 19, 2009 by warren
PsaltyDS Posted September 19, 2009 Posted September 19, 2009 Hi: I am new to this forum,and also a newbie to the autoit.my problem is I can't click a button to enter a website,the website's source code is below: <input type="button" class="button" value="Cancel Purchase > >" onclick="locationjump('act=paysubs&nocp=1&CODE=cancel');" /> my autoit code is below: $oInputs = _IETagNameGetCollection($oIE,"input") For $oInput In $oInputs if $oInput.value = "Cancel Purchase > > " Then _IEAction($oInput,"click") ExitLoop EndIf Next but the click doesn't work,what mistake I make?please help me,thanks in advance Did you try it without translating the ">" strings: if $oInput.value = "Cancel Purchase > >" Then 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
warren Posted September 19, 2009 Author Posted September 19, 2009 Did you try it without translating the ">" strings: if $oInput.value = "Cancel Purchase > >" Then Thank you for reply I run it under SCITE with debug mode on,so I see the _IEAction is actually run.but doesn't work.
PsaltyDS Posted September 21, 2009 Posted September 21, 2009 Thank you for replyI run it under SCITE with debug mode on,so I see the _IEAction is actually run.but doesn't work.Use Example 2 from the help file under _IEAction(), where it gives focus to the element and then sends "{ENTER}" to it instead. 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
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