Butters Posted December 11, 2016 Share Posted December 11, 2016 Hey, the title says it all. I am familiar with launching OSbot from CLI so this is only about the -script part Let's say I have a local script called "My Script". How to launch it in Windows/Linux? I've tried noob stuff like without commas -script My Script:null with commas -script "My Script:null" name with commas, params nor -script "My Script":nulll Nothing works Quote Link to comment Share on other sites More sharing options...
IHB Posted December 11, 2016 Share Posted December 11, 2016 (edited) just change the name so it doesnt have spaces? Edited December 11, 2016 by IHB 1 Quote Link to comment Share on other sites More sharing options...
Lemons Posted December 11, 2016 Share Posted December 11, 2016 -script "\"Script Name\":null" 2 Quote Link to comment Share on other sites More sharing options...
Alek Posted December 11, 2016 Share Posted December 11, 2016 As IHB said, don't use spaces for local scripts. Quote Link to comment Share on other sites More sharing options...
Butters Posted December 11, 2016 Author Share Posted December 11, 2016 -script "\"Script Name\":null" Kudos Lemons, works great Quote Link to comment Share on other sites More sharing options...
Juggles Posted December 11, 2016 Share Posted December 11, 2016 Just remove the space between the words. Quote Link to comment Share on other sites More sharing options...
Butters Posted December 12, 2016 Author Share Posted December 12, 2016 -script "\"Script Name\":null" It works great on Windows. Failed to launch it on Linux, any ideas? Just remove the space between the words. Super easy for my own scripts. Problem when I want to launch a script that someone else made. And I find decompiling it unethical Quote Link to comment Share on other sites More sharing options...
Abuse Posted December 12, 2016 Share Posted December 12, 2016 It works great on Windows. Failed to launch it on Linux, any ideas? Super easy for my own scripts. Problem when I want to launch a script that someone else made. And I find decompiling it unethical Try Script\ Name 1 Quote Link to comment Share on other sites More sharing options...
Lemons Posted December 12, 2016 Share Posted December 12, 2016 It works great on Windows. Failed to launch it on Linux, any ideas? Super easy for my own scripts. Problem when I want to launch a script that someone else made. And I find decompiling it unethical What Abuse said should work as well. I use the syntax I gave above on Linux though atm, no idea why it won't work. Which shell are you using? Quote Link to comment Share on other sites More sharing options...
Butters Posted December 13, 2016 Author Share Posted December 13, 2016 (edited) What Abuse said should work as well. I use the syntax I gave above on Linux though atm, no idea why it won't work. Which shell are you using? Sorry for misleading you. Yep, both your and Abuses' options work fine. The problem is that I want to store the script params in a variable and then add it to the java -jar line. For example this works fine: java -jar "osbot 2.4.101.jar" $OSBOTLOGIN $BOT1 -script My\ Script:null $BOT1WORLD Though this doesn't find the script SCRIPT="-script My\ Script:null" java -jar "osbot 2.4.101.jar" $OSBOTLOGIN $BOT1 $SCRIPT $BOT1WORLD By the way, a noob question. What does the "\" actually do? And even so, how to understand this syntax that you've provided? "\"My Script\":null" Edited December 13, 2016 by nosepicker Quote Link to comment Share on other sites More sharing options...
Abuse Posted December 13, 2016 Share Posted December 13, 2016 Sorry for misleading you. Yep, both your and Abuses' options work fine. The problem is that I want to store the script params in a variable and then add it to the java -jar line. For example this works fine: java -jar "osbot 2.4.101.jar" $OSBOTLOGIN $BOT1 -script My\ Script:null $BOT1WORLD Though this doesn't find the script SCRIPT="-script My\ Script:null" java -jar "osbot 2.4.101.jar" $OSBOTLOGIN $BOT1 $SCRIPT $BOT1WORLD By the way, a noob question. What does the "\" actually do? And even so, how to understand this syntax that you've provided? "\"My Script\":null" It's bad practice in general to store parameter options in a variable Try this: SCRIPT="My\\ Script:null" java -jar "osbot 2.4.101.jar" $OSBOTLOGIN $BOT1 -script $SCRIPT $BOT1WORLD or SCRIPT="My\ Script:null" java -jar "osbot 2.4.101.jar" $OSBOTLOGIN $BOT1 -script $SCRIPT $BOT1WORLD Quote Link to comment Share on other sites More sharing options...
Butters Posted December 13, 2016 Author Share Posted December 13, 2016 It's bad practice in general to store parameter options in a variable Try this: SCRIPT="My\\ Script:null" java -jar "osbot 2.4.101.jar" $OSBOTLOGIN $BOT1 -script $SCRIPT $BOT1WORLD or SCRIPT="My\ Script:null" java -jar "osbot 2.4.101.jar" $OSBOTLOGIN $BOT1 -script $SCRIPT $BOT1WORLD Thanks, tried this and it didn't work SCRIPT="My\ Script:null" java -jar "osbot 2.4.101.jar" $OSBOTLOGIN $BOT1 -script $SCRIPT $BOT1WORLD Gonna try with two \\ when I get on my other PC. The idea behind this is to launch like 10 bots with the same script, so thought that storing script params to variables would make it cleaner and easier to manage Quote Link to comment Share on other sites More sharing options...
Butters Posted December 13, 2016 Author Share Posted December 13, 2016 Sadly none of the above options work Quote Link to comment Share on other sites More sharing options...