Alpha11833 Posted July 4, 2013 Share Posted July 4, 2013 (edited) I have a question: How to simulate an F Key in osBot? Like F1 or F2... Need it for the tabs.. I don't want to use a mouseclick so please help! I only found the "client.typeKey" and "client.typeString" methods.. But its for String or chars only... Sincerely Edited July 4, 2013 by Alpha11833 Link to comment Share on other sites More sharing options...
Dog_ Posted July 4, 2013 Share Posted July 4, 2013 http://docs.oracle.com/javase/6/docs/api/java/awt/event/KeyEvent.html Link to comment Share on other sites More sharing options...
Alpha11833 Posted July 4, 2013 Author Share Posted July 4, 2013 ?? This is not in the bot.. this is for the whole pc.. so i have to focus the bot client.. I need a method in the client pls! Link to comment Share on other sites More sharing options...
Merccy Posted July 4, 2013 Share Posted July 4, 2013 Alpha why? You can just use this.openTab(Tab.XXX); Link to comment Share on other sites More sharing options...
H0ppy Posted July 4, 2013 Share Posted July 4, 2013 (edited) Just use Robot class or so ... why do you even need to send a keypress?You can change tabs way more easy. Check post above ^^ grtz Edited July 4, 2013 by H0ppy Link to comment Share on other sites More sharing options...
Alpha11833 Posted July 4, 2013 Author Share Posted July 4, 2013 Mhmm.. ok so it isn't possible? I can't click on the tab.. I have to use a shortcut for this... Link to comment Share on other sites More sharing options...
Merccy Posted July 4, 2013 Share Posted July 4, 2013 Alpha use this.openTab!!!! Link to comment Share on other sites More sharing options...
Alpha11833 Posted July 4, 2013 Author Share Posted July 4, 2013 (edited) Thank you.. But it's not working... The bot opens the tabs with the mouse... Not with a shortcut key like F1, F2, etc... I know, that it's possible to open tabs.. But thats not my problem.. Please read the topic + first Post! Edit: Sry, maybe it was a little bit inexplicit: I don't want to use the mouse cause im clicking in the inventory and want to use an Key like F1 to change tabs... Edited July 4, 2013 by Alpha11833 Link to comment Share on other sites More sharing options...
Wizard Posted July 4, 2013 Share Posted July 4, 2013 You cant do that, at least for now. Script class doesnt have KeyListener implementation. Link to comment Share on other sites More sharing options...
Alpha11833 Posted July 5, 2013 Author Share Posted July 5, 2013 All right.. That's what I wanted to know! Thanks! Link to comment Share on other sites More sharing options...
Ambassador Posted July 6, 2013 Share Posted July 6, 2013 This would be useful to have methods for key press because instead of always manually clicking the run button if the client just kept CTRL = true then the account will ALWAYS run Link to comment Share on other sites More sharing options...