Can I run a sikuli script without being logged in. --- simply no

Asked by Sean Westfall

Hello,
Is it possible to run a sikuli script in Windows 7 without being logged in. The reason why I'm asking is because I want to schedule a task in Windows Task Scheduler and have it execute a sikuli script whether I'm logged in or not. The scripts opens a chrome browser and automates a sequence of commands to an online adobe flash/flex app. I wanted to schedule it to run every day, but I might not be logged on everyday.

Is this possible? Will not having the windows desktop open make this impossible.

I do something similar in linux, where I run a selenium script that opens a browser in a separate window. It's works just fine without an open window, but I believe you can't open separate concurrent windows in MS Windows 7 -- right?

If anyone can provide me with some insight I'd really appreciate it!

Thanks,
Sean

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

not possible for Sikuli: you need an active, real monitor.

Hence you have to be logged in.

Revision history for this message
akbar (mohammed-akbar-ali) said :
#2

Put these commands in a batch file and make the scheduler to call this before launching the script. These commands will make sure that current logged in user is disconnected but keeps the session active, which implies it will have an active screen. This will work provide that someone is always into the machine and also you need disable your screenlock.

tscon.exe 0 /dest:console
tscon.exe 1 /dest:console
tscon.exe 2 /dest:console

Revision history for this message
akbar (mohammed-akbar-ali) said :
#3

Sean, if this works then let Raiman know, so that he can change the subject of the question accordingly!!!!!!!!!!!!

Revision history for this message
Sean Westfall (sean-westfall) said :
#4

"into the machine"? What does that mean? So for this to work I need to disable screenlock?

I was thinking of using an autologin tool: http://technet.microsoft.com/en-us/sysinternals/bb963905.aspx
This will auto log me in if I'm not already logged in, then run the sikuli script. The only thing I'd like to do is figure out a way to disable my monitor, so it doesn't look like it's on. It be cool if I could figure that out.

The only other way I could think this would be possible is if I used a VM. Start up a separate VM as a background process, and run a sikuli script. If that's even possible in Windows 7. I don't know. I could do this easily in linux, windows is so weird.

Revision history for this message
Sean Westfall (sean-westfall) said :
#5

Akbar, if you're certain using tscon.exe will work. Could you send me a test script to test on my machine, say something that starts sikuli and maybe opens and closes a browser, so I can see it work?

Revision history for this message
akbar (mohammed-akbar-ali) said :
#6

This is how you can do this.
1.Create a scheduler to call the batch and sikuli script
2.Login to the test machine and let it lock
3.When the scheduler runs, tscon.exe will log you out but keeps the session active(screen is active) and sikuli script will run
4.If you sikuli script runs for longer time then you will have disable screen lock on the test machine

Refer to Sikuli documentation on how to open browser, command is openApplication...

Can you help with this problem?

Provide an answer of your own, or ask Sean Westfall for more information if necessary.

To post a message you must log in.