Jump to content

How to disable external mouse?


Doflamingo

Recommended Posts

Hello, I am trying to disable my external mouse from the script I am writing. For example, I know I can simply make methods to click at a specific Position, but I want to write the code so that it simply calls the click method without the position arguments, all the while being able to hover my mouse over the client.

 

For example, say you set your mouse position to the dialogue continue area, you don't need to set your mouse there once it's there, and if you have dialogues to click through, you wouldn't need to call the set position method, you'd simply call the click() method.

The problem is, the external mouse interferes and takes precedence. So instead of the mouse clicking at the specified position, it will click where you moved your external mouse to. Simply put, I want to disable the external mouse from interfering with the script. For now I've been using the mouse object, but is there a way to disable external mouse during script? If so, please let me know, thank you.

Link to comment
Share on other sites

30 minutes ago, VISTY said:

Disable Input?

- Your issue isn't very clear for me tbf.

he doesnt want his actual mouse interfering with the script ( i believe that is what he is asking )

 

meaning he still wants to be able to control it and do other tasks while the script is running (maybe)

 

i just confused myself.

gf

Edited by transmission
Link to comment
Share on other sites

37 minutes ago, transmission said:

he doesnt want his actual mouse interfering with the script ( i believe that is what he is asking )

 

meaning he still wants to be able to control it and do other tasks while the script is running (maybe)

 

i just confused myself.

gf

Exactly, I want to be able to move my mouse over the game without it interfering with the script. I want to cancel external control, and the only way to resume it would be to cancel the script completely.

 

But honestly, if my only option is to use the click method that requires position parameters, that's fine, but it would also be reasonable to cancel external control.

Edited by Doflamingo
Link to comment
Share on other sites

2 minutes ago, Doflamingo said:

Exactly, I want to be able to move my mouse over the game without it interfering with the script. I want to cancel external control, and the only way to resume it would be to cancel the script completely.

You can disable input, have you tried that?

I mean, when I read the word "Cancel external control" I immediately think about Disable Input, since that disables all control from your mouse to the botting client.

Edited by VISTY
Link to comment
Share on other sites

I need this for the source-code, thank you for telling me that, but I want to be able to run my script, and during the execution/run-time of the script, have that disabled automatically, so that the user doesn't even have a choice. Like I said, if no-one knows how, or it's not possible, it's not big deal because I can specify the location of the mouse in the overloaded click() method. But if someone knows how please tell me.

Link to comment
Share on other sites

1 minute ago, Doflamingo said:

I need this for the source-code, thank you for telling me that, but I want to be able to run my script, and during the execution/run-time of the script, have that disabled automatically, so that the user doesn't even have a choice. Like I said, if no-one knows how, or it's not possible, it's not big deal because I can specify the location of the mouse in the overloaded click() method. But if someone knows how please tell me.

Can I ask why you are trying to achieve that, if you don't mind?

Link to comment
Share on other sites

6 minutes ago, Visty said:

Can I ask why you are trying to achieve that, if you don't mind?

First off, because I'm an insane java programmer, and it's my first day here using this API, this is all "new" to me. I'm writing a tutorial island script, and I want it to click through dialogue..

 

Now like I said, I am very good with solving problems, and making literally anything, (Seriously you are all in for big treats...)

I already have a solution which is use the overloaded click() method. An overloaded method simply means that a method has a different signature, but the same name. 

Anyways, when you don't have the position method specified, and you simply want to do this algorithm -> (move mouse to dialogue position, click x amount of times until dialogue is finished)

You can't do that algorithm with the standard click(boolean rightClick) method... Because, if the user moves his mouse over the client, it will click where the mouse is, ignoring the dialogue and the pattern of clicks which are meant to be executed... 

 

I'm assuming that my already alternative solution may be the best, if not only solution so far, until someone corrects me, we will go with that.

Edited by Doflamingo
Link to comment
Share on other sites

14 minutes ago, Doflamingo said:

First off, because I'm an insane java programmer, and it's my first day here using this API, this is all "new" to me. I'm writing a tutorial island script, and I want it to click through dialogue..

 

Now like I said, I am very good with solving problems, and making literally anything, (Seriously you are all in for big treats...)

I already have a solution which is use the overloaded click() method. An overloaded method simply means that a method has a different signature, but the same name. 

Anyways, when you don't have the position method specified, and you simply want to do this algorithm -> (move mouse to dialogue position, click x amount of times until dialogue is finished)

You can't do that algorithm with the standard click(boolean rightClick) method... Because, if the user moves his mouse over the client, it will click where the mouse is, ignoring the dialogue and the pattern of clicks which are meant to be executed... 

 

I'm assuming that my already alternative solution may be the best, if not only solution so far, until someone corrects me, we will go with that.

Why not make it keep pressing space until your "Specific dialog" appears by detecting the widget, and interact with the option you are looking for? You don't have to make a pos for the mouse to click on. Since the API has an option do that for you in a dialog.

Also, upon starting the script, it should automatically disable user input in the client.

Since afaik, if the user laggs out, it might fuck up if you are using static x amount of space presses. So it's better to use conditional sleep I guess.

Edited by Visty
Link to comment
Share on other sites

2 minutes ago, Visty said:

Why not make it keep pressing space until your "Specific dialog" appears by detecting the widget, and interact with the option you are looking for? You don't have to make a pos for the mouse to click on. Since the API has an option do that for you in a dialog.

Also, upon starting the script, it should automatically disable user input in the client.

That's the result of not playing RS since 2007 for real haha, back when we had to click our dialogue. Yeah to-be honest, I am going to use a key press method for space-bar, and stick to position specified clicks.

Link to comment
Share on other sites

2 minutes ago, Doflamingo said:

That's the result of not playing RS since 2007 for real haha, back when we had to click our dialogue. Yeah to-be honest, I am going to use a key press method for space-bar, and stick to position specified clicks.

Have a look at this https://osbot.org/api/org/osbot/rs07/api/Widgets.html

And this https://osbot.org/api/org/osbot/rs07/api/Dialogues.html

Edited by Visty
Link to comment
Share on other sites

27 minutes ago, Doflamingo said:

First off, because I'm an insane java programmer, and it's my first day here using this API, this is all "new" to me. I'm writing a tutorial island script, and I want it to click through dialogue..

 

Now like I said, I am very good with solving problems, and making literally anything, (Seriously you are all in for big treats...)

I already have a solution which is use the overloaded click() method. An overloaded method simply means that a method has a different signature, but the same name. 

Anyways, when you don't have the position method specified, and you simply want to do this algorithm -> (move mouse to dialogue position, click x amount of times until dialogue is finished)

You can't do that algorithm with the standard click(boolean rightClick) method... Because, if the user moves his mouse over the client, it will click where the mouse is, ignoring the dialogue and the pattern of clicks which are meant to be executed... 

 

I'm assuming that my already alternative solution may be the best, if not only solution so far, until someone corrects me, we will go with that.

Insane Java programmer but can't read a fucking API? :???:

Link to comment
Share on other sites

3 minutes ago, HeyImJamie said:

Insane Java programmer but can't read a fucking API? :???:

And you buy scripts, while I make them. Reading an API has nothing to do with Java, you can read all the API, but it won't mean you can build the program. Plus, you don't even need to use those dialogue classes, you can simply say type (space) /** Which is more fucken efficient dumbasses */ , and btw, no1 solved this question yet, and you are a nobody.

 

Loser.

Edited by Doflamingo
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...