Sign in to follow this  
Followers 0
shaunex

Issue with sleep command

7 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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

I will give that a go. I tried a ProcessExists but not having it in a loop.

Share this post


Link to post
Share on other sites

use ProcessWait instead of looping ProcessExists

Fantastic! Works a treat now thanks for all the help guys.

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