Dreamfire Posted May 14, 2009 Share Posted May 14, 2009 (edited) Here you go.If you like it, use it. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <ComboConstants.au3> __steam_window('STEAM - username', 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('hdr.bmp', 0, 0, $iWINDOW_WIDTH - 16, 20, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreatePic('hdr.bmp', $iWINDOW_WIDTH - 16, 0, 11, 5, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreatePic('hdr.bmp', $iWINDOW_WIDTH - 16, 16, 11, 4, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreatePic('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('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) #cs ============================== EXAMPLE SECTION ================== #ce ============================== Local $oBUTTON_1 = GUICtrlCreateButton('Button 1', 10, 30, 140, 20) GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma') Local $oBUTTON_2 = GUICtrlCreateButton('Button 2', 10, 60, 140, 20) GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma') Local $oBUTTON_3 = GUICtrlCreateButton('Button 3', 10, 90, 140, 20) GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma') Local $oBUTTON_4 = GUICtrlCreateButton('Button 4', 10, 120, 140, 20) GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma') Local $oBUTTON_5 = GUICtrlCreateButton('Button 5', 10, 150, 140, 20) GUICtrlSetFont(-1, 8, 800, 0, 'Tahoma') 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('HEADER TEXT', 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) GUICtrlCreateLabel('combo control', 190, 70, 100, 20, BitOR($SS_RIGHT,$SS_CENTERIMAGE)) GUICtrlSetColor(-1, 0xE6ECE0) GUICtrlCreateCombo('', 300, 70, 200, 20, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, 'Combo Item 1|Combo Item 2|Combo Item 3') GUICtrlCreateLabel('input control', 190, 100, 100, 20, BitOR($SS_RIGHT,$SS_CENTERIMAGE)) GUICtrlSetColor(-1, 0xE6ECE0) GUICtrlCreateInput('', 300, 100, 200, 20) 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('cnr.bmp', 0, 0, 1, 1, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreatePic('cnr.bmp', $iWINDOW_WIDTH - 1, 0, 1, 1, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreatePic('cnr.bmp', 0, $iWINDOW_HEIGHT - 1, 1, 1, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUICtrlCreatePic('cnr.bmp', $iWINDOW_WIDTH - 1, $iWINDOW_HEIGHT - 1, 1, 1, $SS_NOTIFY, $GUI_WS_EX_PARENTDRAG) GUISetState(@SW_SHOW) 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 EndSwitch WEnd EndFunc[uPDATE] << -- Check attachment (STEAM.au3)- Added sample controls- Enabled sys_menuDreamfire,hdr.bmpcnr.bmpcls.bmpSTEAM.au3 Edited May 16, 2009 by Dreamfire Link to comment Share on other sites More sharing options...
Skizmata Posted May 15, 2009 Share Posted May 15, 2009 Awesome job looks just like it, very fun. AutoIt changed my life. Link to comment Share on other sites More sharing options...
gseller Posted May 15, 2009 Share Posted May 15, 2009 Very Nice looking. Thanks for sharing. Link to comment Share on other sites More sharing options...
kor Posted May 15, 2009 Share Posted May 15, 2009 (edited) When trying to add the code Opt("GUIOnEventMode",1) for items in your window that I need to make clickable.. it maxes out the CPU. Edited May 15, 2009 by kor Link to comment Share on other sites More sharing options...
Dreamfire Posted May 15, 2009 Author Share Posted May 15, 2009 (edited) When trying to add the code Opt("GUIOnEventMode",1) for items in your window that I need to make clickable.. it maxes out the CPU. Can you post an example, i'd like the recreate what you mean. [EDIT 1] My CPU stays at around 27% (QuadCore) if i use Opt("GUIOnEventMode",1). CPU stays idle with GUIGetMsg() loop, maybe someone knows? Edited May 15, 2009 by Dreamfire Link to comment Share on other sites More sharing options...
kor Posted May 16, 2009 Share Posted May 16, 2009 Here is my code so far.Comment out the opt code and see what I mean.http://www.autoitscript.com/forum/index.ph...st&p=683343For my dual core as soon as it's run with the opt code uncommented it will max out that core. Link to comment Share on other sites More sharing options...
Dreamfire Posted May 16, 2009 Author Share Posted May 16, 2009 Here is my code so far.Comment out the opt code and see what I mean.http://www.autoitscript.com/forum/index.ph...st&p=683343For my dual core as soon as it's run with the opt code uncommented it will max out that core.Updated code,I still suggest you use GUIGetMsg() loop Link to comment Share on other sites More sharing options...
kor Posted May 16, 2009 Share Posted May 16, 2009 Updated code,I still suggest you use GUIGetMsg() loopWhat code would I use then to make the buttons launch applications or do a task if not for the OnEvent? Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 16, 2009 Share Posted May 16, 2009 maybe you should either use the helpfile... or search the general help forums its very simple [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
dirty Posted February 25, 2010 Share Posted February 25, 2010 I dont like steam for sticking its nose into recent games But the fact that GUI's like those are possible in AUTOIT is great news to me I wonder if AUTOIT could make a GUI like this or similar ?If so, how much of a performance issue are we talking about ? Am just curious if those cool GUI's are only possible in C family languages. Link to comment Share on other sites More sharing options...
danielkza Posted February 25, 2010 Share Posted February 25, 2010 @dirty: Whatever language was used to make this 'cool' GUI used the Windows API to do it, which is fully available in AutoIt with DLLCalls. Performance would not be my major concern: GUI code is lightweight in comparison to most workloads, and this won't change because you added exotic backgrounds or controls. Link to comment Share on other sites More sharing options...
zackrspv Posted March 4, 2010 Share Posted March 4, 2010 I dont like steam for sticking its nose into recent games But the fact that GUI's like those are possible in AUTOIT is great news to me I wonder if AUTOIT could make a GUI like this or similar ?If so, how much of a performance issue are we talking about ? Am just curious if those cool GUI's are only possible in C family languages.There's a cool little UDF that will use BMP's as transparent UI's. So that particular ui you mentioned isn't that far fetched. And the performance isn't hindered either. -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë. 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