Jump to content

Issue with sleep command


shaunex
 Share

Recommended Posts

Hi

I have a very small script that is trying to open an exe and then move the mouse to the correct location and then send a script to this location. This is so that I can set a progrma to login and at certain time. Here is the script

CODE
MouseMove (500, 455, 100)

run (@ProgramFilesDir & "\****.exe")

Sleep ( 5000 )

MouseClick ( "left" )

Send ( "****" )

Send ( "{ENTER}" )

What is happening is that the mouse moves and then the program goes to sleep and then the exe runs and by the time the splash screen has gone the mouse click has activated. I have increased the sleep time but this just has the effect of increaseing the time before the splash screen starts.

Can not see why this is not working at all. I have tried a winwaitactive but the login screen has tabs embedded so it is confusing the winwait.

Edited by shaunex
Link to comment
Share on other sites

Hi

I have a very small script that is trying to open an exe and then move the mouse to the correct location and then send a script to this location. This is so that I can set a progrma to login and at certain time. Here is the script

CODE
MouseMove (500, 455, 100)

run (@ProgramFilesDir & "\****.exe")

Sleep ( 5000 )

MouseClick ( "left" )

Send ( "****" )

Send ( "{ENTER}" )

What is happening is that the mouse moves and then the program goes to sleep and then the exe runs and by the time the splash screen has gone the mouse click has activated. I have increased the sleep time but this just has the effect of increaseing the time before the splash screen starts.

Can not see why this is not working at all. I have tried a winwaitactive but the login screen has tabs embedded so it is confusing the winwait.

Have you tried more advanced window matching with WinWait? Do you have an autoit window info output you can paste here?

Link to comment
Share on other sites

Have you tried more advanced window matching with WinWait? Do you have an autoit window info output you can paste here?

Here it is

Title: Login

Class: TDBLogin

Position: 317,256

Size: 389,255

Style: 0x96C80000

ExStyle: 0x00000101

Handle: 0x00180124

I tried playing around with the advanced matching but again did not have much success which is why I switched to mouse move after I found an entry about tabs on the forum

Link to comment
Share on other sites

Here it is

Title: Login

Class: TDBLogin

Position: 317,256

Size: 389,255

Style: 0x96C80000

ExStyle: 0x00000101

Handle: 0x00180124

I tried playing around with the advanced matching but again did not have much success which is why I switched to mouse move after I found an entry about tabs on the forum

What about WinExists and a Loop, or ProcessExists and a Loop?

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...