JavaScript_Freek Posted August 9, 2006 Author Posted August 9, 2006 (edited) Maybe Jon can add this to Sample GUI V2 for next release... Saradith: I am planning to add more GUI Stuff. Well this is great i can find. WindowsConstants.au3 anyone got it, i can add? Edited August 9, 2006 by JavaScript_Freek [center]Cookyx.com :: Simple LAN Chat[/center]
CWorks Posted August 9, 2006 Posted August 9, 2006 posted before trying it but this one works $installdir=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","betaInstallDir") ; $installdir = StringReplace( $installdir , " " , Chr( 32 ) ) Run("explorer.exe " & $installdir & "\Examples") Case $msg = $prog2 Run("explorer.exe " & $installdir & "\Icons") Case $msg = $prog3 Run("explorer.exe " & $installdir & "\SciTe") Case $msg = $prog4 Run("explorer.exe " & $installdir & "\AU3Info.exe") Case $msg = $prog5 Run("explorer.exe " & $installdir & "\Extras")
JavaScript_Freek Posted August 9, 2006 Author Posted August 9, 2006 (edited) I accidenly deleted WindowsConstants.au3. Without i can't run SGUIM. Anyone got? Edited August 9, 2006 by JavaScript_Freek [center]Cookyx.com :: Simple LAN Chat[/center]
CWorks Posted August 9, 2006 Posted August 9, 2006 expandcollapse popup#include-once ; ------------------------------------------------------------------------------ ; ; AutoIt Version: 3.1.1 (beta) ; Language: English ; Description: Windows constants. ; ; ------------------------------------------------------------------------------ ; Window Styles Global Const $WS_TILED = 0 Global Const $WS_OVERLAPPED = 0 Global Const $WS_MAXIMIZEBOX = 0x00010000 Global Const $WS_MINIMIZEBOX = 0x00020000 Global Const $WS_TABSTOP = 0x00010000 Global Const $WS_GROUP = 0x00020000 Global Const $WS_SIZEBOX = 0x00040000 Global Const $WS_THICKFRAME = 0x00040000 Global Const $WS_SYSMENU = 0x00080000 Global Const $WS_HSCROLL = 0x00100000 Global Const $WS_VSCROLL = 0x00200000 Global Const $WS_DLGFRAME = 0x00400000 Global Const $WS_BORDER = 0x00800000 Global Const $WS_CAPTION = 0x00C00000 Global Const $WS_OVERLAPPEDWINDOW = 0x00CF0000 Global Const $WS_TILEDWINDOW = 0x00CF0000 Global Const $WS_MAXIMIZE = 0x01000000 Global Const $WS_CLIPCHILDREN = 0x02000000 Global Const $WS_CLIPSIBLINGS = 0x04000000 Global Const $WS_DISABLED = 0x08000000 Global Const $WS_VISIBLE = 0x10000000 Global Const $WS_MINIMIZE = 0x20000000 Global Const $WS_CHILD = 0x40000000 Global Const $WS_POPUP = 0x80000000 Global Const $WS_POPUPWINDOW = 0x80880000 ; Dialog Styles Global Const $DS_MODALFRAME = 0x80 Global Const $DS_SETFOREGROUND = 0x00000200 Global Const $DS_CONTEXTHELP = 0x00002000 ; Window Extended Styles Global Const $WS_EX_ACCEPTFILES = 0x00000010 Global Const $WS_EX_MDICHILD = 0x00000040 Global Const $WS_EX_APPWINDOW = 0x00040000 Global Const $WS_EX_CLIENTEDGE = 0x00000200 Global Const $WS_EX_CONTEXTHELP = 0x00000400 Global Const $WS_EX_DLGMODALFRAME = 0x00000001 Global Const $WS_EX_LEFTSCROLLBAR = 0x00004000 Global Const $WS_EX_OVERLAPPEDWINDOW = 0x00000300 Global Const $WS_EX_RIGHT = 0x00001000 Global Const $WS_EX_STATICEDGE = 0x00020000 Global Const $WS_EX_TOOLWINDOW = 0x00000080 Global Const $WS_EX_TOPMOST = 0x00000008 Global Const $WS_EX_TRANSPARENT = 0x00000020 Global Const $WS_EX_WINDOWEDGE = 0x00000100 Global Const $WS_EX_LAYERED = 0x00080000 ; Messages Global Const $WM_SIZE = 0x05 Global Const $WM_SIZING = 0x0214 Global Const $WM_USER = 0X400 Global Const $WM_GETTEXTLENGTH = 0x000E Global Const $WM_GETTEXT = 0x000D
JavaScript_Freek Posted August 9, 2006 Author Posted August 9, 2006 expandcollapse popup#include-once ; ------------------------------------------------------------------------------ ; ; AutoIt Version: 3.1.1 (beta) ; Language: English ; Description: Windows constants. ; ; ------------------------------------------------------------------------------ ; Window Styles Global Const $WS_TILED = 0 Global Const $WS_OVERLAPPED = 0 Global Const $WS_MAXIMIZEBOX = 0x00010000 Global Const $WS_MINIMIZEBOX = 0x00020000 Global Const $WS_TABSTOP = 0x00010000 Global Const $WS_GROUP = 0x00020000 Global Const $WS_SIZEBOX = 0x00040000 Global Const $WS_THICKFRAME = 0x00040000 Global Const $WS_SYSMENU = 0x00080000 Global Const $WS_HSCROLL = 0x00100000 Global Const $WS_VSCROLL = 0x00200000 Global Const $WS_DLGFRAME = 0x00400000 Global Const $WS_BORDER = 0x00800000 Global Const $WS_CAPTION = 0x00C00000 Global Const $WS_OVERLAPPEDWINDOW = 0x00CF0000 Global Const $WS_TILEDWINDOW = 0x00CF0000 Global Const $WS_MAXIMIZE = 0x01000000 Global Const $WS_CLIPCHILDREN = 0x02000000 Global Const $WS_CLIPSIBLINGS = 0x04000000 Global Const $WS_DISABLED = 0x08000000 Global Const $WS_VISIBLE = 0x10000000 Global Const $WS_MINIMIZE = 0x20000000 Global Const $WS_CHILD = 0x40000000 Global Const $WS_POPUP = 0x80000000 Global Const $WS_POPUPWINDOW = 0x80880000 ; Dialog Styles Global Const $DS_MODALFRAME = 0x80 Global Const $DS_SETFOREGROUND = 0x00000200 Global Const $DS_CONTEXTHELP = 0x00002000 ; Window Extended Styles Global Const $WS_EX_ACCEPTFILES = 0x00000010 Global Const $WS_EX_MDICHILD = 0x00000040 Global Const $WS_EX_APPWINDOW = 0x00040000 Global Const $WS_EX_CLIENTEDGE = 0x00000200 Global Const $WS_EX_CONTEXTHELP = 0x00000400 Global Const $WS_EX_DLGMODALFRAME = 0x00000001 Global Const $WS_EX_LEFTSCROLLBAR = 0x00004000 Global Const $WS_EX_OVERLAPPEDWINDOW = 0x00000300 Global Const $WS_EX_RIGHT = 0x00001000 Global Const $WS_EX_STATICEDGE = 0x00020000 Global Const $WS_EX_TOOLWINDOW = 0x00000080 Global Const $WS_EX_TOPMOST = 0x00000008 Global Const $WS_EX_TRANSPARENT = 0x00000020 Global Const $WS_EX_WINDOWEDGE = 0x00000100 Global Const $WS_EX_LAYERED = 0x00080000 ; Messages Global Const $WM_SIZE = 0x05 Global Const $WM_SIZING = 0x0214 Global Const $WM_USER = 0X400 Global Const $WM_GETTEXTLENGTH = 0x000E Global Const $WM_GETTEXT = 0x000DThanks time to write revisions! [center]Cookyx.com :: Simple LAN Chat[/center]
CWorks Posted August 9, 2006 Posted August 9, 2006 (edited) expandcollapse popupWhile 1 $installdir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "betaInstallDir") $msg = GUIGetMsg() Select Case $msg = $fileitem $file = FileOpenDialog("Choose file...", @TempDir, "All (*.*)") If @error <> 1 Then GUICtrlCreateMenuitem($file, $recentfilesmenu) Case $msg = $exititem ExitLoop Case $msg = $GUI_EVENT_CLOSE ;~ $oRP.SaveFile (@ScriptDir & "RichText.rtf", 0) Exit Case $msg = $TagsPageC Run(@ComSpec & ' /c start http://www.autoitscript.com/autoit3%27"]http://www.autoitscript.com/autoit3', '', @SW_HIDE) Case $msg = $aboutitem MsgBox(0, "About Sample GUI Menu", "Sample GUI Menu V2" & @CRLF & @CRLF & "Created by: Javascript_Freek" & @CRLF & "" & @CRLF & "©AutoIt") Case $msg = $prog1 Run("explorer.exe " & $installdir & "\Examples") Case $msg = $prog2 Run("explorer.exe " & $installdir & "\Icons") Case $msg = $prog3 Run("explorer.exe " & $installdir & "\SciTe") Case $msg = $prog4 Run($installdir & "\AU3Info.exe") Case $msg = $prog5 Run("explorer.exe " & $installdir & "\Extras") Case $msg = $GUI_EVENT_CLOSE $msg = GUIGetMsg() Case $msg = $Button_7 GUICtrlSetData($Edit_1, FileRead(FileOpenDialog("Select a file to open", @ScriptDir, "All Files (*.*)"))) Case $msg = $button MsgBox(0, "listview item", GUICtrlRead(GUICtrlRead($listview)), 2) Case $msg = $listview MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd just some minor tweaks Edited August 9, 2006 by CWorks
JavaScript_Freek Posted August 9, 2006 Author Posted August 9, 2006 ^^What did you tweak excatly? ___________________________________ Latest VERSION of SGUIM Is Released!!!! [center]Cookyx.com :: Simple LAN Chat[/center]
JavaScript_Freek Posted August 10, 2006 Author Posted August 10, 2006 Allrighty! [center]Cookyx.com :: Simple LAN Chat[/center]
CWorks Posted August 10, 2006 Posted August 10, 2006 (edited) just a few changes so executable works without beta (uses "InstallDir" for regread) also moved regread to top so GUISetIcon and SciTE menu can use $installdir expandcollapse popup;*********************** ; Sample GUI Menu ; Coded by: Dan ; August 2, 2006 ; Special Thanks to: gafrost, SmOke_N, Skruge, Paulie, CWorks, and codemyster! ;*********************** #include <GUIConstants.au3> #include <Misc.au3> #include <File.au3> #include <GuiListView.au3> #include <Process.au3> FileWrite("c:/blank.txt", "") Global $oRP $installdir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "betaInstallDir") If $installdir = "" Then $installdir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") $name = InputBox("Log In", "Please enter your name:") ; GUI GUICreate("Sample GUI Menu", 400, 400) ;\Icons\au3.ico only found in beta version this is in both \Aut2Exe\Icons\AutoIt_HighColor.ico ;not really needed since it will default to this unless compiled with different icon GUISetIcon($installdir & "\Aut2Exe\Icons\AutoIt_HighColor.ico", 0)oÝ÷ Ùجi¹^u'"LIæ§uÈZ¶b²ZÊ«¨µ'"LIèµú.Ú®¢ØbËZWjëh×6; MENU $filemenu = GUICtrlCreateMenu("File") $fileitem = GUICtrlCreateMenuitem("Open...", $filemenu) $recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu) $separator1 = GUICtrlCreateMenuitem("", $filemenu) $exititem = GUICtrlCreateMenuitem("Exit", $filemenu) $filemenu = GUICtrlCreateMenu("AutoIt") $prog4 = GUICtrlCreateMenuitem("Run AutoIt",$filemenu) $prog5 = GUICtrlCreateMenuitem("Extras",$filemenu) $prog1 = GUICtrlCreateMenuitem("Scripts",$filemenu) $prog2 = GUICtrlCreateMenuitem("Icons",$filemenu) ; not pointing to anything ;$sguim1 = GUICtrlCreateMenuitem("Sample GUI Menu V1",$filemenu) If FileExists ($installdir & "\SciTE\") Then $prog3 = GUICtrlCreateMenuitem("SciTE",$filemenu) Else $prog3 = GUICtrlCreateMenuitem("SciTE not found",$filemenu) GUICtrlSetState(-1,$GUI_DISABLE) EndIf $helpmenu = GUICtrlCreateMenu("About") $aboutitem = GUICtrlCreateMenuitem("About", $helpmenu) GUISetState(@SW_Show) Edited August 10, 2006 by CWorks
JavaScript_Freek Posted August 10, 2006 Author Posted August 10, 2006 Thanks a lot CWorks! [center]Cookyx.com :: Simple LAN Chat[/center]
CWorks Posted August 10, 2006 Posted August 10, 2006 (edited) you need to remove the regread at the bottom (before While 1) since it will defeat the purpose of the one's at the topbtw i gave an example of using space to close program here Edited August 10, 2006 by CWorks
JavaScript_Freek Posted August 12, 2006 Author Posted August 12, 2006 Alright thanks CWorks! [center]Cookyx.com :: Simple LAN Chat[/center]
CWorks Posted August 13, 2006 Posted August 13, 2006 I just noticed that SciTE is installed with AutoIt so you can remove that part I always installed it after installing AutoIt and never realized it came with it oh well i like the extra stuff you get with the seperate install of SciTE
vim Posted August 13, 2006 Posted August 13, 2006 I just noticed that SciTE is installed with AutoIt so you can remove that partI always installed it after installing AutoIt and never realized it came with it oh well i like the extra stuff you get with the seperate install of SciTEWhat extra stuff? I wasn't aware there was any. I have used VIM until I started with Autoit.I did look at SciTE years past but left it alone. I perfer VIM's RegExp better...vim
JavaScript_Freek Posted August 14, 2006 Author Posted August 14, 2006 vim... what do you mean? o_o [center]Cookyx.com :: Simple LAN Chat[/center]
vim Posted August 14, 2006 Posted August 14, 2006 CWorks threw me with the "extra stuff" about SciTE. I realized I went off-topic with my reply to him.This is a great example of a sample GUI. Great job!vim... what do you mean? o_o( VIM = vi improved - was my editor of choice in UNIX)
JavaScript_Freek Posted October 30, 2006 Author Posted October 30, 2006 Bump. [center]Cookyx.com :: Simple LAN Chat[/center]
fisofo Posted October 31, 2006 Posted October 31, 2006 (edited) Bump.very nice I can now figure out how to do a table in a GUI! Thanks, you saved me some searching. One thing though, does this require beta? The combo and text box on the main tab don't let me edit them.correction: they don't let me *click* them for some reason. But I can tab to them and use arrow keys/alt/etc... to do whatever with them. Edited October 31, 2006 by fisofo
themax90 Posted October 31, 2006 Posted October 31, 2006 Hey JSF, I've helped you with your questions and other stuff, why am I not in the recognition list. Just wondering. AutoIt Smith
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