May 16, 20187 yr Currently I just have the mouse move to these coordinates over the item when trying to buy an item at the GE, but I don't know how to get it to click it https://gyazo.com/a28e5606ee3fc24e5870809fe88ce616 I've tried getMouse().click(MouseDestination destination) and define a destination for the mouse, but it wouldn't accept my statement. I also tried setting up a ClickMouseEvent, but it also didn't accept my statement for that. For defining the MouseDestination and ClickMouseEvent I tried defining them as: MouseDestination mouse_dest = getMouse().move(x:75 , y:385); I saw MouseDestination has a .getArea() but I didn't know how to set that up. or ClickMouseEvent mouse_click = " " Edited May 16, 20187 yr by Dab in a Lab
May 16, 20187 yr https://osbot.org/api/org/osbot/rs07/api/ui/RS2Widget.html there's a widget debugger that helps you find out more info about that little "iron ore item" Settings -> Options -> Debug tab -> Toggle on Widgets -> Open Widget Debugger now hover over the iron ore and you'll see several IDs pop up. type the root/child+/child++ in the debugger, hit query, and you'll see more data about that widget. (make sure you hover and choose the right IDs) after you find the right widget, you can just .interact() or w/e later on you can search/filter widgets based on other values. seems ids change often
May 16, 20187 yr Author 52 minutes ago, HeyImJamie said: Wut the Feck you find MouseDestination and ClickMouseEvent but not Widgets? 44 minutes ago, Stimpack said: https://osbot.org/api/org/osbot/rs07/api/ui/RS2Widget.html there's a widget debugger that helps you find out more info about that little "iron ore item" Settings -> Options -> Debug tab -> Toggle on Widgets -> Open Widget Debugger now hover over the iron ore and you'll see several IDs pop up. type the root/child+/child++ in the debugger, hit query, and you'll see more data about that widget. (make sure you hover and choose the right IDs) after you find the right widget, you can just .interact() or w/e later on you can search/filter widgets based on other values. seems ids change often When I tried to do the widget debugger earlier it told me the action options were null. Is that just because there is no "action" other than clicking it? I didn't think to try it, so instead I tried finding a way using some kind of mouse event
May 16, 20187 yr 1 hour ago, Dab in a Lab said: When I tried to do the widget debugger earlier it told me the action options were null. Is that just because there is no "action" other than clicking it? I didn't think to try it, so instead I tried finding a way using some kind of mouse event Yeah you just use .interact() with a widget you don't need to specify the action
May 17, 20187 yr 12 hours ago, Dab in a Lab said: Currently I just have the mouse move to these coordinates over the item when trying to buy an item at the GE, but I don't know how to get it to click it https://gyazo.com/a28e5606ee3fc24e5870809fe88ce616 I've tried getMouse().click(MouseDestination destination) and define a destination for the mouse, but it wouldn't accept my statement. I also tried setting up a ClickMouseEvent, but it also didn't accept my statement for that. For defining the MouseDestination and ClickMouseEvent I tried defining them as: MouseDestination mouse_dest = getMouse().move(x:75 , y:385); I saw MouseDestination has a .getArea() but I didn't know how to set that up. or ClickMouseEvent mouse_click = " " Why would you think this returns a MouseDestination
May 17, 20187 yr As a general rule of thumb, i'd avoid controlling the mouse directly (either moving it or clicking), unless there really isn't an alternative. The reason for this is there are a bunch of checks and precautions that need to be considered before doing such an action, which the API does for you when you use built in methods. I'm sure you can find some form of higher level API functionality to solve this problem for you, most likely via the Widget API. Best --Apa
May 17, 20187 yr Maybe the built in method is too slow for his needs? Personally i think osbots dialogue handler is really slow and cuts into my p/h for my moneymaking method. So i had my private scripter write their own method to make it faster Edited May 17, 20187 yr by thedevilhacker
May 17, 20187 yr Author 8 hours ago, FrostBug said: Why would you think this returns a MouseDestination Hahahaha well its a destination and it uses the mouse, so I tried to make it a MouseDestination
May 17, 20187 yr Author 6 hours ago, ItPoke said: If you are trying to interact with the GE why not just use the build in GE API? 4 hours ago, Canidae said: What is the reason you're not using the built-in buy method? The built in method that interacts with everything for you doesn't seem to allow a +5 or 10% raise in the item price, so I'm building my own and have it interact with everything. 3 hours ago, thedevilhacker said: Maybe the built in method is too slow for his needs? Personally i think osbots dialogue handler is really slow and cuts into my p/h for my moneymaking method. So i had my private scripter write their own method to make it faster The dialogue can be a bit unresponsive and be delayed to show up, but I put in a check for it, so it doesn't have any issues
May 17, 20187 yr 32 minutes ago, Dab in a Lab said: The built in method that interacts with everything for you doesn't seem to allow a +5 or 10% raise in the item price, so I'm building my own and have it interact with everything. The dialogue can be a bit unresponsive and be delayed to show up, but I put in a check for it, so it doesn't have any issues You could grab the price from OSBuddy's API. I think there's a snippet from that somewhere. You could just increase the price by 1.05 or 1.10, this makes it way too difficult.
May 17, 20187 yr Author 25 minutes ago, Canidae said: You could grab the price from OSBuddy's API. I think there's a snippet from that somewhere. You could just increase the price by 1.05 or 1.10, this makes it way too difficult. I got some help trying to use osbuddys price api, but I’m not experienced enough right now. It just looked like a cluster fuck of info
Create an account or sign in to comment