← Back to team overview

sikuli-driver team mailing list archive

[Question #217805]: Sikuli output during run a script from CLI (Win7Ent x64)

 

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

Hi guys, 

I have a problem with script output then the script running from CLI
Take a look at this example:

def MyFunction():
    print "firstline"
    print "secondline"
    sleep(10)

ACTION = "" #
if len(sys.argv) > 1:
    ACTION = str(sys.argv[1])
    sys.argv.remove(ACTION)

if ACTION == "RunMyFunction":
    MyFunction()
else: # ACTION == "Usage":
    print "***Usage: put usage here..."
    popup ("***Usage: put usage here....")

If i run this example directly from Sikuli ergo without an args, the message will popups from "else" block. 
But if i try to do the same from cmd for example like this: 

C:\Program Files (x86)\Sikuli X>Sikuli-IDE-w.bat -r kisakuku.sikuli 

The script will runs (as i see it from task manager) but there are no any outputs or popups.  The same if try my script with param:

C:\Program Files (x86)\Sikuli X>Sikuli-IDE-w.bat -r kisakuku.sikuli  --args RunMyFunction

Is it some way to output a script message for user if it runs from CLI?

There is a work around to use a file to store script output and read it after run. 
But may be there and an other way is?

Thanks in advance. 



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