Jump to content

Checking Boxes in Internet Explorer or Mozilla


Recommended Posts

How did that have anything to do with the problem at hand?

@milkman - look at IE.au3... it might be able to help (at least with automation, not sure about checking boxes or anything.. haven't tried).

http://www.autoitscript.com/forum/index.php?showtopic=13398

ie.au3 is definitely the way to go, it can check boxes etc assuming that they are in an html form, and it's not a java app or anything. also, just my $.02, while i would agree with you that the mocking post was not very professional, i must still admit that i laughed, and was relieved someone else did it so i wouldn't have to. In the OP's defense though, they're looking to automate the game, so it can be assumed they're not looking to really enjoy playing it.
Link to comment
Share on other sites

Ive looked through IE.au3, but would the check boxes be considered a form? WHich function would I use.

Also in my defense, this was requested by a member at a site I belong to. =P

Are check boxes considered forms?

Edited by milkman
Link to comment
Share on other sites

Check boxes are part of forms...

#)

EDIT: supply the source code of the website please.

Edited by nfwu
Link to comment
Share on other sites

I found the part of the source where it talks about the check boxes, unfortunitally they have the same name. How can I check them both.

<input type=checkbox name=wep[]value=4412336f82d63></td>

<td align=center bgcolor=white width=25%>

<img src='images/items/battlehammer.png' width=90 height=90 border=0 alt='Battle Hammer'>

<br>

<input type=checkbox name=wep[] value=4410936c812b4></td>

Link to comment
Share on other sites

This example opens the AutoIt forum search page and toggles the sortby radiobuttons. An identical technique can be used with checkboxes.

#include <IE.au3>

$oIE = _IECreate()
_IENavigate($oIE, "http://www.autoitscript.com/forum/index.php?act=Search&f=")

$oFrom = _IEFormGetObjByName($oIE, "sForm")
$oRelevant = _IEFormElementGetObjByName($oFrom, "sortby", 0)
$oRecent = _IEFormElementGetObjByName($oFrom, "sortby", 1)

For $i = 1 to 5
    $oRelevant.checked = True
    Sleep(1000)
    $oRecent.checked = True
    Sleep(1000)
Next

might want to try the IE.au3 Builder .... its in my signature below

8)

NEWHeader1.png

Link to comment
Share on other sites

I get this error when I run the script

C:\Program Files\AutoIt3\beta\Include\IE.au3 (848) : ==> Variable must be of type "Object".:

If IsObj($o_object.elements.item ($s_name, $i_index)) Then

If IsObj($o_object^ ERROR

Link to comment
Share on other sites

I found the part of the source where it talks about the check boxes, unfortunitally they have the same name. How can I check them both.

You should check out the discussion of checkboxes and radio buttons here

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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