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.

Copy log to txt

Featured Replies

Is there anyway to make the script copy all logs like this one into txt file?

[INFO][Bot #1][08/21 12:51:53 AM]: WebWalkingEvent; We have reached the final destination!
[INFO][Bot #1][08/21 12:51:53 AM]: Current money stock 662459
[INFO][Bot #1][08/21 12:52:00 AM]: Current money stock 662459

 

Hmm.. not sure if true but I've heard a couple of times that I/O is blocked by the client. 

9 hours ago, kadiem said:

Is there anyway to make the script copy all logs like this one into txt file?


[INFO][Bot #1][08/21 12:51:53 AM]: WebWalkingEvent; We have reached the final destination!
[INFO][Bot #1][08/21 12:51:53 AM]: Current money stock 662459
[INFO][Bot #1][08/21 12:52:00 AM]: Current money stock 662459

 

 

If it is your own script, just write to a file instead of the logger.

If it isn't, you could run the bot via the command line in debug mode using the -debug flag and then redirect the output to a file by using > logfile.txt at the end of the command.

java -jar ....... -debug ..... > logfile.txt

Edited by Explv

  • Author
6 hours ago, Explv said:

 

If it is your own script, just write to a file instead of the logger.

If it isn't, you could run the bot via the command line in debug mode using the -debug flag and then redirect the output to a file by using > logfile.txt at the end of the command.

java -jar ....... -debug ..... > logfile.txt

 

It's my script i already tried this :

try {
		File file = new File("Test.txt");
        
		if(!file.exists()) {
				file.createNewFile();	
		}
		
		PrintWriter pw = new PrintWriter(file);
		pw.println("Test");
		pw.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

But it's giving me permission error is there another way?

1 minute ago, kadiem said:

 

It's my script i already tried this :


try {
		File file = new File("Test.txt");
        
		if(!file.exists()) {
				file.createNewFile();	
		}
		
		PrintWriter pw = new PrintWriter(file);
		pw.println("Test");
		pw.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

But it's giving me permission error is there another way?

 

You can only create files in the OSBot data directory. The path for this directory can be retrieved using getDirectoryData(), I think it's in the Script class?

 

  • Author
9 minutes ago, Explv said:

 

You can only create files in the OSBot data directory. The path for this directory can be retrieved using getDirectoryData(), I think it's in the Script class?

 

 

I changed pathname to 

getDirectoryData()+"Test.txt"

and it worked thank you so much!!

Edited by kadiem

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.