Jump to content

_IE set value of checkbox on win x64


Recommended Posts

Hello,

I've been trying to set a checkbox on html page but i always get a warning: _IEFormElementCheckboxSelect, $_IEStatus_NoMatch

When i tried this script on a different computer (32bit) it worked like a charm.

I was wondering if this is a bug or is my implementation is wrong.

I would like to run this script on x64 and x86 so i there a way to implement this code that will work on both os'ses

#include <IE.au3>
$oIE = _IECreate("http://www.somepagewithcheckbox")
$oForm = _IEFormGetCollection ($oIE, 1)
_IEFormElementCheckboxSelect ($oForm,0,"",1,"byIndex")

I tried the "byValue"-thing but i gives the same error (warning)

HTML code of checkbox:

<input name="agree" type="checkbox" id="agree" value="true" onchange="ckRegForm()" />

Jannick

Link to comment
Share on other sites

I see no reason that this should work differently on x64, the function does nothing exotic.

Based on the HTML you supplied, I would try this call:

_IEFormElementCheckboxSelect ($oForm,"true","agree",1,"byValue")

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

Hi DaleHohm, tnx for replying

I suspect it can have something to do with the installation of autoit on my 64bit machine or that it is in fact a bug.

I took some screenshots, 1 on my 64-bit and 1 on my 32 bit machine.

As you can see, my 64-bit machine gives _IEFormElementCheckboxSelect, $_IEStatus_NoMatch

I would like to give you more info on my machine but i don't know what kind of info you might be interesting in.

Another differnce between my 2 computers is that my 64-bit machine uses ie6 and my 32-bit machine uses ie7 (could this have something to do with my problem)

Can you tell me if the uninstall of autoit 3.2.2.0 will in fact uninstall and erease all setting on my computer or should i manually delete some setting.

Tnx in advance

Script + screenshots

Link to comment
Share on other sites

OK, my best guess is that in fact the HTML source for that page is invalid (breaks some rules...). Different browser versions do a better job of recovering from such things thatn others.

I suggest that you run the page source through the W3C HTML Validator service (http://validator.w3c.org -- or see my sig). Repair the source if you have access to it. If you do not, there are almost always ways to work around it once we know whta the trouble is.

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