Read Posted November 1, 2012 Share Posted November 1, 2012 I have list left side and if I click GO then add GO right side box? How? #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("CNC list", 614, 390) GUICtrlCreateButton("&GO", 10, 330, 75, 25) GUICtrlCreateButton("M list", 85, 330, 75, 25) GUICtrlSetFont(-1, 10, 700, -1, "MS Sans Serif") $List_1 = GUICtrlCreateList("", 10, 10, 150, 330) GUICtrlCreateEdit("", 175, 10, 420, 315) GUICtrlSetData ( $List_1, "Go|G1|G2") GUISetState() GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
FireFox Posted November 1, 2012 Share Posted November 1, 2012 Hi, Here you go : #include <GUIConstantsEx.au3> GUICreate("CNC list", 614, 390) $btnGO = GUICtrlCreateButton("&GO", 10, 330, 75, 25) GUICtrlCreateButton("M list", 85, 330, 75, 25) GUICtrlSetFont(-1, 10, 700, -1, "MS Sans Serif") $List_1 = GUICtrlCreateList("", 10, 10, 150, 330) GUICtrlSetData($List_1, "Go|G1|G2") $tbChosen = GUICtrlCreateEdit("", 175, 10, 420, 315) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $btnGO GUICtrlSetData($tbChosen, GUICtrlRead($List_1) & @CrLf, 1) EndSwitch WEnd Br, FireFox. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 1, 2012 Moderators Share Posted November 1, 2012 (edited) Hi, Read. Try something like this: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("CNC list", 614, 390) $go = GUICtrlCreateButton("&GO", 10, 330, 75, 25) GUICtrlCreateButton("M list", 85, 330, 75, 25) GUICtrlSetFont(-1, 10, 700, -1, "MS Sans Serif") $List_1 = GUICtrlCreateList("", 10, 10, 150, 330) $Edit1 = GUICtrlCreateEdit("", 175, 10, 420, 315) GUICtrlSetData ( $List_1, "Go|G1|G2") GUISetState() GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $go GUICtrlSetData($Edit1, GUICtrlRead($List_1)) EndSelect WEnd Edit: Dang, too slow Edited November 1, 2012 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
FireFox Posted November 1, 2012 Share Posted November 1, 2012 Edit: Dang, too slow Not bad if he only wants to have one item in the edit.Btw, I have cleaned his script.Br, FireFox. Link to comment Share on other sites More sharing options...
Read Posted November 1, 2012 Author Share Posted November 1, 2012 Thanks. New version Open program and I click "Program Start and End" and now must open new windows (code is down). Press OK and right side box coming text 01000 (-- TEST --) G97M3S2500; Program: #include <GUIConstantsEx.au3> GUICreate("CNC list", 614, 390) $btnGO = GUICtrlCreateButton("&GO", 10, 330, 75, 25) GUICtrlCreateButton("M list", 85, 330, 75, 25) GUICtrlSetFont(-1, 10, 700, -1, "MS Sans Serif") $List_1 = GUICtrlCreateList("", 10, 10, 150, 330) GUICtrlSetData($List_1, "Program Start and End|G1") $tbChosen = GUICtrlCreateEdit("", 175, 10, 420, 315) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $btnGO GUICtrlSetData($tbChosen, GUICtrlRead($List_1) & @CrLf, 1) EndSwitch WEnd New windows: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Insert: Program Start and End", 428, 205, 339, 527) $Group1 = GUICtrlCreateGroup("Parameters for 'Program Start and End'", 0, 16, 417, 145) $Label1 = GUICtrlCreateLabel("Program number [1000-6000 ]", 144, 40, 144, 17) $Input1 = GUICtrlCreateInput("", 16, 40, 121, 21) $Input2 = GUICtrlCreateInput("", 16, 72, 121, 21) $Input3 = GUICtrlCreateInput("", 16, 104, 121, 21) $Label2 = GUICtrlCreateLabel("Program description", 144, 80, 97, 17) $Label3 = GUICtrlCreateLabel("Max spindle speed", 144, 112, 92, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("OK", 336, 176, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
Read Posted November 2, 2012 Author Share Posted November 2, 2012 someone? Link to comment Share on other sites More sharing options...
FireFox Posted November 2, 2012 Share Posted November 2, 2012 someone?For me this is a tutorial :Open program and I click "Program Start and End" and now must open new windows (code is down). Press OK and right side box coming text And not a question.Please tell us what is the problem with your code and what you want to do. You have the help file, we are not here to make the script for you; otherwise you won't learn by yourself and will keep asking to do to something. Link to comment Share on other sites More sharing options...
Read Posted November 2, 2012 Author Share Posted November 2, 2012 Interesting. Not find a similar script Link to comment Share on other sites More sharing options...
FireFox Posted November 2, 2012 Share Posted November 2, 2012 Here you go : expandcollapse popup#include <GUIConstantsEx.au3> #region GUI1 $GUI1 = GUICreate("CNC list", 614, 390) $btnGO = GUICtrlCreateButton("&GO", 10, 330, 75, 25) GUICtrlCreateButton("M list", 85, 330, 75, 25) GUICtrlSetFont(-1, 10, 700, -1, "MS Sans Serif") $List_1 = GUICtrlCreateList("", 10, 10, 150, 330) GUICtrlSetData($List_1, "Program Start and End|G1") $tbChosen = GUICtrlCreateEdit("", 175, 10, 420, 315) GUISetState(@SW_SHOW, $GUI1) #endregion GUI1 #region ### START Koda GUI section ### Form= $Form1 = GUICreate("", 428, 205, 339, 527) $Group1 = GUICtrlCreateGroup("", 0, 16, 417, 145) $Label1 = GUICtrlCreateLabel("Program number [1000-6000 ]", 144, 40, 144, 17) $Input1 = GUICtrlCreateInput("", 16, 40, 121, 21) $Input2 = GUICtrlCreateInput("", 16, 72, 121, 21) $Input3 = GUICtrlCreateInput("", 16, 104, 121, 21) $Label2 = GUICtrlCreateLabel("Program description", 144, 80, 97, 17) $Label3 = GUICtrlCreateLabel("Max spindle speed", 144, 112, 92, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("OK", 336, 176, 75, 25) #endregion ### END Koda GUI section ### While 1 $aMsg = GUIGetMsg(1) Switch $aMsg[1] Case $GUI1 Switch $aMsg[0] Case $GUI_EVENT_CLOSE Exit Case $btnGO $sListRead = GUICtrlRead($List_1) WinSetTitle($Form1, "", "Insert: " & $sListRead) GUICtrlSetData($Group1, "Parameters for '" & $sListRead & "'") GUISetState(@SW_SHOW, $Form1) EndSwitch Case $Form1 Switch $aMsg[0] Case $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $Form1) Case $Button1 GUICtrlSetData($tbChosen, GUICtrlRead($Input1) & @CRLF & _ GUICtrlRead($Input2) & @CRLF & _ GUICtrlRead($Input3) & @CRLF, 1) GUISetState(@SW_HIDE, $Form1) EndSwitch EndSwitch WEnd Br, FireFox. Link to comment Share on other sites More sharing options...
Read Posted November 2, 2012 Author Share Posted November 2, 2012 (edited) Not good. Result: 1000 TEST 2500 Must have: 01000; (-- TEST --) G97M3S2500; And double click open "Program start and end". I trying to use GUICtrlCreateButton and work but I not use Button OK, I have coming left side 42 name. How to make the most logical program? Edited November 2, 2012 by Read Link to comment Share on other sites More sharing options...
FireFox Posted November 2, 2012 Share Posted November 2, 2012 (edited) Not good.Result:1000TEST2500Must have:01000;(-- TEST --)G97M3S2500;106 posts and you don't know how to do that? I give up. I let someone else lose his time on your case.Last advice : Use the help file.Br, FireFox. Edited November 2, 2012 by FireFox Link to comment Share on other sites More sharing options...
careca Posted November 3, 2012 Share Posted November 3, 2012 expandcollapse popup#include #region GUI1 $GUI1 = GUICreate("CNC list", 614, 390) $btnGO = GUICtrlCreateButton("&GO", 10, 330, 75, 25) GUICtrlCreateButton("M list", 85, 330, 75, 25) GUICtrlSetFont(-1, 10, 700, -1, "MS Sans Serif") $List_1 = GUICtrlCreateList("", 10, 10, 150, 330) GUICtrlSetData($List_1, "Program Start and End|G1") $tbChosen = GUICtrlCreateEdit("", 175, 10, 420, 315) GUISetState(@SW_SHOW, $GUI1) #endregion GUI1 #region ### START Koda GUI section ### Form= $Form1 = GUICreate("", 428, 205, 339, 527) $Group1 = GUICtrlCreateGroup("", 0, 16, 417, 145) $Label1 = GUICtrlCreateLabel("Program number [1000-6000 ]", 144, 40, 144, 17) $Input1 = GUICtrlCreateInput("", 16, 40, 121, 21) $Input2 = GUICtrlCreateInput("", 16, 72, 121, 21) $Input3 = GUICtrlCreateInput("", 16, 104, 121, 21) $Label2 = GUICtrlCreateLabel("Program description", 144, 80, 97, 17) $Label3 = GUICtrlCreateLabel("Max spindle speed", 144, 112, 92, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("OK", 336, 176, 75, 25) #endregion ### END Koda GUI section ### While 1 $aMsg = GUIGetMsg(1) Switch $aMsg[1] Case $GUI1 Switch $aMsg[0] Case $GUI_EVENT_CLOSE Exit Case $btnGO $sListRead = GUICtrlRead($List_1) WinSetTitle($Form1, "", "Insert: " & $sListRead) GUICtrlSetData($Group1, "Parameters for '" & $sListRead & "'") GUISetState(@SW_SHOW, $Form1) WinWaitActive('Insert: Program Start and End') ControlClick('Insert: Program Start and End', '', 9) Send('01000') Send('{TAB}') Send('(-- TEST --)') Send('{TAB}') Send('G97M3S2500') EndSwitch Case $Form1 Switch $aMsg[0] Case $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $Form1) Case $Button1 GUICtrlSetData($tbChosen, GUICtrlRead($Input1) & @CRLF & _ GUICtrlRead($Input2) & @CRLF & _ GUICtrlRead($Input3) & @CRLF, 1) GUISetState(@SW_HIDE, $Form1) EndSwitch EndSwitch WEnd Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe 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