Alpha11833 Posted July 4, 2013 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
Dog_ Posted July 4, 2013 Posted July 4, 2013 http://docs.oracle.com/javase/6/docs/api/java/awt/event/KeyEvent.html
Alpha11833 Posted July 4, 2013 Author 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!
H0ppy Posted July 4, 2013 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
Alpha11833 Posted July 4, 2013 Author 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...
Alpha11833 Posted July 4, 2013 Author 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
Wizard Posted July 4, 2013 Posted July 4, 2013 You cant do that, at least for now. Script class doesnt have KeyListener implementation.
Alpha11833 Posted July 5, 2013 Author Posted July 5, 2013 All right.. That's what I wanted to know! Thanks!
Ambassador Posted July 6, 2013 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