Jump to content

Windows tiltle name grap and click


russell
 Share

Recommended Posts

I am trying to automate a program opening via a .bat file then run my exe from Autoit.So far i got this made. The .bat launches the program then the program makes you click ok (or hit enter) then a window appears that i have to click the lower right hand. So i am trying to make the autoit script when it detects the window and only when, hits enter then resizes the next window to whatever x whatever and clicks lower right hand, but the closest i get is below. This is because the window that appears when the program is ran to click "ok" displays no name. Is there a way to put such a window in a script then hit enter then resize to about any size to click specific area?

; ToolTip displaying function keys
Tooltip("F10 = Exit", 0, 0)

; List of command keys
If Not WinActive("1 - Notepad", "") Then WinActivate("1 - Notepad", "")
$okwindow=WinGetPos("");Replace "1- Notepad" with windows name
   HotKeySet("{F10}", "exitNow")
Sleep (4000) ;every thousand equals 1 second
Send ("{enter}")
      $coord = PixelSearch($okwindow[0], $okwindow[1], $okwindow[0]+$okwindow[3], $okwindow[1]+$okwindow[4], 0x9C885C)
      ; If PixelSearch finds the pixel color at given coordinates, Then:
      If Not @error Then
         Send("{1}")
      EndIf

Edited by russell

muppet hands are so soft :)

Link to comment
Share on other sites

Examine the window with AUInfo.exe, the AutoIt Window Information Tool. You can use things like the CLASS and the text in the window to identify it. See Window Title and Text (Advanced) in the help file.

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...