jpdeadly Posted April 28, 2011 Posted April 28, 2011 Hello there I'm very new to AutoIT, today is the first day i started messing with it a few hours ago and i have a little learning project I'm doing. I need a script to open 5 input boxes with user information typed in those boxes, each input for each box will then be hot keyed from key 1 - 5 doing the command they type in. here is what i go so far with it working 100% "only with two inputs will it not loop and screw up." What im looking for is to add 3 more options of input without it looping out and messing up, any help or incite would be awesome $a = InputBox(" AutoSpawn","Please Enter Item Command First Item") $b = InputBox(" AutoSpawn","Please Enter Item Command Second Item") Opt('SendKeyDelay', 5) Opt('SendKeyDownDelay', 5) HotKeySet("{1}", "Item1") HotKeySet("{2}", "Item2") While 1 Sleep(1000) ; I put a sleep here so our program doesn't use 100% of the CPU. WEnd Func Item1() send("T") sleep(100) send($a) send("{ENTER}") EndFunc Func Item2() send("T") sleep(100) send($b) send("{ENTER}") EndFunc
jpdeadly Posted April 28, 2011 Author Posted April 28, 2011 (edited) it seems to just keep typing and not hitting enter after the commands given from user On 4/28/2011 at 12:14 AM, 'jpdeadly said: Hello there I'm very new to AutoIT, today is the first day i started messing with it a few hours ago and i have a little learning project I'm doing. I need a script to open 5 input boxes with user information typed in those boxes, each input for each box will then be hot keyed from key 1 - 5 doing the command they type in. here is what i go so far with it working 100% "only with two inputs will it not loop and screw up." What im looking for is to add 3 more options of input without it looping out and messing up, any help or incite would be awesome $a = InputBox(" AutoSpawn","Please Enter Item Command First Item") $b = InputBox(" AutoSpawn","Please Enter Item Command Second Item") Opt('SendKeyDelay', 5) Opt('SendKeyDownDelay', 5) HotKeySet("{1}", "Item1") HotKeySet("{2}", "Item2") While 1 Sleep(1000) ; I put a sleep here so our program doesn't use 100% of the CPU. WEnd Func Item1() send("T") sleep(100) send($a) send("{ENTER}") EndFunc Func Item2() send("T") sleep(100) send($b) send("{ENTER}") EndFunc Edited April 28, 2011 by jpdeadly
jpdeadly Posted April 28, 2011 Author Posted April 28, 2011 EDIT it seems that the "/" Char is what is screwing up the functions of the hot key. if i type all letters then all 4 of my input boxes will type what was put in them. but if i put "/roggger 3 64" in the boxes it will loop out on the first hot key press. whats most important is that i will need the "/" Char as the first thing they type in"Ex = /give jim 3 64 apples"every input box WILL have the slash in front of it
Jayson Posted April 28, 2011 Posted April 28, 2011 (edited) Is this for MineCraft since your first post was related to this today. Edited April 28, 2011 by Jayson
jpdeadly Posted April 28, 2011 Author Posted April 28, 2011 On 4/28/2011 at 1:11 AM, 'Jayson said: Is this for MineCraft since your first post was related to this today.Since its not allowed i scrapped the idea on that, this is just for learning purposes. Can i say ill never use AutoIT for games and other programs i use no but i'm nowhere near good enough to start anything like that now. what this is for is an addition to a VB.NET program I'm writing / relearning how to code as well.
jpdeadly Posted April 28, 2011 Author Posted April 28, 2011 The same idea behind both projects i know but i really don't wanna have the disrespect of the community right from the bat haha, i just wanna learn hotkeying and inputs right now then im going for mouse automation
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now