K heres some threads. Hopefully one of them will answer your question.
http://osbot.org/forum/topic/90148-simple-ge-api/
http://osbot.org/forum/topic/73580-ge-selection
If these don't give you the info you need, look into widgets. Widgets are really useful if you need to tell the script to click something or type something in a certain area etc, or check if an area contains something. On the osbot client, log into a character and click settings - > options - > debug tab - > check widgets. Hover over your inventory for instance, it will show you the root and children of the area you are hovering. In my cannonball smithing script i used widgets to detect when my smithing had leveled up, so that i could tell it to start smithing again (because leveling up generally stops whatever you are doing). Heres the code, incase it helps you understand widgets a little better.
RS2Widget smithingLevelWidget = getWidgets().get(233, 0); // defining the widget variable.
if(smithingLevelWidget != null && smithingLevelWidget.isVisible() && smithingLevelWidget.getMessage().contains("Smithing"))
return Action.SMELT;
/* If the smithingLevelWidget is not equal to null, and is visible, and the widget contains the text "Smithing",
do Action.Smelt (this is the case that interacts with the furnace and smelts the cannonballs). */
http://osbot.org/api/org/osbot/rs07/api/Widgets.html
edit: @Saiyan copied me while i was writing this out, pls report. Ruined my dank response.