Jump to content

need some more help clicking buttons in ie


Recommended Posts

Posted Image

so you see here the button "mine" well i was wondering if there was a way to make it click the button other than the ghetto rig way ive been using (pixelsearch) im pretty sure ive seen stuff like it but in my limited knowledge of autoit and coding i don't know what it is >.< if it involves the source this is all ive found

<input type=button value=" Mine " name=y1g8ngz onclick="x10d99c(y1g8ngz);">
        
        <input type=hidden name=buttoncheck value="&b8uf&">
        <a href=.></a><a href=.></a>
Link to comment
Share on other sites

I attempted to do some research for you in IE_click...but I got stumped...never could get it to work... I would reecommend a quick fix hehe...

CODE

$neededTabs= ;test it manually and input here..though im sure you figured that out on your own

$Counter=0

While $Counter<$neededTabs

send("{tab}")

$Counter=$Counter+1

WEnd

send("{Enter}")

[sup]Psibernetic[/sup]My Creations:X-HideSecuracy

Link to comment
Share on other sites

I attempted to do some research for you in IE_click...but I got stumped...never could get it to work... I would reecommend a quick fix hehe...

CODE

$neededTabs= ;test it manually and input here..though im sure you figured that out on your own

$Counter=0

While $Counter<$neededTabs

send("{tab}")

$Counter=$Counter+1

WEnd

send("{Enter}")

yea i think _IEFormSubmit is something i need to check into but i have no clue how to use it :)

Link to comment
Share on other sites

Unless there are some hidden complexities, you should be able to easily do this with IE.au3.

You must first get a reference to the IE window with _IEAttach (or _IECreate if you can go directly to this URL). Then use _IEGetObjByName to get a reference to the button, followed by an _IEAction to click on it. For example:

#include <IE.au3>
$oIE = _IEAttach("the document title goes here")
$oButton = _IEGetObjByName($oIE, "y1g8ngz")
_IEAction($oButton, "click")
_IELoadWait($oIE) ; optional

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

Unless there are some hidden complexities, you should be able to easily do this with IE.au3.

You must first get a reference to the IE window with _IEAttach (or _IECreate if you can go directly to this URL). Then use _IEGetObjByName to get a reference to the button, followed by an _IEAction to click on it. For example:

#include <IE.au3>
$oIE = _IEAttach("the document title goes here")
$oButton = _IEGetObjByName($oIE, "y1g8ngz")
_IEAction($oButton, "click")
_IELoadWait($oIE) ; optional

Dale

thats what im looking for, however the button changed i guess because now when i look at the source it says this

<img scr=i/w/sp_.gif height=8><img src=i/w/sp_.gif height=5><br> <input type=button value=" Mine " name=yitc4a onclick="x16m7un(yitc4a);">
        
        <input type=hidden name=buttoncheck value="&br7d&">
        <a href=.></a>

so im thinking it needs to click on the sp_.gif so how would you do that :)

never mind on the whole sp_.gif thing because it is everywhere throughout the source :D any clue what to do >.<

*edit #2* ive been messing around and this is what happens, every time the page refreshes the name changes for the button, but if you use the name it does work, but i was hoping to loop this action :\ so every time the page refreshes the 6 digit number/letter combination changes so is there any other way to get it to use that button?

Edited by gunnagitcha
Link to comment
Share on other sites

A little more complicated, but see if this makes sense:

#include <IE.au3>
$oIE = _IEAttach("the document title goes here")
$oInputs = _IETagNameGetCollection($oIE, "input")
For $oInput in $oInputs
    If String($oInput.value) = " Mine " Then
        _IEAction($oInput, "click")
        ExitLoop
    EndIf
Next
_IELoadWait($oIE) ; optional

Dale

Edit: typo in example

Edited by DaleHohm

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

A little more complicated, but see if this makes sense:

#include <IE.au3>
$oIE = _IEAttach("the document title goes here")
$oInputs = _IETagNameGetCollection($oIE, "input")
For $oInput in $oInputs
    If String($oInput.value) = " Mine " Then
        _IEAction($oInput, "click")
        ExitLoop
    EndIf
Next
_IELoadWait($oIE) ; optional

Dale

Edit: typo in example

makes total sense and works perfectly :D thanks a whole whole bunch :)
Link to comment
Share on other sites

makes total sense and works perfectly :D thanks a whole whole bunch :)

that code worked fine for a while but i think they changed the site.....now the source for the button is this.....

<script language="javascript"> function xvgnlz(obj) { if(obj.value == " Mine ")

when i run the old script on the page it says

For $oInput in $oInputs^ ERROR

Error: Variable must be of type "Object".

Link to comment
Share on other sites

  • Moderators

that code worked fine for a while but i think they changed the site.....now the source for the button is this.....

&lt;script language="javascript"> function xvgnlz(obj) { if(obj.value == " Mine ")

when i run the old script on the page it says

That is definitely not the source for the button, maybe the function that is linked to the onclick event of the button, but not the button itself.
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...