December 11, 20169 yr 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
December 11, 20169 yr just change the name so it doesnt have spaces? Edited December 11, 20169 yr by IHB
December 12, 20169 yr Author -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
December 12, 20169 yr 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
December 12, 20169 yr 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?
December 13, 20169 yr Author 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, 20169 yr by nosepicker
December 13, 20169 yr 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
December 13, 20169 yr Author 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
Create an account or sign in to comment