Sign in to follow this  
Followers 0
HiNoTora

Program activate help?

2 posts in this topic

hi. Id like to make auto it see if program is opend or not.

If its closed then it would stop current script and open program and returning after program is active.

Active main screen. And id like to make it to looping window check cos sometimes program id wanna use it with, force closes. So heres my script, as you can see it on loop mode. If script ends, then it shold do Window check again. As additional ID LOVE to have UI ON Top With Script Start/Exit buttons. UI Corinates I will add myself, By learning off from scripp you provide.

Thank you a lot If You Helped Me.

MsgBox(0, "TEST By:nerfkitten", "TEST STARTED! press ESC to exit")

HotKeySet("{ESC}", "Terminate")

I--While 1

I Here shold be code for see if desired window is opend and active window.

I Lets call it Test.exe

I If Test.exe not found Then:

I MouseClick("left", 216, 942, 1)

I Sleep( 10000 )

I MouseClick("left", 816, 708, 1)

I Sleep( 60000 )

I MouseClick("left", 415, 775, 1)

I Sleep( 1000 )

I If Test.exe is Found and activate:

I Start Script:I

I MouseWheel("up", 1)

I Sleep( 10 )

I MouseWheel("up", 1)

I Sleep( 10 )

I MouseWheel("up", 1)

I Sleep( 10 )

I MouseWheel("up", 1)

I Sleep( 10 )

I MouseWheel("up", 1)

I Sleep( 10 )

I MouseWheel("up", 1)

I Sleep( 10 )

I MouseWheel("up", 1)

I Sleep( 10 )

I MouseClick("middle", 200, 200, 1)

I Sleep( 100 )

I MouseWheel("down", 1)

ISleep ( 1000 )

I MouseClick("right", 459, 923, 1)

I--Sleep( 1000 )

WEnd

Func Terminate()

Exit 0

EndFunc

Share this post


Link to post
Share on other sites



Checkout:

WinWaitActive for a window

or

ProcessExists / ProcessWait for a process

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