Encryption Posted October 11, 2005 Share Posted October 11, 2005 $Name = " " $Label_7 = GUICtrlCreateLabel($Name, 170, 70) $Label_7 = GUICtrlCreateLabel($Name, 170, 70) $Label_7 = GUICtrlCreateLabel(^ ERROR Link to comment Share on other sites More sharing options...
Valuater Posted October 11, 2005 Share Posted October 11, 2005 #include <GUIConstants.au3> GUICreate("My GUI") ; will create a dialog box that when displayed is centered $cell = "" $cell2 = " this works" GUICtrlCreateLabel ($cell, 10, 30) GUICtrlCreateLabel ($cell2, 40, 30) GUISetState () ; will display an empty dialog box ; Run the GUI until the dialog is closed Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE 8) Link to comment Share on other sites More sharing options...
Encryption Posted October 11, 2005 Author Share Posted October 11, 2005 expandcollapse popup;Testing Functions ClientInfo("EasyBot Test", "mason", "b4sketcase@gmail.com") InitBot() ;Client Info Variables and Client Info Function $botName = " " $author = " " $email = " " Func ClientInfo($NAMEOFBOT, $CREATOR, $EMAILADDRESS) $botName = $NAMEOFBOT $author = $CREATOR $email = $EMAILADDRESS EndFunc ;GUI On Start Creation with Script Info Func InitBot() GuiCreate("EasyBot v1.0", 402, 181,(@DesktopWidth-402)/2, (@DesktopHeight-181)/2) $Button_Start = GuiCtrlCreateButton("Start", 80, 140, 90, 30) $Button_Exit = GuiCtrlCreateButton("Exit", 230, 140, 90, 30) $Label_1 = GuiCtrlCreateLabel("EasyBot v1.0", 165, 10, 70, 20) $Label_2 = GUICtrlCreateLabel("By Mason", 175, 25) $Label_3 = GUICtrlCreateLabel("Script Info", 175, 50) $Label_4 = GUICtrlCreateLabel("Bot Name:", 140, 70) $Label_5 = GUICtrlCreateLabel("Author:", 155, 85) $Label_6 = GUICtrlCreateLabel("Author's Email:", 120, 100) $Label_7 = GUICtrlCreateLabel($botName, 170, 70) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button_Exit Exit Case $msg = $Button_Start ExitLoop EndSelect WEnd EndFunc Explain whats wrong? Link to comment Share on other sites More sharing options...
Valuater Posted October 11, 2005 Share Posted October 11, 2005 #include <GUIConstants.au3> 8) Link to comment Share on other sites More sharing options...
Encryption Posted October 11, 2005 Author Share Posted October 11, 2005 Its there, thats just a snippet of my code, but its the part generating the error. Link to comment Share on other sites More sharing options...
quaizywabbit Posted October 11, 2005 Share Posted October 11, 2005 expandcollapse popup;Testing Functions ClientInfo("EasyBot Test", "mason", "b4sketcase@gmail.com") InitBot() ;Client Info Variables and Client Info Function $botName = " " $author = " " $email = " " Func ClientInfo($NAMEOFBOT, $CREATOR, $EMAILADDRESS) $botName = $NAMEOFBOT $author = $CREATOR $email = $EMAILADDRESS EndFunc ;GUI On Start Creation with Script Info Func InitBot() GuiCreate("EasyBot v1.0", 402, 181,(@DesktopWidth-402)/2, (@DesktopHeight-181)/2) $Button_Start = GuiCtrlCreateButton("Start", 80, 140, 90, 30) $Button_Exit = GuiCtrlCreateButton("Exit", 230, 140, 90, 30) $Label_1 = GuiCtrlCreateLabel("EasyBot v1.0", 165, 10, 70, 20) $Label_2 = GUICtrlCreateLabel("By Mason", 175, 25) $Label_3 = GUICtrlCreateLabel("Script Info", 175, 50) $Label_4 = GUICtrlCreateLabel("Bot Name:", 140, 70) $Label_5 = GUICtrlCreateLabel("Author:", 155, 85) $Label_6 = GUICtrlCreateLabel("Author's Email:", 120, 100) $Label_7 = GUICtrlCreateLabel($botName, 170, 70) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button_Exit Exit Case $msg = $Button_Start ExitLoop EndSelect WEnd EndFuncExplain whats wrong? Func ClientInfo($NAMEOFBOT, $CREATOR, $EMAILADDRESS) $botName = $NAMEOFBOT $author = $CREATOR $email = $EMAILADDRESS EndFuncyou aren't returning anything from the function (the variables are local to the function and dont escape the function unless they are Global or you use Return ) [u]Do more with pre-existing apps![/u]ANYGUIv2.8 Link to comment Share on other sites More sharing options...
Valuater Posted October 11, 2005 Share Posted October 11, 2005 is there another gui is there another $Label1 is there another While 1 *********** i hate guessing at snippets 8) Link to comment Share on other sites More sharing options...
Valuater Posted October 11, 2005 Share Posted October 11, 2005 This works expandcollapse popup#include <GuiConstants.au3> ;Testing Functions ;ClientInfo("EasyBot Test", "mason", "b4sketcase@gmail.com") InitBot() ;Client Info Variables and Client Info Function Dim $botName = " " Dim $author = " " Dim $email = " " Func ClientInfo($NAMEOFBOT, $CREATOR, $EMAILADDRESS) $botName = $NAMEOFBOT $author = $CREATOR $email = $EMAILADDRESS EndFunc ;GUI On Start Creation with Script Info Func InitBot() Dim $botName = "" GuiCreate("EasyBot v1.0", 402, 181,(@DesktopWidth-402)/2, (@DesktopHeight-181)/2) $Button_Start = GuiCtrlCreateButton("Start", 80, 140, 90, 30) $Button_Exit = GuiCtrlCreateButton("Exit", 230, 140, 90, 30) $Label_1 = GuiCtrlCreateLabel("EasyBot v1.0", 165, 10, 70, 20) $Label_2 = GUICtrlCreateLabel("By Mason", 175, 25) $Label_3 = GUICtrlCreateLabel("Script Info", 175, 50) $Label_4 = GUICtrlCreateLabel("Bot Name:", 140, 70) $Label_5 = GUICtrlCreateLabel("Author:", 155, 85) $Label_6 = GUICtrlCreateLabel("Author's Email:", 120, 100) $Label_7 = GUICtrlCreateLabel($botName, 170, 70) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button_Exit Exit Case $msg = $Button_Start ExitLoop EndSelect WEnd EndFunc 8) Link to comment Share on other sites More sharing options...
Encryption Posted October 12, 2005 Author Share Posted October 12, 2005 expandcollapse popup$ClientInfo = ClientInfo("EasyBot Test", "mason", "b4sketcase@gmail.com") InitBot() Func ClientInfo($botname, $author, $email) Dim $Info[3] $Info[0] = $botname $Info[1] = $author $Info[2] = $email Return $Info EndFunc ;GUI On Start Creation with Script Info Func InitBot() GuiCreate("EasyBot v1.0", 402, 181,(@DesktopWidth-402)/2, (@DesktopHeight-181)/2) $Button_Start = GuiCtrlCreateButton("Start", 80, 140, 90, 30) $Button_Exit = GuiCtrlCreateButton("Exit", 230, 140, 90, 30) $Label_1 = GuiCtrlCreateLabel("EasyBot v1.0", 165, 10, 70, 20) $Label_2 = GUICtrlCreateLabel("By Mason", 175, 25) $Label_3 = GUICtrlCreateLabel("Script Info", 175, 50) $Label_4 = GUICtrlCreateLabel("Bot Name:", 140, 70) $Label_5 = GUICtrlCreateLabel("Author:", 155, 85) $Label_6 = GUICtrlCreateLabel("Author's Email:", 120, 100) $Label_7 = GUICtrlCreateLabel($ClientInfo[0], 170, 70) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button_Exit Exit Case $msg = $Button_Start ExitLoop EndSelect WEnd EndFunc There we are...fixed it up. Being stupid as usual...after being away from AutoIt for so long, it seems that C++ is so much more simple. Link to comment Share on other sites More sharing options...
Valuater Posted October 12, 2005 Share Posted October 12, 2005 (edited) instead of this $Label_7 = GUICtrlCreateLabel($ClientInfo[0], 170, 70) didn't you want this $Label_7 = GUICtrlCreateLabel($Info[0], 170, 70) ???? 8) EDIT Maybe not 8) Edited October 12, 2005 by Valuater Link to comment Share on other sites More sharing options...
w0uter Posted October 12, 2005 Share Posted October 12, 2005 how about instead of only posting ^error you could post the ACTUAL error. like "array subscript dimention exeeded" for ex. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Gene Posted October 13, 2005 Share Posted October 13, 2005 (edited) expandcollapse popup$ClientInfo = ClientInfo("EasyBot Test", "mason", "b4sketcase@gmail.com") InitBot() Func ClientInfo($botname, $author, $email) Dim $Info[3] $Info[0] = $botname $Info[1] = $author $Info[2] = $email Return $Info EndFunc ;GUI On Start Creation with Script Info Func InitBot() GuiCreate("EasyBot v1.0", 402, 181,(@DesktopWidth-402)/2, (@DesktopHeight-181)/2) $Button_Start = GuiCtrlCreateButton("Start", 80, 140, 90, 30) $Button_Exit = GuiCtrlCreateButton("Exit", 230, 140, 90, 30) $Label_1 = GuiCtrlCreateLabel("EasyBot v1.0", 165, 10, 70, 20) $Label_2 = GUICtrlCreateLabel("By Mason", 175, 25) $Label_3 = GUICtrlCreateLabel("Script Info", 175, 50) $Label_4 = GUICtrlCreateLabel("Bot Name:", 140, 70) $Label_5 = GUICtrlCreateLabel("Author:", 155, 85) $Label_6 = GUICtrlCreateLabel("Author's Email:", 120, 100) $Label_7 = GUICtrlCreateLabel($ClientInfo[0], 170, 70) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button_Exit Exit Case $msg = $Button_Start ExitLoop EndSelect WEnd EndFuncThere we are...fixed it up. Being stupid as usual...after being away from AutoIt for so long, it seems that C++ is so much more simple. Are the arrays in both these lines supposed to be the same name?Line 5 ------------------------------------------- $Info[0] = $botname Line 23 ----- $Label_7 = GUICtrlCreateLabel($ClientInfo[0], 170, 70)If they're not, where does $ClientInfo[0] get initialized? Edited October 13, 2005 by Gene [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... Link to comment Share on other sites More sharing options...
w0uter Posted October 13, 2005 Share Posted October 13, 2005 maby @ the top ? $ClientInfo = ClientInfo("EasyBot Test", "mason", "b4sketcase@gmail.com") My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Encryption Posted October 13, 2005 Author Share Posted October 13, 2005 I'm afraid you all misunderstood. My last code worked perfectly, I was just posting it to show what I had done... I should specify next time I suppose, but it really isn't fun that way. Link to comment Share on other sites More sharing options...
Gene Posted October 13, 2005 Share Posted October 13, 2005 maby @ the top ?$ClientInfo = ClientInfo("EasyBot Test", "mason", "b4sketcase@gmail.com")Yes, at the top, I must have been looking too hard. :"> [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... 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