Sign in to follow this  
Followers 0
Leiak

MouseClick Doesnt Click

15 posts in this topic

Hi,

Im trying to create a program that operates in a windowed program. I locate the area I wish to click the mouse, program the coordinates, run the program, the mouse moves to the locations.....and doesnt click.

If i minimize the window and run it again, the mouse will click on the desktop the way it is supposed to but not when the window is open.

Can anyone help me out with this slight issue?

Im sure im just missing something super easy.

Share this post


Link to post
Share on other sites



Leiak,

Welcome to the AutoIt forum. :blink:

What exactly are you trying to automate? Some applications, alas, are resistant to automation.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

like this?!

mousemove(x,y)
mouseclick("left")

Share this post


Link to post
Share on other sites

I am using:

MouseClick("left", x, y)

to do it in one step and it isnt working..I will try the two line method and see if it works better or not.

And the program I am trying to automate is one i know script works in. I have other scripts written in autoit (.exe though...no source code) and they work

But im having problems getting it to work myself is all

Share this post


Link to post
Share on other sites

Leiak,

And the program I am trying to automate is one i know script works in

So some compiled AutoIt exes you have downloaded from somewhere work on this program and your own script does not. :blink:

As I said above, some programs are more resistant than others - what exactly is it that are you trying to automate? If we do not know it is going to be hard to offer any sensible help. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

So far im just trying to get a simple mouseclick to work, no plans for any real programs as of yet just trying to learn the program itself, frustrating i cant get a simple mouseclick to work properly is all.

Share this post


Link to post
Share on other sites

is there something extra required to make autoit "see" a certain window or anything along those lines. As i said it clicks on the desktop but not in the window.

Share this post


Link to post
Share on other sites

Also, I am at work right now so I cannot try any of these suggestions until I go home to my personal computer Im just seeing if i can find some suggestions or ideas to try later today.

Share this post


Link to post
Share on other sites

Leiak,

the mouse will click on the desktop the way it is supposed to but not when the window is open

You obviously have a MouseClick script which works if it clicks on the desktop at the correct place. So it must be the particular window in which you are trying to click that is resistant to the automated click. :blink:

But as you seem reluctant to tell us what this window is or anything about your code, it is very difficult to offer any help.

"click"

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

;activate window before send click!
$wintitle="window title"
If WinExists($wintitle) Then
    WinActivate($wintitle)
    WinWaitActive($wintitle)
    MouseClick("left");x,y
EndIf

Share this post


Link to post
Share on other sites

my code is one line that involves a mouseclick thats it, I am just trying to find out if there is anything extra i could add to try to make the program focus on the window itself.

thank you rvn

Share this post


Link to post
Share on other sites

where can i find the exact window title if it is not displayed in the top of the screen? task manager applications title? or process title?

Share this post


Link to post
Share on other sites

http://www.autoitscript.com/autoit3/docs/intro/au3spy.htm

http://www.autoitscript.com/autoit3/docs/intro/windowsbasic.htm

http://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm

u must need this to => Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

n the last,,, help file!

cheer :blink:

Share this post


Link to post
Share on other sites

I solved my problem last night. Had to run AutoIt in xp3 compatibility mode to work with the program im running in compatibility mode as well...works fine now.

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