Jump to content

MouseClick behaves differently after some time - (Moved)


Recommended Posts

Hi,

I have a very strange problem concerning MouseClick function.

I need to start Control Panel, navigate it on the Display Section (Adjust screen resolution link), click on it, and from the next Dialog choose Intel Graphic tool tab and navigate into it when it opens. 

I wasn't using MouseClick() at first when I tried to use Control IDs, but I was fed up with the Autoit Window Info poor and inaccurate info (It flickers and the moment I click on the control the control ID and class disappear) so I ended up choosing the easiest way.

The code I'm posting worked OK until two weeks ago, the mouse clicks were accurately performed and the Script reached the end with no errors...and I was happy.

All of a sudden, between one try and the other, I noticed the cursor not flying exactly where it was supposed to, namely to the Control Panel ->Display->Adjust screen resolution link   but it clicked some 30 pixels below and some 30 pixels to the left, choosing obviously and undesired function and from that point it screwed the whole thing up. And from that moment onward, it seems I can no longer regain the mouse to click on that sequence.

Could it be because my Control Panel ->Display form moved slightly from one test to another and therefore I got that small offside?

If you believe this is the reason, I should then re position the Control Panel ->Display window to 0,0 and recalculate all the clicks. 

do you have a suggestion?

 

Thanks a lot

Dave

 

 

 

RotateDisplays.au3

Link to post
Share on other sites
  • Moderators

Moved to the appropriate forum, as the AutoIt Example Scripts forum very clearly states:

Quote

Share your cool AutoIt scripts, UDFs and applications with others.


Do not post general support questions here, instead use the AutoIt Help and Support forums.

Moderation Team

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites

@lonardd

Well, one of the most precious suggestion would be to not use mouse clicks to automate something, since you have tried on your own the reliability of these kind of "automation styles".

What's your end goal?

Couldn't you use another way to do what you are trying to do? :)

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to post
Share on other sites
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to post
Share on other sites

My end goal was to click on Advance Settings link on the Screen Resolution Page of the control Panel. Advance Settings link is not a control and doesn't have an ID. Clicking on that would allow me to open the INTEL Graphic tool dialog and from there I can keep navigating it through controls. so it's the damned Advance Settings link on control Panel that it's stopping my whole thing.

Link to post
Share on other sites

Not that I'm aware of but I suppose they have a sort of way to do automatic configurations, either via Command line or via XML. The problem I have was the "Time". Would it take longer to contact INTEL, get in the middle of their support channel and get from them  the info, or would it be faster to try to automate a dozen of "clicks" with Autoit? I figured the latter was the best option for me...  

Link to post
Share on other sites

What happens if  you try to run the Intel graphics settings program directly, rather than trying to get the control panel to start it?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to post
Share on other sites

I resorted to call it through this messy navigation of Control Panel because I found no batch file/No executable/No services to start that. Posted a call into INTEL support forum but I was dragged here and there for weeks in an helpless attempt to find someone that gives me a hint. 3 months later the call was closed automatically. 

Link to post
Share on other sites
Just now, lonardd said:

found no batch file/No executable/No services to start that.

I find that hard to believe, I've worked with numerous Intel drivers and the control panels they install, there's always an .exe that runs when you open the Intel graphics settings panel.

Perhaps you looked in the wrong place, first you should open the panel manually, and look in the task manager, look at the processes tab to see what windows are running, right click it and go to details, you'll find the exe that runs that panel. A screen shot of the processes tab would be good if you can't find it, or perhaps do a ConsoleWrite of all processes running using ProcessList.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to post
Share on other sites

You are actually giving me a good suggestion. 

Not that I haven't tried that because I remember I took a close look of the processes, but..... I might have been baffled by some other things back then when I tried

Let me try that again when I'll be back in the LAB, hopefully  by Monday. Thanks for your HELP, I appreciate  !!! 

Link to post
Share on other sites

Hey BrewManNH

I want to give you some feedback on this Call.

You are right! Went back to the LAB and found out the executable that runs the INTEL Graphic Tools. It's c:\Windows\System32\igfxcfg.exe. That's exactly what I was looking for. Plus, unlike Control Panel window, this tool is a regular Windows form with controls like Tabs, Combo Boxes and buttons, all objects I can control easily from my Autoit program. 

Thanks 

