How to open an .exe through the Command Line in Sikuli?

3.6k views Asked by At

I have PL/SQL Developer installed, and I am trying to get Sikuli to open it through the Command Line.

If I do it manually I do:
1) Open CMD
2) "C:\Program Files (x86)\PLSQL Developer\plsqldev.exe"
3) [Enter]

This is my code:

vcCMD = '"C:\Program Files (x86)\PLSQL Developer\plsqldev.exe"'
App.open('CMD ' + vcCMD)

It did log that the App.open() has runned, but the .exe does not open.

[log] App.open CMD "C:\Program Files (x86)\PLSQL Developer\plsqldev.exe"

Does anyone know how to do this?

2

There are 2 answers

1
Tenzin On BEST ANSWER

Found the answer, I needed /C

vcCMD = '"C:\Program Files (x86)\PLSQL Developer\plsqldev.exe"'
App.open('CMD /C ' + vcCMD)

Or even more simple:

run(vcCMD)
1
Manotosh Sarkar On
import os


def firstline(x):
    wait(2)
    os.popen("@echo off")
    t="echo "+x+">log.csv"
    os.popen(t)


def append(x,y):
    wait(2)
    os.popen("@echo off")
    for i in range (0,y):
        x=","+x
        wait(1)
    t="echo "+x+">>log.csv"
    os.popen(t)


firstline("Invalid,test,test1")
append("test1",0)
append("test2",1)
append("test3",2)