Question #166785 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/166785

Summary changed to:
Windows: can't control keyboard or mouse when running from task scheduler (but 
scheduled task runs)

Description changed to:
***** to make it clear

A scheduled task containing a Sikuli script to run, will work. Only
testing it with the TaskScheduler-MMC-Console-Window open will not work
as expected (mouse/keyboard actions blocked).

-------------------------------------------------------------------------------------------------------------

When running Sikuli X-1.0rc2 from the Windows Vista task scheduler, any
'click' or 'type' calls don't work. eg:

  type('r', KEY_WIN)

will open Window's 'run' dialog when run directly from sikuli or from
the command line, but not when run from the task scheduler. It appears
that sikuli cannot control the keyboard or mouse when run from the task
scheduler.

I've confirmed Sikuli is actually running by;
* Calling 'popup' will correctly display the popup
* Enabling 'setShowActions' will show the flashing target in the correct 
location (when using 'click'), but the mouse pointer won't move to the target.

Steps to reproduce:
1. Create a script containing
      popup("I'm running, no joke")
      type('r', KEY_WIN)
2. Add a batch file to run the program. eg:
     "C:\Program Files\Sikuli X\Sikuli-IDE-w.bat" -r 
"C:\Users\IcyTea\Documents\test.sikuli"
3. Run the batch file to confirm it works
4. Add it to the task scheduler
  - press the windows key
  - type 'task scheduler
  - click the 'action' menu
  - name 'test sikuli'
  - keep clicking next until you can set 'start a program'. Set the path to the 
batch file.
  - Keep clicking next until the task is create.
  - Click on the 'task scheduler library'
  - Right click on the new 'test sikuli' task, and click on 'run'.

It will (correctly) display the popup, but will (incorrectly) not open
the 'run' dialog box.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to