Jump to content

Recommended Posts

Posted

I am trying to write a short script that opens a program, sets focus to that windows, then send a keystroke.  It works if I run the script manually but I want it to run via task scheduler.  For some reason, it's not setting focus.  Here is my entire script, thanks for any help!

 

Local $iPID = Run("C:\Program Files\exacqVision\Client\edvrclient.exe", "", @SW_SHOWMAXIMIZED)
Sleep(10000)
WinActivate("exacqVision Client")
Sleep(2000)
Send( "{F11}" )

 

Posted

It's not pretty but I can send an ALT-TAB and it then switches to the window and works just fine.  Might have to do as WinActivate("exacqVision Client") is not working

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...