← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #188027]: Autostart from OSX 10.7&10.6

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Since I do not know, what your script is doing, I cannot say much.

It seems, that you are trying to open another Terminal session. Since
your script is already running in a Terminal session, the opening in
your script only switches to the existing session and just types there,
but with no effect, since it is not accepting command input.

If you really want to do it this way, you have to open a new Terminal window by typing e.g.
type("n", KeyModifier.CMD); wait(2)

then you have a command line frontmost, that will accept your type()'s.

BTW: I do not understand, why you are doing things so complicated.
Python/Jython has a powerful subprocess module, where you can do everything you want internally, without the need for a Terminal session.
Or even so: write your commands to a file and run it with os.popen().

If you want the primary Terminal window to be hidden:
switchApp("Terminal")
type("h", KeyModifier.CMD)

at the beginning of your script. This will hide all Terminal windows.
If you stick with your "type into a Terminal session" method: this window must be open for Sikuli to work!

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