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.

onMessage() question

Featured Replies

Is the onMessage() executed all the time?

Because i noticed some delay before it gets executed. It kinda screws up the flow.

no its not executed "All the time" it has a small delay in it i assume to not kill your Cpu usage

29 minutes ago, dokato said:

Is the onMessage() executed all the time?

Because i noticed some delay before it gets executed. It kinda screws up the flow.

I don't believe it runs on a separate thread, so while your script is doing other things, including sleeping, it won't be executed.

I think it gets executed at end of 1 onLoop() iteration. I'm not sure though.

If you wanted to run it on a separate thread, it probably wouldn't be hard, to be honest. I'd just be very cautious of CPU usage because chances are that there's a reason why the developers would have decided against it.

well you could always check the last message sent every 50-100ms orso this shoudn't really cause a big increase in cpu usage tbh

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.