Sign in to follow this  
Followers 0
dotkich833

How to order click on this button?

17 posts in this topic

I'm writinganautoto automaticallyclickonnextbutton.But I cann't use_IELinkClickByTextfunction.

Who canhelp me?

<input type="button" value="Next" style="font-size:18px;" onclick="OnNext(this.form)" class="button">

Share this post


Link to post
Share on other sites



there is a very hard way:use search paterns, but if there is a limited number of places there button could be and how it may look... We made a couple of functions to search an image on the area of the screen, using pixel checksumes.

ps sorry my english


Sorry my English))

Share this post


Link to post
Share on other sites

Why can't you use _IELinkClickByText?

Try _IELinkClickByIndex or _IEAction($object, "click")


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I use _IELinkClickByText but it's not auto click

Share this post


Link to post
Share on other sites

What do you mean by "auto click" and can you post the code you use?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

#include <IE.au3>
$oIE = _IECreate ("http://www.autoitscript.com/",1)
$o_submit = _IEGetObjByName ($oIE, "next")
_IEAction ($o_submit, "click")

sorry, that site I cann't give

Edited by dotkich833

Share this post


Link to post
Share on other sites

Unfortunately there is no next button on this site. Therefore I can't test.

Can you find a public site which can't be automated by your script?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

i'm having the same problem, with IE7 and forcing focus continuously onto the Add Report button.

I've even tried controlClick function and no go.

The strange thing is, it works - the first time the program runs.

But it will not run any consecutive time after that.

Any thoughts as to why?

Share this post


Link to post
Share on other sites

sorry, that site I cann't give

well then the only opinion i can give you is this

you dont have *name='"SomeName"* of the button and you're trying to use its *value="Data"* as *name='"Data"*,anyone see something wrong here?

(i do think will never work because let's face it, you're trying to work with name instead with value?!! :) ofc i can b wrong heare i dont say im correct O_o)

i suggest you to try to use _IE* collections, and after you finde correct object it shud work

Apart from that, you did not supply testing URL so i hardly think that someone can blindly help you to get to work with something that don't exist.

so im gona try to direct you to this example in hope that example with www.google.com/advanced_search in it will geave you some clue about _IE* Collection, have fun playing


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

What we need to help you is

  • a site and the button you want to click
  • the IE version you run
  • the AutoIt version you run
  • a short reproducer script that always gives the error you descirbe

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Well, after having some more points of view on the matter here in house I figured out that I had a variable that was not clearing correctly after the initial time the program ran. I was using a time variable to tack onto the end of a report name that was polling every time the program ran. The problem was the variable was right only for the time the program ran - not every time the function ran. /face palm/ :)

So..yeah, just ignore the noob. Just passing through... ;)

Share this post


Link to post
Share on other sites

Hi All, I got the same problem when tried to make auto click on the button for the site with this button property as below:

<input type="button" value="Change" style="font-size:10px" onclick="if (confirm('Do you want to confirm?')) { window.location.href='last_update.php?list_id=' + approve_all(261,280) + '&amp;redirect=ZGFuaHNhY2gucGhwPyZwYWdlPTE0'; }">

The button has no name or id so i could not use normal way to click on it. Please help me to solve this issue. Thanks all.


[topic='27925']WebcamExample[/topic] || [topic='68866']WebcamUDF[/topic] || [topic='138222']DSShowCaptureFilter[/topic] || [topic='20121']ScreenResolutionChange[/topic] || [topic='139426']WebcamDS[/topic] || [topic='156613']ObfuscatorUTF8[/topic] || [topic='156219']VideoColorSystemPAL/NTSC[/topic] || [topic='31963']ExcelWindowsInGUI[/topic] || [topic='110473']4Webcam[/topic] || [topic='83763']RichEdit[/topic] || [topic='83763']RichEditUDF[/topic] || [topic='142384']RichEditLabel[/topic] ||[topic='96986']GUITFLabel[/topic] || [topic='32144']AccessCom[/topic] || [topic='38353']BetaPad[/topic] || [topic='31963']EmbeddedExcel[/topic]

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

Take the onclick="...." action

