Sign in to follow this  
Followers 0
controlledchaos

mouse clicks

8 posts in this topic

hello,

was wondering if anyone knows how to make a mouse click that doesnt need coordinates? i ask this because not all monitors are the same size and the coordinates might not work on all. i need to click a link and then have the script enter some info. any suggestions?

thanks,

melanie

Share this post


Link to post
Share on other sites



Are you talking about a webpage? IE.au3 is very good and can handle 'clicking' on links and you wouldn't need to use MouseClick at all.

If this isn't a webpage, check out ControlClick.

If I'm way off base :whistle: (which is always possible) let us know and I'll try to help.


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

Are you talking about a webpage? IE.au3 is very good and can handle 'clicking' on links and you wouldn't need to use MouseClick at all.

If this isn't a webpage, check out ControlClick.

If I'm way off base :whistle: (which is always possible) let us know and I'll try to help.

Yes, you are right on, its a webpage. What/where is IE.au3? Forgive my ignorance, I am a noob! :P

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

The search function for this forum is near the top-right of the page. Click on it and put in "IE.au3"

[edit] Advanced search will find it better if you specify the Example Scripts forum. here's the link you want: http://www.autoitscript.com/forum/index.ph...6&hl=IE.au3

[edit2] That version was already included with the latest releases of autoit... you should just have to #include <IE.au3>

Edited by SpookMeister

[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

Yes, you are right on, its a webpage. What/where is IE.au3? Forgive my ignorance, I am a noob! :whistle:

Everyone is/was a noob sometime :P (i still remained :D)

Anyways for clicking an img within IE bring up the help with F1 and at the index tab type : _IELinkClickByIndex or _IELinkClickByText

There are examples there just need to modify them for your needs, and you got the bases for your script.


Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Welcome to the forums

Where to get IE.au3?

It is included in AutoIt, here is the latest beta:

http://www.autoitscript.com/autoit3/files/beta/autoit/

Example of how to use:

; *******************************************************
; Example 1 - Open browser to Google.com, click on the link
;               with text "Advanced Search"
; *******************************************************
;
#include <IE.au3>
$sUrl = "www.Google.com"
$oIE = _IECreate ($sUrl) ;creates a webpage and goes to the specified link
_IELinkClickByText ($oIE, "Advanced Search") ;Clicks on the link by text

Good Luck

Edited by litlmike

Share this post


Link to post
Share on other sites

Thats ok trust me I've been there. IE.au3 is an included UDF which contains a ton of very useful functions for dealing with web pages via internet explorer. If you open up the help file and lookup IE you will find the documentation for all the functions. Look at some of the examples, play around a little bit. If you haven't had much experience looking at source codes or HTML it can be a little confusing at first. The function you more then likely need is _IELinkClickByText .

If you have problems with it either ask here or I'd be more then welcome to help you out via PM if I'm around. Once you get a little experience I'd recommend you download from here IEBuilder, which helps alot in coding IE scripts. Sorry I dont' have a direct link for you just search the forums.

Good luck!

Andrew

PS the IE.au3 functions ONLY work with internet explorer, not firefox. There are reasons for this but truthfully a lot of it goes over my head.


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Thats ok trust me I've been there. IE.au3 is an included UDF which contains a ton of very useful functions for dealing with web pages via internet explorer. If you open up the help file and lookup IE you will find the documentation for all the functions. Look at some of the examples, play around a little bit. If you haven't had much experience looking at source codes or HTML it can be a little confusing at first. The function you more then likely need is _IELinkClickByText .

If you have problems with it either ask here or I'd be more then welcome to help you out via PM if I'm around. Once you get a little experience I'd recommend you download from here IEBuilder, which helps alot in coding IE scripts. Sorry I dont' have a direct link for you just search the forums.

Good luck!

Andrew

PS the IE.au3 functions ONLY work with internet explorer, not firefox. There are reasons for this but truthfully a lot of it goes over my head.

thanks to everyone! got it figured out after almost ripping my hair out. :whistle: lol there was a space before the text of the link!

melanie

:P

Edited by controlledchaos

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