Running script from command line with parameter
Asked by
Rom
I have a script that automates application installation. When my script contains a hard-coded fileName, it works without problem. However, when I made my script accepts argument, it fails as App.focus is on the cmd.exe. I also noticed this problem when I try SikuliSharp to call my scripts. Is there any work-around for this? below is part of my script.
import sys
name = "absetup.exe" // this works
name = sys.argv[1] // this didn't
s = Screen()
app = App(name)
if not app.window():
app.open(5)
wait(10)
app.focus()
.. other instructions here...
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Rom for more information if necessary.
To post a message you must log in.