Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Launch a script which's name has spaces from CLI

Featured Replies

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

just change the name so it doesnt have spaces? 

Edited by IHB

  • Author
-script "\"Script Name\":null"

 

Kudos Lemons, works great

  • 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 :D

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 biggrin.png

 

Try Script\ Name

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 biggrin.png

 

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?

  • 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 by nosepicker

 

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
  • 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

  • Author

Sadly none of the above options work

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.