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.

Wait for user input

Featured Replies

Hello, I haven't been scripting for OSBot in a while and recently started out experimenting with the mirror client.

 

I have a question though, when I interact anything that asks for user input (Make X, Deposit X, Withdraw X) The interface for input stays visible for some reason. This happens only after the first time which makes me assume that it's cashed even though I am using widgets and therefore shouldn't be cashed anymore.

 

Here's my code, please tell me what I am missing:
 

public boolean waitingForInput(){
        RS2Widget[] ws = widgets.getWidgets(548);
        RS2Widget widget = null;
        if(ws != null && ws.length > 0){
            for(RS2Widget w : ws){
                if(w != null && w.getMessage() != null && (w.getMessage().equals("Enter amount:"))){
                    widget = w;
                    break;
                }
            }
        }
        if(widget != null && widget.isVisible() ){
            System.out.println("Found valid input widget: " + widget.getSecondLevelId());
            return true;
        }
        return false;
    }

 

Hello, I haven't been scripting for OSBot in a while and recently started out experimenting with the mirror client.

 

I have a question though, when I interact anything that asks for user input (Make X, Deposit X, Withdraw X) The interface for input stays visible for some reason. This happens only after the first time which makes me assume that it's cashed even though I am using widgets and therefore shouldn't be cashed anymore.

 

Here's my code, please tell me what I am missing:

 

public boolean waitingForInput(){
        RS2Widget[] ws = widgets.getWidgets(548);
        RS2Widget widget = null;
        if(ws != null && ws.length > 0){
            for(RS2Widget w : ws){
                if(w != null && w.getMessage() != null && (w.getMessage().equals("Enter amount:"))){
                    widget = w;
                    break;
                }
            }
        }
        if(widget != null && widget.isVisible() ){
            System.out.println("Found valid input widget: " + widget.getSecondLevelId());
            return true;
        }
        return false;
    }

 

I've had this issue about half year ago.

Then i used the color of a pixel on the right side of the chatbox to check of the scrollbar was visible or not ;)

 

Not sureiof there better was atm.

 

Why don't you use the Osbot api for this?

Works just fine :)

 

Khaleesi

  • Author

I was using colorpicker up until now and will probably switch back, but I am just surprised this doesn't work ... And is there even a function for this in the API ?

 

Hello, I haven't been scripting for OSBot in a while and recently started out experimenting with the mirror client.

 

I have a question though, when I interact anything that asks for user input (Make X, Deposit X, Withdraw X) The interface for input stays visible for some reason. This happens only after the first time which makes me assume that it's cashed even though I am using widgets and therefore shouldn't be cashed anymore.

 

Here's my code, please tell me what I am missing:

 

public boolean waitingForInput(){
        RS2Widget[] ws = widgets.getWidgets(548);
        RS2Widget widget = null;
        if(ws != null && ws.length > 0){
            for(RS2Widget w : ws){
                if(w != null && w.getMessage() != null && (w.getMessage().equals("Enter amount:"))){
                    widget = w;
                    break;
                }
            }
        }
        if(widget != null && widget.isVisible() ){
            System.out.println("Found valid input widget: " + widget.getSecondLevelId());
            return true;
        }
        return false;
    }

Mirror client problem only, works fine in normal one :)

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.