Jump to content

Mouse Click doesn't work - (Moved)

Recommended Posts

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.

Link to comment
Share on other sites

  • Moderators

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:


General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here.

Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

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:


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

Splash Screen Summary 

>>>> Window <<<<
Title:    Teamcenter
Class:    Static
Position:    366, 218
Size:    633, 332
Style:    0x9600000E
ExStyle:    0x00000000
Handle:    0x0000000000D4097E

>>>> Control <<<<
Advanced (Class):    
ControlClick Coords:    

Login Window Summary


>>>> Window <<<<
Title:    Teamcenter Login
Class:    SWT_Window0
Position:    283, 64
Size:    800, 600
Style:    0x960A0000
ExStyle:    0x00100000
Handle:    0x00000000006003FC

>>>> Control <<<<
Class:    SWT_Window0
Instance:    5
ClassnameNN:    SWT_Window05
Advanced (Class):    [CLASS:SWT_Window0; INSTANCE:5]
ID:    4328256
Position:    323, 250
Size:    447, 350
ControlClick Coords:    12, 30
Style:    0x56010000
ExStyle:    0x00100000
Handle:    0x0000000000420B40

There are edit boxes inside the login window.

Currently I am using 



Local $hWnd = WinWaitActive("Teamcenter Login")

MouseClick("left", @DesktopWidth / 2, @DesktopHeight / 2)


But this works intermittently , it stops working abruptly and the script is paused all of a sudden.

Link to comment
Share on other sites

The script seems to be paused because you are using WinWaitActive(), and it does wait until the specifyed window became the active one.

Try to kill the splash screen using WinClose() or WinKill(), and then use WinGetHandle() or any other Win* function to interact with the login window.
If you need furhter assistance, please post the script you are working on in the <> code tag :)

Click here to see my signature:




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

  • Create New...