Rubick 30 Posted July 25, 2017 Maybe it's a tab, or widgets works too. But I'm trying to select the "Public" option, from "Friends" private chat.
Pyth 128 Posted July 25, 2017 You're going to have to draw a rectangle based on the widgets bounds then interact with getMouse
Rubick 30 Author Posted July 26, 2017 You're going to have to draw a rectangle based on the widgets bounds then interact with getMouse Would i use getX and getY? Would I use mouse position coordinates? Sometimes the API isn't clear enough, although that's probably my inexperience showing. Thanks for the help mate, cheers.
Pyth 128 Posted July 26, 2017 Would i use getX and getY? Would I use mouse position coordinates? Sometimes the API isn't clear enough, although that's probably my inexperience showing. Thanks for the help mate, cheers. Okay so once you have your widget what you need to do is make a rectangle based on your widget First we null check our widget if(Widget != null){ Then we make our rectangle Rectangle rect = new Rectangle(Widget.getRectangle().x, Widget.getRectangle().y, Widget.getRectangle().width-1, Widget.getRectangle().height-1); now we move our mouse into position getMouse().move(rect); Now we need to right click, so to right click we use getMouse().click(true); // true = right click, false = left click now this is where it gets interesting, we need to manually click an option that changes depending on where you right click. I cant do this part for you because I want you to understand how it's done. I'll do some of it underneath but I want you to find the point data. We need a new point to move the mouse to then we need to move the mouse to that point Point point = new Point(getMouse().getX(),getMouse().getY() + ??? ); // how far do we need to go down to select the option you want, collect the point data and add it to this code getMouse().move(point); getMouse().click(false); // now we use false to left click let me know if you get stuck again.
Manly 879 Posted July 26, 2017 Initialise and assign your widget first. In this case I have assigned it to make. Then this is for a right click. Put false instead of true for left click. getMouse().click(make.getRectangle(), true)
Rubick 30 Author Posted July 26, 2017 Okay so once you have your widget what you need to do is make a rectangle based on your widget First we null check our widget if(Widget != null){ Then we make our rectangle Rectangle rect = new Rectangle(Widget.getRectangle().x, Widget.getRectangle().y, Widget.getRectangle().width-1, Widget.getRectangle().height-1); now we move our mouse into position getMouse().move(rect); Now we need to right click, so to right click we use getMouse().click(true); // true = right click, false = left click now this is where it gets interesting, we need to manually click an option that changes depending on where you right click. I cant do this part for you because I want you to understand how it's done. I'll do some of it underneath but I want you to find the point data. We need a new point to move the mouse to then we need to move the mouse to that point Point point = new Point(getMouse().getX(),getMouse().getY() + ??? ); // how far do we need to go down to select the option you want, collect the point data and add it to this code getMouse().move(point); getMouse().click(false); // now we use false to left click let me know if you get stuck again. Initialise and assign your widget first. In this case I have assigned it to make. Then this is for a right click. Put false instead of true for left click. getMouse().click(make.getRectangle(), true) Thank you for the time to explain this out for me, going to give it a shot now!
Xephy 237 Posted July 30, 2017 getWidgets().getWidget(162).getChild(15).interact("Private: Show friends"); Straight from the mule script itself. Should still be up to date.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.