Doflamingo Posted June 29, 2017 Share Posted June 29, 2017 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. Quote Link to comment Share on other sites More sharing options...
Viston Posted June 29, 2017 Share Posted June 29, 2017 (edited) Disable Input? - Your issue isn't very clear for me tbf. Edited June 29, 2017 by VISTY Quote Link to comment Share on other sites More sharing options...
transmission Posted June 29, 2017 Share Posted June 29, 2017 (edited) 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 June 29, 2017 by transmission Quote Link to comment Share on other sites More sharing options...
Doflamingo Posted June 29, 2017 Author Share Posted June 29, 2017 (edited) 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 June 29, 2017 by Doflamingo Quote Link to comment Share on other sites More sharing options...
Viston Posted June 29, 2017 Share Posted June 29, 2017 (edited) 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 June 29, 2017 by VISTY Quote Link to comment Share on other sites More sharing options...
Doflamingo Posted June 29, 2017 Author Share Posted June 29, 2017 (edited) 1 minute ago, VISTY said: You can disable input, have you tried that? I haven't tried that (seems to be what I want), but how do I do that? Edited June 29, 2017 by Doflamingo Quote Link to comment Share on other sites More sharing options...
Viston Posted June 29, 2017 Share Posted June 29, 2017 (edited) Just now, Doflamingo said: I haven't tried that (seems to be what I want), but how do I do that? click on settings > Disable Input In the client Edited June 29, 2017 by Visty Quote Link to comment Share on other sites More sharing options...
Doflamingo Posted June 29, 2017 Author Share Posted June 29, 2017 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. Quote Link to comment Share on other sites More sharing options...
Viston Posted June 29, 2017 Share Posted June 29, 2017 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? Quote Link to comment Share on other sites More sharing options...
Doflamingo Posted June 29, 2017 Author Share Posted June 29, 2017 (edited) 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 June 29, 2017 by Doflamingo Quote Link to comment Share on other sites More sharing options...
Viston Posted June 29, 2017 Share Posted June 29, 2017 (edited) 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 June 29, 2017 by Visty Quote Link to comment Share on other sites More sharing options...
Doflamingo Posted June 29, 2017 Author Share Posted June 29, 2017 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. Quote Link to comment Share on other sites More sharing options...
Viston Posted June 29, 2017 Share Posted June 29, 2017 (edited) 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 June 29, 2017 by Visty Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted June 29, 2017 Share Posted June 29, 2017 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? Quote Link to comment Share on other sites More sharing options...
Doflamingo Posted June 29, 2017 Author Share Posted June 29, 2017 (edited) 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 June 29, 2017 by Doflamingo 1 Quote Link to comment Share on other sites More sharing options...