Sign in to follow this  
Followers 0
Codesmith

Sending a mouse click to a titleless window?

4 posts in this topic

I am creating my first scritp, it is for installing awxDTools.

All goes well until until a borderless lash screen appears.

I need to send a mouse click to this window, but AutoIt's Window Info tool shows it has no title.

I plan on reading the entire online documentation, but until then if anyone can quickly tell me how to proceed I would greatly apreciate it.

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title:

Class: #32770

Size: X: 181 Y: 210 W: 450 H: 297

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 414 Y: 446

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0xFFFFFF Dec: 16777215

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 36 Y: 213 W: 287 H: 42

Control ID:

ClassNameNN: Static2

Text: If you want to donate some money, feel free to do so, by clicking the "PayPal" button, or contact me

by eMail or ICQ#137005336

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

awxDTools - Daemon-Tools ShellExtension, Rel:1.0.6.0 Build:025

If you want to donate some money, feel free to do so, by clicking the "PayPal" button, or contact me

by eMail or ICQ#137005336

Credits: Rom@X, VeNoM386, Locutus, Harald Breitner

Share this post


Link to post
Share on other sites



I am creating my first scritp, it is for installing awxDTools.

All goes well until until a borderless lash screen appears.

I need to send a mouse click to this window, but AutoIt's Window Info tool shows it has no title.

I plan on reading the entire online documentation, but until then if anyone can quickly tell me how to proceed I would greatly apreciate it.

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title:

Class: #32770

Size: X: 181 Y: 210 W: 450 H: 297

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 414 Y: 446

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0xFFFFFF Dec: 16777215

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 36 Y: 213 W: 287 H: 42

Control ID:

ClassNameNN: Static2

Text: If you want to donate some money, feel free to do so, by clicking the "PayPal" button, or contact me

by eMail or ICQ#137005336

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

awxDTools - Daemon-Tools ShellExtension, Rel:1.0.6.0 Build:025

If you want to donate some money, feel free to do so, by clicking the "PayPal" button, or contact me

by eMail or ICQ#137005336

Credits: Rom@X, VeNoM386, Locutus, Harald Breitner

You might match that window with:

Opt("MouseCoordMode") ;  0 = relative coords to the active window
$x = 50 ; x coord for mouse click
$y = 50 ; y coord for mouse click

WinActivate("", "awxDTools - Daemon-Tools")
If WinWaitActive("", "awxDTools - Daemon-Tools", 2) Then
    MouseClick("Left", $x, $y)
Else
    MsgBox(16, "Error!", "Did not activate window!")
EndIf

:D


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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Codesmith,

Welcome to the forums - nice username.

PsaltyDS wrote you some good code for this situation, but I would add a hard stop to the script using WinWait in case the window does not show up within the 2 seconds that PsaltyDS's code allows for.

Opt("MouseCoordMode") ;  0 = relative coords to the active window
$x = 50 ; x coord for mouse click
$y = 50 ; y coord for mouse click

WinWait("", "awxDTools - Daemon-Tools")
WinActivate("", "awxDTools - Daemon-Tools")
If WinWaitActive("", "awxDTools - Daemon-Tools", 2) Then
    MouseClick("Left", $x, $y)
Else
    MsgBox(16, "Error!", "Did not activate window!")
EndIf
Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Codesmith,

Welcome to the forums - nice username.

PsaltyDS wrote you some good code for this situation, but I would add a hard stop to the script using WinWait in case the window does not show up within the 2 seconds that PsaltyDS's code allows for.

Opt("MouseCoordMode") ;  0 = relative coords to the active window
$x = 50 ; x coord for mouse click
$y = 50 ; y coord for mouse click

WinWait("", "awxDTools - Daemon-Tools")
WinActivate("", "awxDTools - Daemon-Tools")
If WinWaitActive("", "awxDTools - Daemon-Tools", 2) Then
    MouseClick("Left", $x, $y)
Else
    MsgBox(16, "Error!", "Did not activate window!")
EndIf
Thanks I found out how to specify windows by classname rather than title. Sending the windows an ENTER seems to do the same job as clicking even though it has no visible buttons.

I will read up on WinWait & WinActivate functions as well as WinWaitFunctions optional parameters.

I just discovered SciTe's Alt-F6 tools BTW. Handy.

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