Rydextillxixdiex Posted May 23, 2008 Share Posted May 23, 2008 (edited) I need to create a GUI that has 4 buttons, each with different custom Text. Is there a way to assign a function name or signifier of some sort to each button so that the button specific function can later be placed into the base function to be called on? For example: Func start() While 1 Global $show = 0 Global $target = 0x6a0706 MouseClick("Right", 652, 421, 1, 0) Sleep(5000) Join() Sleep(5000) Enter() Sleep(5000) Attack() ;<====== Will be different depending on User Button Input If $show > 0 then ExitLoop WEnd EndFunc I need 4 GUI buttons that will replace the function call "Attack()" with Attack1(), Attack2(), Attack3(), and Attack4() as they are all different. Maybe if each button was assigned a name you could use If $button1 = _______ then Attack1() I'm not sure though, have never done any work with GUIs so i have come to the forums for help! Thanks in Advance everyone. EDIT: smile.gif, Let me reword this. I want 4 Buttons in a Pop Up Window, and depending on which button you press it will "Replace" Attack() in the script with a specified function, designed specifically for each button. The idea is that the Func Start() script is still there, however depending on which button is pressed when the script reaches the attack() step, i would like it to be 4 different things depending on the button pressed at the beggining. The GUI button selector would have to pop up as soon as you opened the .Au3/.Exe script, and the the program will start running with your selection placed in the Func start() where Attack() currently is. Hope this makes a little more sense xD. Edited May 23, 2008 by Rydextillxixdiex ...will never learn all there is to know about autoit, no worries...i came to the forums :) Link to comment Share on other sites More sharing options...
Valuater Posted May 23, 2008 Share Posted May 23, 2008 Please don't double postI need to create a GUI that has 4 buttons, each with different custom Text.as I stated in the EDIT of your other postAfter reading your other post.. Use Koda Form Designer ( its in the Scite tools menu) to design the layout of your GUI8) Link to comment Share on other sites More sharing options...
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