Jump to content

MouseClick Doesnt Click


Recommended Posts

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.

Link to comment
Share on other sites

  • Moderators

Leiak,

Welcome to the AutoIt forum. :blink:

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

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
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

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
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.

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
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

Link to comment
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

Link to comment
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:

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