$action = "if (confirm('Do you want to confirm?')) { window.location.href='last_update.php?list_id=' + approve_all(261,280) + '&amp;redirect=ZGFuaHNhY2gucGhwPyZwYWdlPTE0'; }"

Assuming $action is javascript, you may also be able to get away with using _IENavigate

_IENavigate($oIE,"javascript:"&$action)

I use this instead of clicking javascript buttons

Edited by corgano

0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Share this post


Link to post
Share on other sites

Done, It's work well. I've solved problem that make me sleepless and take some more white hair :). Thanks a lot "corgano".....


[topic='27925']WebcamExample[/topic] || [topic='68866']WebcamUDF[/topic] || [topic='138222']DSShowCaptureFilter[/topic] || [topic='20121']ScreenResolutionChange[/topic] || [topic='139426']WebcamDS[/topic] || [topic='156613']ObfuscatorUTF8[/topic] || [topic='156219']VideoColorSystemPAL/NTSC[/topic] || [topic='31963']ExcelWindowsInGUI[/topic] || [topic='110473']4Webcam[/topic] || [topic='83763']RichEdit[/topic] || [topic='83763']RichEditUDF[/topic] || [topic='142384']RichEditLabel[/topic] ||[topic='96986']GUITFLabel[/topic] || [topic='32144']AccessCom[/topic] || [topic='38353']BetaPad[/topic] || [topic='31963']EmbeddedExcel[/topic]

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

By the way, "corgano" _  do you have any idea to control  Javascript pop-up window, after click on javascript button by your recommended method, a Javascript pop-up window will come up to confirm the process with OK and CANCEL button, How to control these button? I have no idea so far. Please help.....

Edited by gicungduoc

[topic='27925']WebcamExample[/topic] || [topic='68866']WebcamUDF[/topic] || [topic='138222']DSShowCaptureFilter[/topic] || [topic='20121']ScreenResolutionChange[/topic] || [topic='139426']WebcamDS[/topic] || [topic='156613']ObfuscatorUTF8[/topic] || [topic='156219']VideoColorSystemPAL/NTSC[/topic] || [topic='31963']ExcelWindowsInGUI[/topic] || [topic='110473']4Webcam[/topic] || [topic='83763']RichEdit[/topic] || [topic='83763']RichEditUDF[/topic] || [topic='142384']RichEditLabel[/topic] ||[topic='96986']GUITFLabel[/topic] || [topic='32144']AccessCom[/topic] || [topic='38353']BetaPad[/topic] || [topic='31963']EmbeddedExcel[/topic]

Share this post


Link to post
Share on other sites

I've just found solution to click on Javascript pop-up windows. Finally, it need to use _IEAction with 'focus' parameter before navigate it. Someone have been being faced on this issue, i can help!!!!


[topic='27925']WebcamExample[/topic] || [topic='68866']WebcamUDF[/topic] || [topic='138222']DSShowCaptureFilter[/topic] || [topic='20121']ScreenResolutionChange[/topic] || [topic='139426']WebcamDS[/topic] || [topic='156613']ObfuscatorUTF8[/topic] || [topic='156219']VideoColorSystemPAL/NTSC[/topic] || [topic='31963']ExcelWindowsInGUI[/topic] || [topic='110473']4Webcam[/topic] || [topic='83763']RichEdit[/topic] || [topic='83763']RichEditUDF[/topic] || [topic='142384']RichEditLabel[/topic] ||[topic='96986']GUITFLabel[/topic] || [topic='32144']AccessCom[/topic] || [topic='38353']BetaPad[/topic] || [topic='31963']EmbeddedExcel[/topic]

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

if (confirm('Do you want to confirm?')) { window.location.href='last_update.php?list_id=' + approve_all(261,280) + '&amp;redirect=ZGFuaHNhY2gucGhwPyZwYWdlPTE0'; }

because YOU are the one doing the $action instead of the page, you can take a look at it and change it yourself. In this case, the if(confirm()) bit looks like what is making the message box, so simply remove it

window.location.href='last_update.php?list_id=' + approve_all(261,280) + '&amp;redirect=ZGFuaHNhY2gucGhwPyZwYWdlPTE0';
Edited by corgano

0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Share this post


Link to post
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
Sign in to follow this  
Followers 0