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.

Writting Files for Script Settings

Featured Replies

Hey if you use this method and release the script leave an accreditation i release these snippets for the community...

 

 

 


first we need to create a void like soo with a file name and the settings you want to it to save to an ".txt" file

    public void writeConfigSettings(String FileName,String... settings) throws IOException {

Constructing the file writer and the exact name,location of the file

        // thanks to lackofchesee from TS3 for the path name!
        FileWriter f = new FileWriter(System.getProperty("user.home")
                + File.separator + "OSBot" + File.separator + "data"
                + File.separator + FileName +".txt");
 // writing to an exact path to the osbot data folder also constructing a FileWriter

Running the settings though a for loop to get a single setting then writing it to the file and spacing it on a line below this will be needed to read the text in my reading settings file

  for (String setting : settings) { // running though the strings
            f.write(setting + System.getProperty("line.separator"));
        }

just closing the FileWriter stream of output

    f.close(); // closing the stream
    }
    public void writeConfigSettings(String FileName,String... settings) throws IOException {
        // thanks to lackofchesee from TS3 for the path name!
        FileWriter f = new FileWriter(System.getProperty("user.home")
                + File.separator + "OSBot" + File.separator + "data"
                + File.separator + FileName+".txt"); // writing to an exact path
        for (String setting : settings) { // running though the strings
            f.write(setting + System.getProperty("line.separator"));
        }
        f.close(); // closing the stream
    }

in use

String selected_herbs[] ={"Ranarr","Guam"};
writeConfigSettings("Settings",selected_herbs);

this will save a .txt file in the data folder that will look like this called "Settings"

Ranarr
Guam

Edited by TheScrub

Guest
This topic is now closed to further replies.

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.