Gurutz Posted December 24, 2006 Share Posted December 24, 2006 (edited) I'm considering a WoW Name Generator. I have over 300+ names. And i am willing to add these to this program. First what i have is this. CODE#include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("Name Generator - WoW", 339, 177, 192, 122) $Button1 = GUICtrlCreateButton("Generate Name", 80, 96, 169, 33) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") GUICtrlCreateLabel("Name will appear here.", 88, 40, 155, 17) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel("Created by Janine - Paladin - Wildhammer", 24, 152, 281, 20) GUICtrlSetFont(-1, 10, 400, 0, "Verdana") GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;;;;;; EndSelect WEnd And i need it so that. Everytime the button is pressed i want it to generate a name that i have chosen. Sorry for being a pain. Tell me where to start by editing the code. And then ill start adding the names. [thanks for everyones help - that helps xxxx] ps. I forgot to mention. You will be added to the credits. Edited December 24, 2006 by Gurutz Link to comment Share on other sites More sharing options...
Valuater Posted December 24, 2006 Share Posted December 24, 2006 One direction.... #include <GUIConstants.au3> $Names = StringSplit("Sam Serial,George Giant,Killer,Mad Man,Frank-enstien,Power boy,He-man,Maniac", ",") ; == GUI generated with Koda == $Form1 = GUICreate("Name Generator - WoW", 339, 177, 192, 122) $Button1 = GUICtrlCreateButton("Generate Name", 80, 96, 169, 33) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") $Label = GUICtrlCreateLabel("Name will appear here.", 88, 40, 155, 17, $SS_CENTER) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel("Created by Janine - Paladin - Wildhammer", 24, 152, 281, 20) GUICtrlSetFont(-1, 10, 400, 0, "Verdana") GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 $Hold = 0 Do $Random = Random(1,$Names[0],1) Until $Random <> $Hold $Hold = $Random GUICtrlSetData($Label, $Names[$Random]) ;;;;;;; EndSelect WEnd 8) Link to comment Share on other sites More sharing options...
Gurutz Posted December 24, 2006 Author Share Posted December 24, 2006 One direction.... #include <GUIConstants.au3> $Names = StringSplit("Sam Serial,George Giant,Killer,Mad Man,Frank-enstien,Power boy,He-man,Maniac", ",") ; == GUI generated with Koda == $Form1 = GUICreate("Name Generator - WoW", 339, 177, 192, 122) $Button1 = GUICtrlCreateButton("Generate Name", 80, 96, 169, 33) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") $Label = GUICtrlCreateLabel("Name will appear here.", 88, 40, 155, 17, $SS_CENTER) GUICtrlSetFont(-1, 8, 800, 0, "Verdana") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel("Created by Janine - Paladin - Wildhammer", 24, 152, 281, 20) GUICtrlSetFont(-1, 10, 400, 0, "Verdana") GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 $Hold = 0 Do $Random = Random(1,$Names[0],1) Until $Random <> $Hold $Hold = $Random GUICtrlSetData($Label, $Names[$Random]) ;;;;;;; EndSelect WEnd 8) Wow you reply'd fast man. Thanks for the great script. Ill add you to credit. So from here. All i need to do is EDIT "$Names = StringSplit("Sam Serial,George Giant,Killer,Mad Man,Frank-enstien,Power boy,He-man,Maniac", ",")" and add names and such in there. Link to comment Share on other sites More sharing options...
Valuater Posted December 24, 2006 Share Posted December 24, 2006 Welcome.... Merry Christmas! 8) Link to comment Share on other sites More sharing options...
Zedna Posted December 24, 2006 Share Posted December 24, 2006 Idea: store your names into external TXT file (each name on one line) and in your script replace: $Names = StringSplit("Sam Serial,George Giant,Killer,Mad Man,Frank-enstien,Power boy,He-man,Maniac", ",")oÝ÷ Ù¼ºÚ"µÍÌÍÓ[YÈHÝ[ÔÜ] [TXY ][ÝÛ[YË ][ÝÊKÔJ Resources UDF ResourcesEx UDF AutoIt Forum Search 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