-
Posts
19 -
Joined
-
Last visited
Everything posted by K3STROS
-
Hmmm... Not too sure what i'm doing wrong, i want to chose either one of the functions but at random Func GoG() Local $HoT = Random(0,1,1) If $HoT = 1 Then Call(JohnDoe()) Else $HoT = 0 Then Call(JaneDoe()) EndIf EndFunc
-
Ive been examining and working for a while now so i figured id turn to here, non of my HotKeys are working Heres my code, lmk if more is needed to help #include <AutoItConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> HotKeySet("{ESC}","Terminate") HotKeySet("{F5}","GetScreenPos1()") HotKeySet("{F6}","GetScreenPos2()") HotKeySet("{F7}","GetMapPos1()") HotKeySet("{F8}","GetMapPos2()") HotKeySet("{F9}","GetCompassPos()") Func GetScreenPos1() ; Game from Top Left Corner **DONE $xyTLC = MouseGetPos() MsgBox(0, "SUCCESS", "Top Left Corner has been set") EndFunc Func GetScreenPos2() ; Game from Bottom Right corner **DONE $xyBRC = MouseGetPos() MsgBox(0, "SUCCESS", "Bottom Right Corner has been set") EndFunc Func GetMapPos1() ; Game Map Top Left Corner **DONE $xyMTLC = MouseGetPos() MsgBox(0, "SUCCESS", "Top Left Map Corner has been set") EndFunc Func GetMapPos2() ; Game Map Bottom Right corner **DONE $xyMBRC = MouseGetPos() MsgBox(0, "SUCCESS", "Bottom Right Map Corner has been set") EndFunc Func GetCompassPos() ; F5 - Compass Position **DONE $xyCompass = MouseGetPos() MsgBox(0, "SUCCESS", "Compass has been set") EndFunc
-
Oh wow.. That was such little mistake! But none the less thank you vury much appreciate it! I'm quite new to this and what you posted after makes little sense to me. I will study it though so thank you again for that! You're awesome!
- 5 replies
-
- mouseclick
- formula
-
(and 2 more)
Tagged with:
-
There isn't a website, it's a rectangle containing 28 squares in total, 4X7 But there is a distance between all of the squares depending on your screen resolution. So the equations I created should work. Its when I use them with MouseClick( ) and try to multiply my variables is where I think I went wrong.
- 5 replies
-
- mouseclick
- formula
-
(and 2 more)
Tagged with:
-
What i have done is set Coordinates in xyBox1, xyBox2 and xyBox5 (with MouseGetPos() - The rest of my code works 100%) And instead of going out every time and entering every single box coordinate i figured i would come up with this "Formula" to calculate all the boxes locations by itself from what i have entered for my 3 Variables Everytime i run, it clicks on box 1, 2, 5, 6 and the crashes, skips box 3 and 4 Any Clue? Func FourxSeven() ; 0 Returns the X1 co-ordinate as an integer. ; 1 Returns the Y1 co-ordinate as an integer. Local $xSD = ($xyBox1[1] - $xyBox2[1]) ; (Box1 y - Box2 y) = xAxis - Sideways difference Local $yDD = ($xyBox1[0] - $xyBox5[0]) ; (Box1 x - Box5 x) = yAxis - Downwards Difference MouseClick("Left", $xyBox1[0], $xyBox1[1]) ;#1 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], $xyBox1[1]) ;#2 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD), $xyBox1[1]) ;#3 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2)), $xyBox1[1]) ;#4 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox1[0], $xyBox5[1]) ;#5 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], $xyBox5[1]) ;#6 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD)[0], $xyBox5[1]) ;#7 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2))[0], $xyBox5[1]) ;#8 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox1[0], ($xyBox5[1] + $yDD)[1]) ;#9 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], ($xyBox5[1] + $yDD))[1]) ;#10 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD)[0], ($xyBox5[1] + $yDD)[1]) ;#11 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2))[0], ($xyBox5[1] + $yDD)[1]) ;#12 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox1[0], ($xyBox5[1] + ($yDD * 2))[1]) ;#13 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], ($xyBox5[1] + ($yDD * 2))[1]) ;#14 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD)[0], ($xyBox5[1] + ($yDD * 2))[1]) ;#15 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2))[0], ($xyBox5[1] + ($yDD * 2))[1]) ;#16 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox1[0], ($xyBox5[1] + ($yDD * 3))[1]) ;#17 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], ($xyBox5[1] + ($yDD * 3))[1]) ;#18 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD)[0], ($xyBox5[1] + ($yDD * 3))[1]) ;#19 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2)[0], ($xyBox5[1] + ($yDD * 3))[1]) ;#20 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox1[0], ($xyBox5[1] + ($yDD * 4))[1]) ;#21 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], ($xyBox5[1] + ($yDD * 4))[1]) ;#22 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD)[0], ($xyBox5[1] + ($yDD * 4))[1]) ;#23 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2)[0], ($xyBox5[1] + ($yDD * 4))[1]) ;#24 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox1[0], ($xyBox5[1] + ($yDD * 5))[1]) ;#25 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", $xyBox2[0], ($xyBox5[1] + ($yDD * 5))[1]) ;#26 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + $xSD)[0], ($xyBox5[1] + ($yDD * 5))[1]) ;#27 Box Locations Sleep(Random(590,1390,1)) MouseClick("Left", ($xyBox2[0] + ($xSD * 2))[0], ($xyBox5[1] + ($yDD * 5))[1]) ;#28 Box Locations Sleep(Random(590,1390,1)) Sleep(Random(990, 1990, 1)) EndFunc
- 5 replies
-
- mouseclick
- formula
-
(and 2 more)
Tagged with:
-
How would i go about saving a mouse position into a variable, atm i have this but im really not sure if its the proper way to do it Im still very new to this Global $xyLocation = MouseGetPos() $Start_Exit_GUI = GUICreate("EXAMPLE", 228, 194, 398, 222) GUISetBkColor(0x0000FF) $Loc_Button = GUICtrlCreateButton("GET LOCATION", 0, 0, 227, 89, $WS_GROUP) GUICtrlSetFont(-1, 28, 400, 0, "Absolute Zero") $Exit_Button = GUICtrlCreateButton("EXIT", 0, 96, 227, 97, $WS_GROUP) GUICtrlSetFont(-1, 28, 400, 0, "Absolute Zero") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Loc_Botton LocButton() Case $Exit_Button Terminate() EndSwitch WEnd Func LocButton() MsgBox(0, "NOTICE", "Click on the Location you want") MouseClick($xyLocation[0],$xyLocation[1] MsgBox(0, "LOCATION","Location has been set") EndFunc Func Terminate() Exit 1 EndFunc I want $xyLocation to hold whatever x-y Coordinates from where the user clicks AFTER the MsgBox() is gone Thanks in advance for any help
- 4 replies
-
- mousegetpos
- saving pos
-
(and 1 more)
Tagged with:
-
Not too sure what i havent done properly at this point i have been going over it for a while. I'm also new to this. I want when i click a button on the "Settings" GUI ex. The first button, i want it to open a MsgBox(0), which it already does but then it does not give me any time to click a location to record my XY coordinates into the variable. #include <AutoItConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> #include <MsgBoxConstants.au3> HotKeySet('{ESC}', "Terminate") Global $Point = MouseGetPos() Global $xyTEL1 Global $xyBOOTEL2 Global $xyITM Global $xyEMPINV Global $xyCLOBAN Global $xyBox1 Global $xyBox2 Global $xyBox5 #Region ### START Koda GUI section ### $Start_Exit_GUI = GUICreate("----", 228, 194, 398, 222) ; Opens GUI with start/exit buttons GUISetBkColor(0x0000FF) $Start_Botton = GUICtrlCreateButton("START", 0, 0, 227, 89, $WS_GROUP) ; Start button GUICtrlSetFont(-1, 28, 400, 0, "Absolute Zero") GUICtrlSetColor(-1, 0xFF00FF) GUICtrlSetBkColor(-1, 0x00FF00) $Exit_Button = GUICtrlCreateButton("EXIT", 0, 96, 227, 97, $WS_GROUP) ; Exit butto GUICtrlSetFont(-1, 28, 400, 0, "Absolute Zero") GUICtrlSetColor(-1, 0xFFFF00) GUICtrlSetBkColor(-1, 0xFF0000) $ExitLabel = GUICtrlCreateLabel("ESC", 100, 160, 26, 26) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0x00FFFF) GUICtrlSetBkColor(-1, 0xFF0000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Start_Botton ; What happens when Start button is clicked Settings() Case $Exit_Button ; What happens when Exit or F2 button is clicked/pressed Terminate() EndSwitch WEnd Func Settings() $Settings = GUICreate("SETTINGS", 436, 315, 271, 221) GUISetBkColor(0x0000FF) $Settings_Label1 = GUICtrlCreateLabel("Since this is Beta0.1 Things have to be set manually.", 0, 0, 429, 26) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xFF00FF) $Setting_Label2 = GUICtrlCreateLabel("Simply follow the prompts", 106, 32, 216, 26) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xFF00FF) $Settings_BUTBAN = GUICtrlCreateButton("----", 160, 104, 121, 33, $WS_GROUP) $Settings_BUTITE = GUICtrlCreateButton("----", 160, 144, 121, 33, $WS_GROUP) $Settings_BUTEMP = GUICtrlCreateButton("----", 160, 184, 121, 33, $WS_GROUP) $Setting_BUTINVTAB = GUICtrlCreateButton("----", 160, 64, 121, 33, $WS_GROUP) $Settings_BUTX = GUICtrlCreateButton("----", 160, 224, 121, 33, $WS_GROUP) $Setting_Button_Start = GUICtrlCreateButton("----", 184, 288, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Settings_BUTBAN T1_Button() Case $Settings_BUTITE ITELOC_Button() Case $Settings_BUTEMP EMPINV_Button() Case $Setting_BUTINVTAB SelectInvBoxes() Case $Settings_BUTX CLOINV_Button() ; Case $Setting_Button_Start ;;NO CODE ; Start() EndSwitch WEnd EndFunc Func Terminate() Exit 1 EndFunc Func Start() While 1 Call(BankTeller()) Sleep (Random (90,200,1)) Call(EmptyInventory()) Sleep (Random (90,200,1)) Call(TakeAskesBones()) Sleep (Random (90,200,1)) Call(CloseInventory()) Sleep (Random (90,200,1)) Call(SpreadBury()) Sleep (Random (90,200,1)) WEnd EndFunc Func T1_Button() MsgBox(0, "----", "----") $xyTEL1 = MouseGetPos() MsgBox(0, "----","----") Call(T2) EndFunc Func T2() MsgBox(0, "----" "----") $xyBOOTEL2 = MouseGetPos() MsgBox(0, "----", "----") EndFunc Func ITELOC_Button() MsgBox(0, "----" "----") $xyITM = MouseGetPos() MsgBox(0, "----", "----") EndFunc Func EMPINV_Button() MsgBox(0, "----", "----") $xyEMPINV = MouseGetPos() MsgBox(0, "----","----") EndFunc Func CLOINV_Button() MsgBox(0, "----", "----") $xyCLOBAN = MouseGetPos() ; Sets the position for the X to close your bank MsgBox(0, "----", "----") EndFunc Func SELINVBOX_Button() MsgBox(16, "----", "----") Call(INVBOX1_POS()) Call(INVBOX2_POS()) Call(INVBOX3_POS()) EndFunc Func INVBOX1_POS() MsgBox(0, "----", "----") $xyBox1 = MouseGetPos() MsgBox(0, "----", "----") EndFunc Func INVBOX2_POS() MsgBox(0, "----", "----") $xyBox2 = MouseGetPos() MsgBox(0, "----", "----") EndFunc Func INVBOX3_POS() MsgBox(0, "----", "----") $xyBox5 = MouseGetPos() MsgBox(0, "----", "----") EndFunc
-
Found my answer, thanks anyway
-
Works perfectly! Thanks alot! Had it coded properly in the rest on my code guess i must of type wrong then copy/paste
-
Im very new to this, how and where would i put _ArrayShuffle ?
- 7 replies
-
- random
- random variable
-
(and 1 more)
Tagged with:
-
Self explanatory, why doesn't this work? Sleep((Random, 990, 1990, 1))Thanks in advance
-
Thank ya vuury much
- 7 replies
-
- random
- random variable
-
(and 1 more)
Tagged with:
-
Global $Point = MouseGetPos() Global $Point1 = PixelSearch(599, 499, 735, 567, 0xA95C1D, 5) $Start_Exit_GUI = GUICreate("XXX", 228, 194, 398, 222) ; Opens GUI with start/exit buttons GUISetBkColor(0x0000FF) $Start_Botton = GUICtrlCreateButton("START", 0, 0, 227, 89, $WS_GROUP) ; Start button GUICtrlSetFont(-1, 28, 400, 0, "Absolute Zero") GUICtrlSetColor(-1, 0xFF00FF) GUICtrlSetBkColor(-1, 0x00FF00) $Exit_Button = GUICtrlCreateButton("EXIT", 0, 96, 227, 97, $WS_GROUP) ; Exit button GUICtrlSetFont(-1, 28, 400, 0, "Absolute Zero") GUICtrlSetColor(-1, 0xFFFF00) GUICtrlSetBkColor(-1, 0xFF0000) Func SearchExample() If IsArray($Point1) = Then MouseClick("Left", $Point[0], $Point[1]) EndIf Sleep((Random, 990, 1990, 1)) EndFunci get this error message (88) : ==> Error in expression.: If IsArray($Point1) = Then ; Line 88 If ^ ERROR
-
I dont have the code, ive been doing trial and error with suggestions from others with alot of trials & errors with no success
- 7 replies
-
- random
- random variable
-
(and 1 more)
Tagged with:
-
I have 35 variables (as shown below) in an array and i want it to randomly select one, and then another and another and another so on, until all 35 are selected but never selecting the same one twice.. this has been my only issue Global $example[35][ex1, ex2, ex3....,] Global $ex1 = MouseClick("Left", x1, y1) Global $ex2 = MouseClick("Left", x1, y1) Global $ex3 = MouseClick("Left", x1, y1) ; ect..... Func Something() Random($example) ;35 Times, cant be same var EndFunc Thanks in advance
- 7 replies
-
- random
- random variable
-
(and 1 more)
Tagged with:
-
So i am fairly new to programing... Very new actually. Im not sure if im doing any of this properly. I dont quite yet understand how to properly create functions and use them. Hope its not too much of a mess Anything that has a comment on it is because it has not been completed because i am not quite sure how. I want my bot to search for the pixels, click on "x" but if it cant be found to look for "y" instead and do the same. <snip>
-
I think the title is pretty self explanatory, I have created a .gif that i want to use as my GUI background but when i put it in, the GUI just see's it as a picture and it sits still. + Also how do I make a picture transparent so it the white is Transparent? Thanks in advance
-
Thanks Melba, i appreciate your help, i hadn't actually read the rules, but now i did, i wont post any more game scripts here, thanks for letting me know . I certainly didn't think someone would re-write my code i was expecting someone to know what i was doing wrong, i really appreciate that you went beyond to help now, i can compare! Thanks for all your help. I will defiantly be needing more help in the future.
-
So this is what i have got so far... Could someone please let me know what im doing wrong at this point? The next thing that should be poping up depending on which of the 4 buttons you click should be another GUI with 1-4 input boxes for player names, but then nothing happens... Ive been going at it for a couple hours and i really feel like a moron. Thanks in advance #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\users\k3stros\desktop\programs\my game\gui's\start.kxf $Launch_Game = GUICreate("PLAY or NAH", 212, 155, 302, 218) GUISetBkColor(0x00FF00) $PlayButton = GUICtrlCreateButton("PLAY", 0, 0, 209, 73, $WS_GROUP) GUICtrlSetFont(-1, 24, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0x0000FF) $ExitButton = GUICtrlCreateButton("EXIT", 0, 80, 209, 73, $WS_GROUP) GUICtrlSetFont(-1, 26, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0xFF0000) $EndGameLabel = GUICtrlCreateLabel("(TERMINATE PROGRAM)", 40, 128, 131, 17, $SS_CENTER) GUICtrlSetBkColor(-1, 0xFF0000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $PlayButton $Number_of_Players = GUICreate("Number Of Players", 212, 182, -1, -1) $Number_of_Players1 = GUICtrlCreateButton("1", 8, 32, 89, 65, $WS_GROUP) GUICtrlSetFont(-1, 24, 400, 0, "Absolute Zero") $Number_of_Players3 = GUICtrlCreateButton("3", 8, 112, 89, 65, $WS_GROUP) GUICtrlSetFont(-1, 24, 400, 0, "Absolute Zero") $Number_of_Players4 = GUICtrlCreateButton("4", 112, 112, 89, 65, $WS_GROUP) GUICtrlSetFont(-1, 24, 400, 0, "Absolute Zero") $Number_of_Players2 = GUICtrlCreateButton("2", 112, 32, 89, 65, $WS_GROUP) GUICtrlSetFont(-1, 24, 400, 0, "Absolute Zero") $Number_of_Players_Banner = GUICtrlCreateLabel("HOW MANY PLAYERS", 8, 8, 198, 16) GUICtrlSetFont(-1, 10, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0x00FF00) GUISetState(@SW_SHOW) Case $ExitButton Exit 1 EndSwitch WEnd While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Number_of_Players1 $P1NamePromptGUI = GUICreate("1 PLAYER", 188, 135, 500, 274) GUISetBkColor(0x0000FF) $Player1Input = GUICtrlCreateInput("PLAYER 1", 8, 8, 169, 24, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $WS_BORDER)) GUICtrlSetLimit(-1, 7) GUICtrlSetFont(-1, 14, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0x00FFFF) GUICtrlSetCursor(-1, 5) $ConfirmName = GUICtrlCreateButton("Confirm", 40, 96, 105, 33, $WS_GROUP) $CharacterLimit = GUICtrlCreateLabel("7 Characters Max", 24, 72, 136, 25, $SS_CENTER) GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman") $BotLabel = GUICtrlCreateLabel("COMPUTER", 8, 40, 172, 23, BitOR($SS_CENTER, $SS_RIGHT, $SS_GRAYFRAME, $SS_WHITEFRAME, $SS_SIMPLE, $SS_SUNKEN)) GUICtrlSetFont(-1, 16, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0xFF0000) GUISetState(@SW_SHOW) Case $Number_of_Players2 $P2NamePromptGUI_1 = GUICreate("2 PLAYERS", 188, 142, 500, 274) GUISetBkColor(0x0000FF) $Player1Input = GUICtrlCreateInput("PLAYER 1", 8, 8, 169, 24, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $WS_BORDER)) GUICtrlSetLimit(-1, 7) GUICtrlSetFont(-1, 14, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0x00FFFF) GUICtrlSetCursor(-1, 5) $ConfirmName = GUICtrlCreateButton("Confirm", 40, 104, 105, 33, $WS_GROUP) $CharacterLimit = GUICtrlCreateLabel("7 Characters Max", 24, 80, 136, 25, $SS_CENTER) GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman") $Player2Input = GUICtrlCreateInput("Player 2", 8, 48, 169, 24, BitOR($ES_CENTER, $ES_AUTOHSCROLL)) GUICtrlSetFont(-1, 14, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0xFF0000) GUISetState(@SW_SHOW) Case $Number_of_Players3 $P3NamePromptGUI_1_1 = GUICreate("3 PLAYERS", 188, 183, 500, 274) GUISetBkColor(0x0000FF) $Player1Input = GUICtrlCreateInput("PLAYER 1", 8, 8, 169, 24, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $WS_BORDER)) GUICtrlSetLimit(-1, 7) GUICtrlSetFont(-1, 14, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0x00FFFF) GUICtrlSetCursor(-1, 5) $ConfirmName = GUICtrlCreateButton("Confirm", 40, 144, 105, 33, $WS_GROUP) $CharacterLimit = GUICtrlCreateLabel("7 Characters Max", 24, 120, 136, 25, $SS_CENTER) GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman") $Player2Input = GUICtrlCreateInput("Player 2", 8, 48, 169, 24, BitOR($ES_CENTER, $ES_AUTOHSCROLL)) GUICtrlSetFont(-1, 14, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0xFF0000) $Player3Input = GUICtrlCreateInput("player 3", 8, 88, 169, 24, BitOR($ES_CENTER, $ES_AUTOHSCROLL)) GUICtrlSetFont(-1, 14, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0x00FF00) GUISetState(@SW_SHOW) Case $Number_of_Players4 $P4NamePromptGUI_2 = GUICreate("4 PLAYERS", 188, 239, 500, 274) GUISetBkColor(0x0000FF) $Player1Input = GUICtrlCreateInput("PLAYER 1", 8, 8, 169, 24, BitOR($ES_CENTER, $ES_AUTOHSCROLL, $WS_BORDER)) GUICtrlSetLimit(-1, 7) GUICtrlSetFont(-1, 14, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0x00FFFF) GUICtrlSetCursor(-1, 5) $ConfirmName = GUICtrlCreateButton("Confirm", 40, 192, 105, 33, $WS_GROUP) $CharacterLimit = GUICtrlCreateLabel("7 Characters Max", 24, 168, 136, 25, $SS_CENTER) GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman") $Player2Input = GUICtrlCreateInput("Player 2", 8, 48, 169, 24, BitOR($ES_CENTER, $ES_AUTOHSCROLL)) GUICtrlSetFont(-1, 14, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0xFF0000) $Player3Input = GUICtrlCreateInput("player 3", 8, 88, 169, 24, BitOR($ES_CENTER, $ES_AUTOHSCROLL)) GUICtrlSetFont(-1, 14, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0x00FF00) $Player4Input = GUICtrlCreateInput("Player 4", 8, 128, 169, 24, BitOR($ES_CENTER, $ES_AUTOHSCROLL)) GUICtrlSetFont(-1, 14, 400, 0, "Absolute Zero") GUICtrlSetBkColor(-1, 0xFFFF00) GUISetState(@SW_SHOW) EndSwitch WEnd
-
So i am very new to this but im sorta catching on pretty quick but one thing i have yet to find out is, how do i open up a new .au3 from a function that is activated by using a button from a GUI scrip. If that didnt make sense maybe this will Player Selection GUI.au3 What i want to do is to have these buttons activate a different function depending on what the User clicks So my idea is it would look something like this, When user would click on #1 another GUI would appear and ask for a USERNAME Choose Name P1.au3 which i think i have scripted properly since is runs Func OnePlayer() Run " Choose Name P1.au3" iknow this isnt the actual function but i dont know what it is... EndFunc Func TwoPlayer() Run " Choose Name P2.au3" EndFunc etcetera etcetera... Havent found any help with this anywhere so it must just be a newby thing Thanks for any help Player Selection GUI.au3 Choose Name P1.au3