Zibit Posted June 6, 2010 Share Posted June 6, 2010 (edited) im trying to make a STEAM gui ( got it from another topic ) but theres a few problems with control handeling. its just that i have to be able to use the guictrlinput and list, but their not active or smthing STEAM.au3expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiAVI.au3> #include "fade.au3" #include <GDIPlus.au3> #include <StaticConstants.au3> #include <ComboConstants.au3> #Include <FTPEx.au3> #include <engine.au3> __steam_window('TheSync STEAM - Free Version', 1000, 600) ; WIDTH NOT SMALLER THEN 400 | HEIGHT NOT SMALLER THEN 200 === TRUST ME Func __steam_window($sWINDOW_TITLE, $iWINDOW_WIDTH, $iWINDOW_HEIGHT) Local $oWINDOW = GUICreate($sWINDOW_TITLE, $iWINDOW_WIDTH, $iWINDOW_HEIGHT, -1, -1, BitOR($WS_POPUP, $WS_SYSMENU, $WS_MINIMIZEBOX), $WS_EX_LAYERED) ; BitOR($WS_EX_TOOLWINDOW, $WS_EX_LAYERED)) GUISetFont(8, 400, 0, 'Tahoma') GUISetBkColor(0x494E49) GUICtrlCreatePic(@ScriptDir & '\data\hdr.bmp', 0, 0, $iWINDOW_WIDTH - 16, 20, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreatePic(@ScriptDir & '\data\hdr.bmp', $iWINDOW_WIDTH - 16, 0, 11, 5, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreatePic(@ScriptDir & '\data\hdr.bmp', $iWINDOW_WIDTH - 16, 16, 11, 4, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreatePic(@ScriptDir & '\data\hdr.bmp', $iWINDOW_WIDTH - 5, 0, 5, 20, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreateGraphic(0, 20, 1, $iWINDOW_HEIGHT) GUICtrlSetColor(-1, 0x686A65) GUICtrlCreateGraphic($iWINDOW_WIDTH - 1, 20, 1, $iWINDOW_HEIGHT) GUICtrlSetColor(-1, 0x686A65) GUICtrlCreateGraphic(0, $iWINDOW_HEIGHT - 1, $iWINDOW_WIDTH, 1) GUICtrlSetColor(-1, 0x686A65) Local $oCLOSE = GUICtrlCreatePic(@ScriptDir & '\data\cls.bmp', $iWINDOW_WIDTH - 16, 5, 11, 11, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) Local $oLABELHEADER = GUICtrlCreateLabel($sWINDOW_TITLE, 6, 0, $iWINDOW_WIDTH - 22, 20, $SS_CENTERIMAGE) GUICtrlSetColor(-1, 0xD8DED3) GUICtrlSetBkColor(-1, 0x5A6A50) $server = '188.72.243.34' $username = 'tnj-hosting.no-ip.org' $pass = '******' $Open = _FTP_Open('MyFTP Control') $Conn = _FTP_Connect($Open, $server, $username, $pass) _FTP_DirSetCurrent($Conn, "/steam") #cs ============================== EXAMPLE SECTION ================== #ce ============================== Local $oBUTTON_1 = GUICtrlCreateButton('News', 10, 30, 140, 20) GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma') GUICtrlSetTip(-1, "View News and updates!") Local $oBUTTON_2 = GUICtrlCreateButton('Create Server', 10, 60, 140, 20) GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma') GUICtrlSetTip(-1, "Create a server using Automated Hamachi.") Local $oBUTTON_3 = GUICtrlCreateButton('Servers', 10, 90, 140, 20) GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma') GUICtrlSetTip(-1, "View Servers created with TSGN") Local $oBUTTON_4 = GUICtrlCreateButton('Settings', 10, 120, 140, 20) GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma') GUICtrlSetTip(-1, "Change some settings") Local $oBUTTON_5 = GUICtrlCreateButton('Exit', 10, 150, 140, 20) GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma') GUICtrlSetTip(-1, "Are you sure ?") GUICtrlCreateGraphic(1, 20, 160, $iWINDOW_HEIGHT - 21) GUICtrlSetColor(-1, 0x464646) GUICtrlSetBkColor(-1, 0x464646) GUICtrlCreateGraphic(158, 20, 1, $iWINDOW_HEIGHT - 21) GUICtrlSetColor(-1, 0x3D423D) GUICtrlCreateGraphic(159, 20, 1, $iWINDOW_HEIGHT - 21) GUICtrlSetColor(-1, 0x424742) GUICtrlCreateGraphic(160, 20, 1, $iWINDOW_HEIGHT - 21) GUICtrlSetColor(-1, 0x454A45) $oLABELTOP = GUICtrlCreateLabel('News And Updates', 180, 31, $iWINDOW_WIDTH - 200, 20, $SS_CENTERIMAGE) GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma') GUICtrlSetColor(-1, 0xC4B550) GUICtrlCreateGraphic(170, 51, $iWINDOW_WIDTH - 180, 1) GUICtrlSetColor(-1, 0x636763) $create_server = 0 GUICtrlCreateGraphic(170, 30, $iWINDOW_WIDTH - 180, $iWINDOW_HEIGHT - 40) ; THIS CONTROL NEEDS TO BE LAST DUE TO OVERLAY ISSUES GUICtrlSetColor(-1, 0x686A65) #cs ============================== EXAMPLE SECTION ================== #ce ============================== GUICtrlCreatePic(@ScriptDir & '\data\cnr.bmp', 0, 0, 1, 1, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreatePic(@ScriptDir & '\data\cnr.bmp', $iWINDOW_WIDTH - 1, 0, 1, 1, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreatePic(@ScriptDir & '\data\cnr.bmp', 0, $iWINDOW_HEIGHT - 1, 1, 1, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreatePic(@ScriptDir & '\data\cnr.bmp', $iWINDOW_WIDTH - 1, $iWINDOW_HEIGHT - 1, 1, 1, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) $trans_read = IniRead("settings.ini", "GUI", "trans", 255) $max_trans = $trans_read _FadeGuiIn($oWINDOW, $max_trans) GUISetState(@SW_SHOW) _GDIPlus_Startup () $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($oWINDOW) $hPen = _GDIPlus_PenCreate (0xFF0000FF, 3) $hPen2 = _GDIPlus_PenCreate (0xFFFF0000, 3) $hPen3 = _GDIPlus_PenCreate (0xFFFFFFFF, 3) $ping = Ping("188.72.243.34", 1000) GUICtrlCreateLabel($ping & " ms", 10, 570, 30, 30) if $ping < 120 then _GDIPlus_GraphicsDrawLine ($hGraphic, -130, 560, -160, 560, $hPen) if $ping < 230 and $ping > 120 then _GDIPlus_GraphicsDrawLine ($hGraphic, -130, 560, -160, 560, $hPen3) if $ping > 230 then _GDIPlus_GraphicsDrawLine ($hGraphic, -130, 560, -160, 560, $hPen2) While 1 Local $eMSG = GUIGetMsg() Switch $eMSG Case $GUI_EVENT_CLOSE Local $iWINDOW_TRANS For $iWINDOW_TRANS = 255 To 0 Step -10 If $iWINDOW_TRANS > 0 Then WinSetTrans($oWINDOW,'',$iWINDOW_TRANS) Sleep(10) Next Exit Case $oCLOSE Local $iWINDOW_TRANS For $iWINDOW_TRANS = 255 To 0 Step -10 If $iWINDOW_TRANS > 0 Then WinSetTrans($oWINDOW,'',$iWINDOW_TRANS) Sleep(10) Next Exit Case $oButton_5 GUICtrlCreateLabel("", 190, 70, 750, 500) _FadeGUIOut($oWINDOW) Exit Case $oButton_4 GUICtrlCreateLabel("", 190, 70, 750, 500) Case $oButton_3 GUICtrlCreateLabel("", 190, 70, 750, 500) $aFile = _FTP_ListToArray($Conn, 2) $mylist = GUICtrlCreateList("", 190, 70, 300, 140) GUICtrlSetLimit($mylist, 10000) if $aFile[0] <> 0 then GUICtrlCreateLabel("There Are - " & $aFile[0] & " servers", 190, 220, 100, 20) $i = 0 do $i = $i + 1 _FTP_FileGet($Conn, $aFile[$i], @scriptdir & "/" & $aFile[$i]) $ip = FileReadLine($aFile[$i], 1) $split = StringSplit($ip, ":", 1) $ping = Ping($split[1], 300) $max_players = FileReadLine($aFile[$i], 2) GUICtrlSetData($mylist, $aFile[$i] & " - " & $ip & " - " & $max_players & " - " & $ping & " ms") until $i = $aFile[0] endif Case $oButton_2 GUICtrlCreateLabel("", 190, 70, 750, 500) GUICtrlCreateLabel("Create Server" & @CRLF & "Please fill out the forms!", 190, 70, 150, 40) GUICtrlSetColor(-1, 0xE6ECE0) GUICtrlCreateLabel("Server Name:", 190, 120, 70, 20) GUICtrlSetColor(-1, 0xE6ECE0) $name_input = GUICtrlCreateInput("", 280, 120, 300, 20) GUICtrlCreateLabel("Port( ip detected auto ):", 190, 150, 80, 30) GUICtrlSetColor(-1, 0xE6ECE0) $port_input = GUICtrlCreateInput("", 280, 150, 300, 20) $read = GUICtrlRead($port_input) if $read <> 0 then if IsNumber($port_input) = True then GUICtrlSetBkColor($port_input, 0x00ff00) if IsNumber($port_input) = False then GUICtrlSetBkColor($port_input, 0xff0000) endif GUICtrlCreateLabel("Max Players:", 190, 180, 70, 20) GUICtrlSetColor(-1, 0xE6ECE0) $players_input = GUICtrlCreateInput("", 280, 180, 300, 20) $read = GUICtrlRead($players_input) if $read <> 0 then if IsNumber($players_input) = True then GUICtrlSetBkColor($players_input, 0x00ff00) if IsNumber($players_input) = False then GUICtrlSetBkColor($players_input, 0xff0000) endif Case $oButton_1 GUICtrlCreateLabel("", 190, 70, 750, 500) GUICtrlCreateLabel("Aprill 3rd - " & @CRLF & "TheSync Free Steam GUI Was Developed By Zibit", 190, 70, 300, 30, BitOR($SS_RIGHT,$SS_CENTERIMAGE)) GUICtrlSetColor(-1, 0xE6ECE0) GUICtrlCreateLabel("Aprill 1st - " & @CRLF & "Project TSGN Was started", 190, 100, 187, 20, BitOR($SS_RIGHT,$SS_CENTERIMAGE)) GUICtrlSetColor(-1, 0xE6ECE0) EndSwitch WEnd EndFunc here's the engine.au3 func register_server() $name = IniRead("settings.ini", "server", "name", "Cs 1.6 Server") $port = IniRead("settings.ini", "server", "port", "27015") $max_players = IniRead("settings.ini", "server", "max_players", "32") $PublicIP = _GetIP() FileWriteLine($name, $PublicIP & ":" & $port & @CRLF & $max_players) _FTP_FilePut($Conn, $name, $name) FileDelete($name) EndFunc func close_server() $name = IniRead("settings.ini", "server", "name", "Cs 1.6 Server") _FTP_FileDelete($Conn, $name) EndFunc func create_server($name_input, $port_input, $players_input) $name = GUICtrlRead($name_input) $port = GUICtrlRead($port_input) $max_players = GUICtrlRead($players_input) IniWrite("settings.ini", "servers", "name", $name) IniWrite("settings.ini", "servers", "port", $port) IniWrite("settings.ini", "servers", "max_players", $max_players) EndFunc Edited June 6, 2010 by Zibit Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
VAN0 Posted June 6, 2010 Share Posted June 6, 2010 (edited) You have so many overlapping gui items.... Specifically these lines are covering your inputs, removing them fixed it in my test. GUICtrlCreateGraphic(170, 30, $iWINDOW_WIDTH - 180, $iWINDOW_HEIGHT - 40) ; THIS CONTROL NEEDS TO BE LAST DUE TO OVERLAY ISSUES GUICtrlSetColor(-1, 0x686A65) and many of these: GUICtrlCreateLabel("", 190, 70, 750, 500) And once again, you have so many overlapping items... But probably best solution would be make inputs on top (is it called z-order?) I don't know how though Edited June 6, 2010 by VAN0 Link to comment Share on other sites More sharing options...
Zibit Posted June 6, 2010 Author Share Posted June 6, 2010 k thanks Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam 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