Jump to content
Sign in to follow this  
Read

Click and add text

Recommended Posts

Read

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

Share this post


Link to post
Share on other sites
FireFox

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.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
JLogan3o13

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 by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
FireFox

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.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Read

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 :rolleyes:

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

Share this post


Link to post
Share on other sites
FireFox

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 :rolleyes:

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.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
FireFox

Here you go :

#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.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Read

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 :D

OK, I have coming left side 42 name. How to make the most logical program?

Edited by Read

Share this post


Link to post
Share on other sites
FireFox

Not good.

Result:

1000

TEST

2500

Must 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 by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
careca

#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

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

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.

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.

Firefox Profile Backup - Backup/restore previously saved profile.

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×