Leiak Posted July 21, 2010 Posted July 21, 2010 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.
Moderators Melba23 Posted July 21, 2010 Moderators Posted July 21, 2010 Leiak, Welcome to the AutoIt forum. 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Leiak Posted July 21, 2010 Author Posted July 21, 2010 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
Moderators Melba23 Posted July 21, 2010 Moderators Posted July 21, 2010 Leiak,And the program I am trying to automate is one i know script works inSo some compiled AutoIt exes you have downloaded from somewhere work on this program and your own script does not. 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Leiak Posted July 21, 2010 Author Posted July 21, 2010 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.
Leiak Posted July 21, 2010 Author Posted July 21, 2010 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.
Leiak Posted July 21, 2010 Author Posted July 21, 2010 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.
Moderators Melba23 Posted July 21, 2010 Moderators Posted July 21, 2010 Leiak,the mouse will click on the desktop the way it is supposed to but not when the window is openYou 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. 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
rvn Posted July 21, 2010 Posted July 21, 2010 ;activate window before send click! $wintitle="window title" If WinExists($wintitle) Then WinActivate($wintitle) WinWaitActive($wintitle) MouseClick("left");x,y EndIf
Leiak Posted July 21, 2010 Author Posted July 21, 2010 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
Leiak Posted July 21, 2010 Author Posted July 21, 2010 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?
rvn Posted July 21, 2010 Posted July 21, 2010 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
JohnOne Posted July 21, 2010 Posted July 21, 2010 A lot of games will just blow you out when you are trying to automate them in this manner. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Leiak Posted July 22, 2010 Author Posted July 22, 2010 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now