Dave

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By TheAutomator
      I'm writing a script that uses a lot of specific mouse clicks to automate tasks on my browser, server system, and email software for work.
      Sometimes the system gets updated or someone drags a handle to the left or right and I have to put in new mouse click coordinates.

      It would be a lot more easy to label them and put them in some sort of ini file, but then i have to load every X and Y (and sometimes mouse speed) into a variable
      when loading the script.

      How would you guys go about such a script, any ideas on how to store and load lot's of click coordinates from a file?
      There are some pixel color checks, sleeps and other code between the mouse clicks too..

      Ideas i had so far:
      - string replace new coordinates in the main script with another autoit script that uses a crosshair to show every mouse position.
      - manually write an ini file and load every X, Y, Speed into a huge number of variables: $Searchinput_X = iniread...., $Searchinput_Yiniread...., $Searchinput_Speed = iniread....
      - split a textfile line by line into an array and ignore labels that begin with ";" for example (a bit like a custom ini file)

      These all seem somewhat tedious i guess..
    • By dejhost
      Hi.
      I am trying to automate a software called "LabelImg" (https://pypi.org/project/labelImg/).
      My autoit-script is started once I selected a folder with images within LabelImg. Pressing the button "Next Image" or pressing the shortcut "d" (https://github.com/tzutalin/labelImg#Hotkeys) jumps to the next image in the selected folder. This shall happen once per second.
      #include <Misc.au3> #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> Opt("WinTitleMatchMode", 1) Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("1B", $hDLL) Then ExitLoop Else Local $temp = WinActivate("labelImg") ConsoleWrite($temp & @CRLF) If WinActivate("labelImg") Then ConsoleWrite("All Set!" & @CRLF) EndIf ;Send("d") Local $temp = MouseClick($MOUSE_CLICK_RIGHT, 50, 200) If $temp <> 1 Then MsgBox(1, "$temp", $temp) ExitLoop EndIf Sleep(1000) EndIf WEnd DllClose($hDLL) So the Send ("d")-command and the MouseClick are alternative methods to jump to the next image. Both fail.
      Both ConsoleWrite's deliver proper feedback (I continiously get the handle and "All set" ).

      Could you tell me what I'm doing wrong? 
      Thank you.
    • By Rskm
      Hi, recently i created a GUI for some calculations in AutoIT.  The GUI has 2 tabs and on the first tab, it has few inputboxes where i use to click with mouse and start entering the inputs. i recently made some changes in the position of these textboxes. I made this by changing the autoit code file instead of making changes in KODA. Now i cannot click inside these textboxes with mouse. However, i can use TAB key to cycle through/enter input in these input boxes. what could have made the inputboxes not responding to mouseclicks. thanks
    • By lunarlattice
      Hi All,
      I am trying to login into our application using AutoIT. When I launch the application a splash screen appears and the login screen goes behind it. At this point the script pauses and I loose control of everything. I have literally tried everything for the past two days but nothing has worked yet. Any suggestions would be appreciated.
      RunWait("\\mchsv411.siplaceworld.net\splmshare\int00\conf\start_apps\windows\start_nx110.bat en portal_client int00 tc112", "", @SW_MAXIMIZE)
      AutoItSetOption("SendKeyDelay", 200)
      Local $hWnd = WinWaitActive("Teamcenter Login")
      MouseClick("left", @DesktopWidth / 2, @DesktopHeight / 2)
      The splash screen has title "Teamcenter" and is static.
      I tried to click on the center to get control of login window.
      I have tried WinActivate, WinSetState, ControlCommand and a lot of other things.
    • By lonardd
      I need to open an INTEL Graphic Tool clicking on a Win7 Tray Icon. This icon is not shown on the Win7 Tray but it is shown once you click on a button that shows a little  arrow-up. This button opens up an extension of the tray and there is my INTEL Graphic Tool Icon. 
      The first ControlClick('[Class:Shell_TrayWnd]', '', 1502 ) at line 26 of my source code (Rotatedisplays.au3) works fine as it clicks on the up-arrow shown on the uparrowfirst Menu.jpg  picture and opens up an extension of the tray. Then I'm trying to click on the INTEL Graphic Tool Icon which is the first blue icon (up-left) of the tray extension but I failed all my attempts. Can somebody help me out?
      Thanks 
      Dave


      RotateDisplays.au3
×
×
  • Create New...