how can I auto start a add-on script through cmd

Typically: "How do I... ", "How can I... " questions
Post Reply
cong.guo
Posts: 4
Joined: 12 Dec 2019, 14:04

how can I auto start a add-on script through cmd

Post by cong.guo »

I try
./coppeliasim.sh -b simAddOnScript-addOnScriptDemo.lua -s 5000 -q

I suppose it could auto start the sim and auto start the add-on

but the result shows that I still have to press the add-on -> addOnScriptDemo button

I try any way that shows in Command line like -a xxx or -b xxx but non of them works.

I hopes I could get some suggest from you.
Thank you :)

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: how can I auto start a add-on script through cmd

Post by fferri »

You have to name the script simAddOnScript_xxxx.lua (note the underscore instead of the dash)

cong.guo
Posts: 4
Joined: 12 Dec 2019, 14:04

Re: how can I auto start a add-on script through cmd

Post by cong.guo »

Thank you for your help. I rename the script and it run automaticlly when sim start.


But it's really not a very good design that I have to control this by file name & file place -_-!
I read the doc many times and still can't get this.

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: how can I auto start a add-on script through cmd

Post by fferri »

Well, it's in the manual:

http://www.coppeliarobotics.com/helpFiles/en/addOns.htm

Additionally, you can run add-on scripts from arbitrary locations via a command line switch:

http://www.coppeliarobotics.com/helpFil ... ndLine.htm

I don't know why you didn't manage to do it that way. Maybe it's a bug

Post Reply