- Joined
- Jul 28, 2016
- Messages
- 13
- Thread Author
- #1
Hello,
I've made a fletching bot succesfully with the state method and I've also managed to make a good GUI for it using embeddableUI and SceneBuilder.
I'm, however, having a hard time understanding newQuery(). In my bot for example, I have a menu option for the type of log to use and which item to make.
Now the options for the item are "Arrow shaft", "shortbow", "stock" and "shieldbow". If, for example, "shortbow" is selected I want to find the option for the shortbow in the make x interface. The problem here is I only have part of the name "Maple shortbow" so I have to find the option which contains a item which has "shortbow" in it's name and click it. Currently I'm using Interfaces.getAt() to get the interface container and component then i have a for loop to go through each subcomponent and see which contains the item which has "shortbow" in it's name and click it. I want to find the option by it's partial name so that the user doesn't need to type the name in the menu nor do I have to get full names od the items myself to have to write them down.
I'm willing to contribute to the community and make bots, but I want to make sure I'm using the most efficient and proper coding first. If someone could also shortly explain or give examples of predicates and newQuery() I'd appreciate it.
I've made a fletching bot succesfully with the state method and I've also managed to make a good GUI for it using embeddableUI and SceneBuilder.
I'm, however, having a hard time understanding newQuery(). In my bot for example, I have a menu option for the type of log to use and which item to make.
Now the options for the item are "Arrow shaft", "shortbow", "stock" and "shieldbow". If, for example, "shortbow" is selected I want to find the option for the shortbow in the make x interface. The problem here is I only have part of the name "Maple shortbow" so I have to find the option which contains a item which has "shortbow" in it's name and click it. Currently I'm using Interfaces.getAt() to get the interface container and component then i have a for loop to go through each subcomponent and see which contains the item which has "shortbow" in it's name and click it. I want to find the option by it's partial name so that the user doesn't need to type the name in the menu nor do I have to get full names od the items myself to have to write them down.
I'm willing to contribute to the community and make bots, but I want to make sure I'm using the most efficient and proper coding first. If someone could also shortly explain or give examples of predicates and newQuery() I'd appreciate it.
Last edited: