← Back to team overview

sikuli-driver team mailing list archive

[Question #182516]: Unable to run Sikuli in Windows 7 Task Scheduler

 

New question #182516 on Sikuli:
https://answers.launchpad.net/sikuli/+question/182516

I am able to execute the following command from Windows command line:
"c:\Program Files (x86)\Sikuli X\Sikuli-IDE" -r "C:\Users\sparta\Documents\hptest3.sikuli" --args "test dates 010101"
When I put the same command into Windows Task Scheduler as a command to "start a program" my Sikuli script fails on the line with a "wait" statement. Or it mightbe the find, full text of the message is:
Runtime errro when running C:Users\sparta\documents\hptest3.sikuli
Traceback (most recent call last):
file:C:...hptest3.py", line 11, in <module> wait("Entersearcht-1.png")
File: C:Sikuli X\sikuli-script.jar\Lib\sikuli\Region.py, line 99 in wait
Line 14, in file C:...hptest3.py

at org.sikuli.script.Region.handleFindFailed(Region.java:420)
at org....Region.wait(region.java:511)
at org.pythin.proxies.sikuli.region$region$0.super__wait(Unknown Source)
at sun.reflect.NativeMethodAccessorimpl.invoke0(native method)
 at end says: org.sikuli.FindFailed:FindFailed: can not find Entersearcht-1.png on the screen.

So the whole issue is trying to run a script in Windows at a particular time/trigger. I've read other posts and gave Sikuli admin privelidge . I've tried running the .exe file and that gave same result.

Suggestions? The .py follows at end

Thanks,

py:
theword="testBertec"
theword=sys.argv[1:]
parms1=sys.argv[1:]
for i in range(len(parms1)):
    print i 
    print(parms1[i])
theword=sys.argv[1]
cmd = r'C:\Program Files (x86)\HP\Digital Imaging\bin\Hpqdirec.exe'
appinstance=App.open(cmd)
observe(5)
wait("Entersearcht-1.png")
paste("Entersearcht-2.png", theword + "\t")
wait("1323989086918.png")
click("1323990151145.png")




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