Jump to content

Real n00b here, capturing input?


Recommended Posts

I hope I'm posting my question in the right place. I've never posted to this particular message board (at least, not to my knowledge if I did so unintentionally <lol>).

I'm getting much better at building the boxes, it's just getting the inner workings to go ... <g>

Here's my script as it stands now:

;
; AutoIt 3x
;
#include <GUIConstants.au3>
#include <_PartitionLetters.au3>
#include <_WEReplacement.au3>
#NoTrayIcon     ; AutoIt's icon doesn't show in systray
TraySetIcon("F:\AUTOIT\Scripts\SelectiveLaunch- Email\SelectiveLaunch- Email.ico")
AutoItSetOption("WinTitleMatchMode", 2)     ; this allows partial window titles to be valid!

Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=l:\autoit\tools\toolgui- koda v1.7.0\app- koda v1.7.0.1\forms\080615.sn01- stargate ep. info helper.kxf
$Stargate = GUICreate("Stargate Episode Information ...", 483, 395, 194, 115)
GUISetIcon("F:\AUTOIT\Scripts\SelectiveLaunch- Email\SelectiveLaunch- Email.ico")
$Input1 = GUICtrlCreateInput("", 230, 19, 165, 21)
GUICtrlSetOnEvent(-1, "Input1")
$Input2 = GUICtrlCreateInput("", 230, 44, 165, 21)
GUICtrlSetOnEvent(-1, "Input2")
$Input3 = GUICtrlCreateInput("", 230, 69, 165, 21)
GUICtrlSetOnEvent(-1, "Input3")
$Input4 = GUICtrlCreateInput("", 230, 94, 165, 21)
GUICtrlSetOnEvent(-1, "Input4")
$Input5 = GUICtrlCreateInput("", 230, 119, 165, 21)
GUICtrlSetOnEvent(-1, "Input5")
$Input6 = GUICtrlCreateInput("", 230, 144, 165, 21)
GUICtrlSetOnEvent(-1, "Input6")
$Input7 = GUICtrlCreateInput("", 230, 169, 165, 21)
GUICtrlSetOnEvent(-1, "Input7")
GUICtrlCreateEdit("", 32, 224, 417, 45)
GUICtrlSetOnEvent(-1, "EpisodeSynopsis")
$OK = GUICtrlCreateButton("OK, Send to clipboard", 130, 320, 115, 25, 0)
GUICtrlSetOnEvent(-1, "OKClick")
GUICtrlSetTip(-1, "This sends the above information to the clipboard ...")
$Cancel = GUICtrlCreateButton("Cancel", 265, 320, 65, 25, 0)
GUICtrlSetOnEvent(-1, "CancelClick")
GUICtrlSetTip(-1, "Cancel and exit ...")
$New = GUICtrlCreateButton("New Entry", 384, 360, 81, 25, 0)
GUICtrlSetOnEvent(-1, "NewClick")
GUICtrlSetTip(-1, "Click here to start a new episode entry ...")
$EpYear = GUICtrlCreateLabel("Episode Year (i.e., season 3 = 03):", 64, 20, 166, 17)
$Label1 = GUICtrlCreateLabel("Episode Number (i.e., #6=06):", 85, 45, 145, 17)
$Label2 = GUICtrlCreateLabel("Original U.S. Air Date (mm.dd.yy):", 71, 70, 160, 17)
$Label3 = GUICtrlCreateLabel("Syndication Air Date (mm.dd.yy):", 75, 95, 156, 17)
$Label4 = GUICtrlCreateLabel("Written by:", 175, 120, 55, 17)
$Label5 = GUICtrlCreateLabel("Directed by:", 169, 145, 61, 17)
$Label6 = GUICtrlCreateLabel("Guest starring (<>=1, but put all on 1 line):", 30, 170, 200, 17)
$Label7 = GUICtrlCreateLabel("Episode synopsis (multi-line, of course, possible, but ensure no hard returns.):", 34, 208, 364, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
Sleep(100)
WEnd

Func CancelClick()
    Exit     ; finished
EndFunc
Func EpisodeSynopsis()

EndFunc
Func Input1()
    $Input1
EndFunc
Func Input2()
    $Input2
EndFunc
Func Input3()
    $Input3
EndFunc
Func Input4()
    $Input4
EndFunc
Func Input5()
    $Input5
EndFunc
Func Input6()
    $Input6
EndFunc
Func Input7()
    $Input7
EndFunc
Func NewClick()
    (refreshes box, user can enter new information, old info "deleted" from display)
EndFunc
Func OKClick()
    ClipPut("")
EndFuncoÝ÷ Øýz-²êÞ­¶hìmj¢}ý¶¯y¬(®H§º1¡ûaËr¥ëh$jÖî´ý²È§j{(èhÂ뽪âi¹^²Újn­ë¬z¸§¦ëbz)êºb­Ö«¨µ¦è½ì(ºWHºÇ¬¢g­)à)¶¬jëh×6Func Input1()
    $Input1=...
EndFuncoÝ÷ ٩ݶ§{ayº-¶ºÚ"µÍ[ÈÒÐÛXÚÊ
BPÛ]
    ][ÝÉÌÍÒ[]H [È ÌÍ×××È    [È ][ÝÈÚ]]][ÝÈ    [È ÌÍ××È  [È]ËB[[

Thanks. :)

Edited by Diana (Cda)
Link to comment
Share on other sites

I hope I'm posting my question in the right place. I've never posted to this particular message board (at least, not to my knowledge if I did so unintentionally <lol>).

I'm getting much better at building the boxes, it's just getting the inner workings to go ... <g>

Here's my script as it stands now:

;
; AutoIt 3x
;
#include <GUIConstants.au3>
#include <_PartitionLetters.au3>
#include <_WEReplacement.au3>
#NoTrayIcon     ; AutoIt's icon doesn't show in systray
TraySetIcon("F:\AUTOIT\Scripts\SelectiveLaunch- Email\SelectiveLaunch- Email.ico")
AutoItSetOption("WinTitleMatchMode", 2)     ; this allows partial window titles to be valid!

Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=l:\autoit\tools\toolgui- koda v1.7.0\app- koda v1.7.0.1\forms\080615.sn01- stargate ep. info helper.kxf
$Stargate = GUICreate("Stargate Episode Information ...", 483, 395, 194, 115)
GUISetIcon("F:\AUTOIT\Scripts\SelectiveLaunch- Email\SelectiveLaunch- Email.ico")
$Input1 = GUICtrlCreateInput("", 230, 19, 165, 21)
GUICtrlSetOnEvent(-1, "Input1")
$Input2 = GUICtrlCreateInput("", 230, 44, 165, 21)
GUICtrlSetOnEvent(-1, "Input2")
$Input3 = GUICtrlCreateInput("", 230, 69, 165, 21)
GUICtrlSetOnEvent(-1, "Input3")
$Input4 = GUICtrlCreateInput("", 230, 94, 165, 21)
GUICtrlSetOnEvent(-1, "Input4")
$Input5 = GUICtrlCreateInput("", 230, 119, 165, 21)
GUICtrlSetOnEvent(-1, "Input5")
$Input6 = GUICtrlCreateInput("", 230, 144, 165, 21)
GUICtrlSetOnEvent(-1, "Input6")
$Input7 = GUICtrlCreateInput("", 230, 169, 165, 21)
GUICtrlSetOnEvent(-1, "Input7")
GUICtrlCreateEdit("", 32, 224, 417, 45)
GUICtrlSetOnEvent(-1, "EpisodeSynopsis")
$OK = GUICtrlCreateButton("OK, Send to clipboard", 130, 320, 115, 25, 0)
GUICtrlSetOnEvent(-1, "OKClick")
GUICtrlSetTip(-1, "This sends the above information to the clipboard ...")
$Cancel = GUICtrlCreateButton("Cancel", 265, 320, 65, 25, 0)
GUICtrlSetOnEvent(-1, "CancelClick")
GUICtrlSetTip(-1, "Cancel and exit ...")
$New = GUICtrlCreateButton("New Entry", 384, 360, 81, 25, 0)
GUICtrlSetOnEvent(-1, "NewClick")
GUICtrlSetTip(-1, "Click here to start a new episode entry ...")
$EpYear = GUICtrlCreateLabel("Episode Year (i.e., season 3 = 03):", 64, 20, 166, 17)
$Label1 = GUICtrlCreateLabel("Episode Number (i.e., #6=06):", 85, 45, 145, 17)
$Label2 = GUICtrlCreateLabel("Original U.S. Air Date (mm.dd.yy):", 71, 70, 160, 17)
$Label3 = GUICtrlCreateLabel("Syndication Air Date (mm.dd.yy):", 75, 95, 156, 17)
$Label4 = GUICtrlCreateLabel("Written by:", 175, 120, 55, 17)
$Label5 = GUICtrlCreateLabel("Directed by:", 169, 145, 61, 17)
$Label6 = GUICtrlCreateLabel("Guest starring (<>=1, but put all on 1 line):", 30, 170, 200, 17)
$Label7 = GUICtrlCreateLabel("Episode synopsis (multi-line, of course, possible, but ensure no hard returns.):", 34, 208, 364, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
Sleep(100)
WEnd

Func CancelClick()
    Exit     ; finished
EndFunc
Func EpisodeSynopsis()

EndFunc
Func Input1()

EndFunc
Func Input2()

EndFunc
Func Input3()

EndFunc
Func Input4()

EndFunc
Func Input5()

EndFunc
Func Input6()

EndFunc
Func Input7()

EndFunc
Func NewClick()

EndFunc
Func OKClick()
    ClipPut("")
EndFuncoÝ÷ Øýz-²êÞ­¶hìmj¢}ý¶¯y¬(®H§º1¡ûaËr¥ëh$jÖî´ý²È§j{(èhÂ뽪âi¹^²Újn­ë¬z¸§¦ëbz)êºb­Ö«¨µ¦è½ì(ºWHºÇ¬¢g­)à)¶¬jëh×6Func Input1()
    $Input1=...
EndFuncoÝ÷ ٩ݶ§{ayº-¶ºÚ"µÍ[ÈÒÐÛXÚÊ
BPÛ]
    ][ÝÉÌÍÒ[]H [È ÌÍ×××È    [È ][ÝÈÚ]]][ÝÈ    [È ÌÍ××È  [È]ËB[[

Thanks. :)

The AutoIt tags have messed upsome of your code. Can you change it to use code tags instead? (See the note in my signature.)

Can you explain what the problem is so that we know how to approach your script?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

The AutoIt tags have messed upsome of your code. Can you change it to use code tags instead? (See the note in my signature.)

Can you explain what the problem is so that we know how to approach your script?

Dang, I wasn't quick enough on the draw! <g>

Fortunately for us, even though the incidences of the code getting screwed up is so high on these boards, I use the back button to return to an earlier uncorrupted message - which I did here. So when you look again, code is clean <g>. But ya must have caught my message in the couple minutes in between when I was fiddling with that. Sorry 'bout that.

With regards to the box above, the challenge is that I don't know how to deal with the user input. With regards to the rest, I believe the box that I carefully constructed with Koda is okay, it's just how to get the user input and then to link it all together to the clipboard. The last part of it is fine re the "clipput" part. I have had lots of "&" experience and will code that with the necessary spaces and filler words. I just don't know the syntax for each of the input boxes above, i.e., Input1, Input2, etc. How do we get AI to hold each box of user info? As I mentioned and hoping, somehow we'll use variables, but how?

Thx! :)

Link to comment
Share on other sites

Dang, I wasn't quick enough on the draw! <g>

Fortunately for us, even though the incidences of the code getting screwed up is so high on these boards, I use the back button to return to an earlier uncorrupted message - which I did here. So when you look again, code is clean <g>. But ya must have caught my message in the couple minutes in between when I was fiddling with that. Sorry 'bout that.

With regards to the box above, the challenge is that I don't know how to deal with the user input. With regards to the rest, I believe the box that I carefully constructed with Koda is okay, it's just how to get the user input and then to link it all together to the clipboard. The last part of it is fine re the "clipput" part. I have had lots of "&" experience and will code that with the necessary spaces and filler words. I just don't know the syntax for each of the input boxes above, i.e., Input1, Input2, etc. How do we get AI to hold each box of user info? As I mentioned and hoping, somehow we'll use variables, but how?

Thx! :)

You need to explain more clearly want you want to do for me to understand how to help. To read the text in an input box use

$text1 = GuiCtrlRead($input1)

To clear the input box use

GuiCtrlSetData($input1,"")

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

You need to explain more clearly want you want to do for me to understand how to help. To read the text in an input box use

$text1 = GuiCtrlRead($input1)

Oh, well, okay ... will try again. Perhaps an example of some text might be easier. (Will the above "$text 1..." will still work ... (?) ...)

User inputs data into each of the boxes in the GUI that have internal labels of input1, input2, etc. At the end, for the clipput phase, AI needs to take each piece of text and tie it all together. So if user inputs like this, say:

Input box 1 (year):  01
Input box 2 (number):  01
Input box 3 (title):  Children of the Gods  (box missing, added into GUI just now)
Input box 4 (year):  07.27.97
etc. ...

The "send to clipboard" button, with all the additional spaces and filler text would send to the clipboard:

01x01, "Children of the Gods" / Original US air date:  07.27.97 / .... etc. / Episode synopsis:  ... / (and so on)

Thanks! :)

Edited by Diana (Cda)
Link to comment
Share on other sites

Hi again Diana;

To clarify what martin was trying to say combined with some of your code.

Your input() function would be something along the lines of

Func Input()
   $iText = GUICtrlRead($Input);; Read the control to a variable
   ClipPut($iText);; Put it on the clipboard as you showed.
   GUICtrlSetData($input, "");; Reset tha input control to a blank string
EndFunc

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Hi again Diana;

To clarify what martin was trying to say combined with some of your code.

Your input() function would be something along the lines of

Func Input()
   $iText = GUICtrlRead($Input);; Read the control to a variable
   ClipPut($iText);; Put it on the clipboard as you showed.
   GUICtrlSetData($input, "");; Reset the input control to a blank string
EndFunc
Hi, thanks.

I'm confused by the above, as I'm not sure how to use it. I have 9 user input boxes so there are 9 text strings the user might enter (and then again, some might not contain information). How would I handle getting the data from each individually and whether or not the box is blank? I know that I can edit the output in the ClipPut so the output isn't so much a concern as how to deal with all the different input strings.

I partially entered the action in the functions above with the $input1, $input2, $input 3, etc., I typed in above but I just know that there must be more to the syntax than that. What that is, though, is what I don't know. This is the first time I'm working with more than one source of user input data, you see <g>.

Thx. :)

Link to comment
Share on other sites

Hi again Diana;

To clarify what martin was trying to say combined with some of your code.

Your input() function would be something along the lines of

Func Input()
   $iText = GUICtrlRead($Input);; Read the control to a variable
   ClipPut($iText);; Put it on the clipboard as you showed.
   GUICtrlSetData($input, "");; Reset tha input control to a blank string
EndFunc
Can I put the GUICtrlSetData part in the newclick above, which is the only button that should do this? Would it clear the _entire_ GUI of data, which is the goal?

Func NewClick()
   GUICtrlSetData($input, "") ; refreshes box, user can enter new information, old info "deleted" from entire GUI box; i.e., resets all input controls to blank strings
EndFunc
Thanks once again! :)
Link to comment
Share on other sites

Okay, obviously, this isn't going well <g>. Alright, forget the above. When I do something, it doesn't work; when I don't do something, it doesn't work <g>. So forget the rest of the code for now; this time adding it hindered and didn't help, I guess <g>. It seems necessary to always give the whole picture, but this time it seems to be achieving the opposite effect of illuminating the need ... <sigh> <g> Go figure <shrug>. :)

What is the syntax to capture the "SomeText(ltr)" part below, pls? That's what I'm having difficulty with:

User input 1:  SomeText1
User input 2:  SomeText2
User input 3:  SomeText3
User input 4:  SomeText4
User input 5:  SomeText5
User input 6:  SomeText6
User input 7:  SomeText7

ClipPut("'SomeText1' & 'SomeText2' & 'SomeText3' & 'SomeText4' & 'SomeText5' & 'SomeText6' & 'SomeText7'")

Thanks much! :P

Link to comment
Share on other sites

What is the syntax to capture the "SomeText(ltr)" part below, pls? That's what I'm having difficulty with:

ClipPut("'SomeText1' & 'SomeText2' & 'SomeText3' & 'SomeText4' & 'SomeText5' & 'SomeText6' & 'SomeText7'")

Thanks much! :)

I had a little play with your script and got the below script to put some stuff onto clipboard.

;
; AutoIt 3x
;
#include <GUIConstants.au3>
;#include <_PartitionLetters.au3>
;#include <_WEReplacement.au3>
#NoTrayIcon     ; AutoIt's icon doesn't show in systray

Global $iText1,$iText2,$iText3,$iText4,$iText5,$iText6,$iText7 

TraySetIcon("F:\AUTOIT\Scripts\SelectiveLaunch- Email\SelectiveLaunch- Email.ico")
AutoItSetOption("WinTitleMatchMode", 2)     ; this allows partial window titles to be valid!

Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=l:\autoit\tools\toolgui- koda v1.7.0\app- koda v1.7.0.1\forms\080615.sn01- stargate ep. info helper.kxf
$Stargate = GUICreate("Stargate Episode Information ...", 483, 395, 194, 115)
GUISetIcon("F:\AUTOIT\Scripts\SelectiveLaunch- Email\SelectiveLaunch- Email.ico")
$Input1 = GUICtrlCreateInput("", 230, 19, 165, 21)
GUICtrlSetOnEvent(-1, "Input1")
$Input2 = GUICtrlCreateInput("", 230, 44, 165, 21)
GUICtrlSetOnEvent(-1, "Input2")
$Input3 = GUICtrlCreateInput("", 230, 69, 165, 21)
GUICtrlSetOnEvent(-1, "Input3")
$Input4 = GUICtrlCreateInput("", 230, 94, 165, 21)
GUICtrlSetOnEvent(-1, "Input4")
$Input5 = GUICtrlCreateInput("", 230, 119, 165, 21)
GUICtrlSetOnEvent(-1, "Input5")
$Input6 = GUICtrlCreateInput("", 230, 144, 165, 21)
GUICtrlSetOnEvent(-1, "Input6")
$Input7 = GUICtrlCreateInput("", 230, 169, 165, 21)
GUICtrlSetOnEvent(-1, "Input7")
GUICtrlCreateEdit("", 32, 224, 417, 45)
GUICtrlSetOnEvent(-1, "EpisodeSynopsis")
$OK = GUICtrlCreateButton("OK, Send to clipboard", 130, 320, 115, 25, 0)
GUICtrlSetOnEvent(-1, "OKClick")
GUICtrlSetTip(-1, "This sends the above information to the clipboard ...")
$Cancel = GUICtrlCreateButton("Cancel", 265, 320, 65, 25, 0)
GUICtrlSetOnEvent(-1, "CancelClick")
GUICtrlSetTip(-1, "Cancel and exit ...")
$New = GUICtrlCreateButton("New Entry", 384, 360, 81, 25, 0)
GUICtrlSetOnEvent(-1, "NewClick")
GUICtrlSetTip(-1, "Click here to start a new episode entry ...")
$EpYear = GUICtrlCreateLabel("Episode Year (i.e., season 3 = 03):", 64, 20, 166, 17)
$Label1 = GUICtrlCreateLabel("Episode Number (i.e., #6=06):", 85, 45, 145, 17)
$Label2 = GUICtrlCreateLabel("Original U.S. Air Date (mm.dd.yy):", 71, 70, 160, 17)
$Label3 = GUICtrlCreateLabel("Syndication Air Date (mm.dd.yy):", 75, 95, 156, 17)
$Label4 = GUICtrlCreateLabel("Written by:", 175, 120, 55, 17)
$Label5 = GUICtrlCreateLabel("Directed by:", 169, 145, 61, 17)
$Label6 = GUICtrlCreateLabel("Guest starring (<>=1, but put all on 1 line):", 30, 170, 200, 17)
$Label7 = GUICtrlCreateLabel("Episode synopsis (multi-line, of course, possible, but ensure no hard returns.):", 34, 208, 364, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
Sleep(100)
WEnd

Func CancelClick()
    Exit     ; finished
EndFunc
Func EpisodeSynopsis()

EndFunc
Func Input1()
    $iText1 = GUICtrlRead($Input1);; Read the control to a variable
EndFunc
Func Input2()
    $iText2 = GUICtrlRead($Input2);; Read the control to a variable
EndFunc
Func Input3()
    $iText3 = GUICtrlRead($Input3);; Read the control to a variable
EndFunc
Func Input4()
    $iText4 = GUICtrlRead($Input4);; Read the control to a variable
EndFunc
Func Input5()
    $iText5 = GUICtrlRead($Input5);; Read the control to a variable
EndFunc
Func Input6()
   $iText6 = GUICtrlRead($Input6);; Read the control to a variable
EndFunc
Func Input7()
   $iText7 = GUICtrlRead($Input7);; Read the control to a variable
EndFunc
Func NewClick()
   ; (refreshes box, user can enter new information, old info "deleted" from display)
EndFunc
Func OKClick()
    ;        01        x      01       , " Children of the Gods" / Original US air date:  07.27.97 /
    ClipPut($iText1 & "x" & $iText2 & ', "' & $iText2 & '" / Original U.S. Air Date: ' & $iText3 & _
        "/ Syndication Air Date: " & $iText4 & ".... etc. (and so on)")
    GUICtrlSetData($input1, "");; Reset tha input control to a blank string 
    GUICtrlSetData($input2, "");; Reset tha input control to a blank string 
    GUICtrlSetData($input3, "");; Reset tha input control to a blank string 
    GUICtrlSetData($input4, "");; Reset tha input control to a blank string 
    GUICtrlSetData($input5, "");; Reset tha input control to a blank string 
    GUICtrlSetData($input6, "");; Reset tha input control to a blank string 
    GUICtrlSetData($input7, "");; Reset tha input control to a blank string 
EndFunc
Link to comment
Share on other sites

It's difficult to ignore the other code because there is a problem in there that will prevent you from getting what you want without a lot of calls (that you don't need) to a function.

Since all of the input controls are in order it's easy to read them in a loop but the function you should be doing it in is Func OKClick().

Comment out the lines that say "GUICtrlSetOnEvent(-1, "Input *")

Then Change your OKClick() function to

;
Func OKClick()
    Local $I, $cTxt = ""
    ClipPut($cTxt)
    For $I = $Input1 To $Input7
       $cTxt &= GUICtrlRead($I) & @CRLF;; Read the value of each control and add it to the variable $cTxt
    Next
    ClipPut(StringStripWS($cTxt, 2));; Strip the last @CRLF and place the variables contents on the clipboard.
EndFunc
;

Your NewClick function probably won't be reqired in the end but for now you could use it just to reset all of the inputs like so.

;
Func NewClick()
    For $I = $Input1 To $Input7
       GUICtrlSetData($I, "") & @CRLF;; reset the contents of the inputs to empty strings.
    Next
EndFunc
;

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I had a little play with your script and got the below script to put some stuff onto clipboard.

;
; AutoIt 3x
;
#include <GUIConstants.au3>oÝ÷ ÚÉ⤲ßtájy,~íæ⥦)íêâ]·¶*':w"¶ÆÚÚ³)íkÙ÷öÙ'£hÂÚ (ºWp¢¹(Øb²¢ËZ)à+bR ¢Û(ëax-«_ºw-ìwb¶·¡ë0¢¹7Ýhh¡çßymAzZ0ËazÇ++lµ©Ý²z0"Ûzk-¡·z^­«b
tѪ$k)m~)àz»®,yØ-N«{l¢yr¢w­)àªê-º'«¨¶'Èq©ÜjYb¶ØZ¶+wöÈî²ØhÂÚ zÛayË«²ÛiÉ"Ú-çâ®Ë[£'qâ!Ûaz«¨´×°z{kÊ«¨µ»­¶À,Ê«z+b±«­¢+Øì(ìÕѽ%ÐÍà(ì(¥¹±Õ±ÐíU%
½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±Ðí}AÉѥѥ½¹1ÑÑÉ̹ÔÌÐì(¥¹±Õ±Ðí}]IÁ±µ¹Ð¹ÔÌÐì(9½QÉå%½¸ìÕѽ%ÐÌäíÌ¥½¸½Í¸ÌäíÐÍ¡½Ü¥¸ÍåÍÑÉä)QÉåMÑ%½¸ ÅÕ½ÐíèÀäÈíUQ=%PÀäÈíMÉ¥ÁÑÌÀäÈíM±Ñ¥Ù1Õ¹ ´µ¥°ÀäÈíM±Ñ¥Ù1Õ¹ ´µ¥°¹¥¼ÅÕ½Ðì¤)Õѽ%ÑMÑ=ÁÑ¥½¸ ÅÕ½Ðí]¥¹Q¥Ñ±5Ñ¡5½ÅÕ½Ðì°È¤ìÑ¡¥Ì±±½ÝÌÁÉÑ¥°Ý¥¹½ÜѥѱÌѼٱ¥ÌÌì()±½°ÀÌØí¥QáÐÄ°ÀÌØí¥QáÐÈ°ÀÌØí¥QáÐÌ°ÀÌØí¥QáÐаÀÌØí¥QáÐÔ°ÀÌØí¥QáÐØ°ÀÌØí¥QáÐÜ°ÀÌØí¥QáÐà°ÀÌØí¥QáÐä()=ÁÐ ÅÕ½ÐíU%=¹Ù¹Ñ5½ÅÕ½Ðì°Ä¤(I¥½¸MQIP-½U$ÍÑ¥½¸½É´õ°èÀäÈíÕѽ¥ÐÀäÈíѽ½±ÌÀäÈíѽ½±Õ¤´­½ØĸܸÀÀäÈíÁÀ´­½ØĸܸÀ¸ÄÀäÈí½ÉµÌäÈìÐàìàÀØÄԹ͸ÀÄ´ÍÑÉÑÀ¸¥¹¼¡±Áȹ­á(ÀÌØíMÑÉÑôU%
ÉÑ ÅÕ½ÐíMÑÉÑÁ¥Í½%¹½ÉµÑ¥½¸¸¸¸ÅÕ½Ðì°ÐäÄ°ÐÈÌ°ÈÔÀ°ÄÌÀ¤)U%MÑ%½¸ ÅÕ½ÐíèÀäÈíUQ=%PÀäÈíMÉ¥ÁÑÌÀäÈíM±Ñ¥Ù1Õ¹ ´µ¥°ÀäÈíM±Ñ¥Ù1Õ¹ ´µ¥°¹¥¼ÅÕ½Ðì¤(ÀÌØí%¹ÁÕÐÄôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÈÌÀ°Ää°ÄØÔ°ÈĤ)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí%¹ÁÕÐÄÅÕ½Ðì¤(ÀÌØí%¹ÁÕÐÈôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÈÌÀ°ÐаÄØÔ°ÈĤ)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí%¹ÁÕÐÈÅÕ½Ðì¤(ÀÌØí%¹ÁÕÐÌôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÈÌÀ°Øä°ÄØÔ°ÈĤ)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí%¹ÁÕÐÌÅÕ½Ðì¤(ÀÌØí%¹ÁÕÐÐôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÈÌÀ°äÌ°ÄØÔ°ÈĤ)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí%¹ÁÕÐÐÅÕ½Ðì¤(ÀÌØí%¹ÁÕÐÔôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÈÌÀ°ÄÄà°ÄØÔ°ÈĤ)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí%¹ÁÕÐÔÅÕ½Ðì¤(ÀÌØí%¹ÁÕÐØôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÈÌÀ°ÄÐÌ°ÄØÔ°ÈĤ)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí%¹ÁÕÐØÅÕ½Ðì¤(ÀÌØí%¹ÁÕÐÜôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÈÌÀ°ÄØà°ÄØÔ°ÈĤ)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí%¹ÁÕÐÜÅÕ½Ðì¤(ÀÌØí%¹ÁÕÐàôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÈÌÀ°ÄäÌ°ÄØÔ°ÈĤ)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí%¹ÁÕÐàÅÕ½Ðì¤(ÀÌØí%¹ÁÕÐäôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÌÈ°ÈÐà°ÐÄÜ°ÐÔ¤)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½ÐíÁ¥Í½Må¹½ÁÍ¥ÌÅÕ½Ðì¤(ÀÌØí=,ôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí=,°M¹Ñ¼±¥Á½ÉÅÕ½Ðì°ÄÌÀ°ÌÐаÄÄÔ°ÈÔ°À¤)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí=-
±¥¬ÅÕ½Ðì¤)U%
ÑɱMÑQ¥À ´Ä°ÅÕ½ÐíQ¡¥Ì͹ÌÑ¡½Ù¥¹½ÉµÑ¥½¸Ñ¼Ñ¡±¥Á½É¸¸¸ÅÕ½Ðì¤(ÀÌØí
¹°ôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí
¹°ÅÕ½Ðì°ÈØÔ°ÌÐаØÔ°ÈÔ°À¤)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí
¹±
±¥¬ÅÕ½Ðì¤)U%
ÑɱMÑQ¥À ´Ä°ÅÕ½Ðí
¹°¹á¥Ð¸¸¸ÅÕ½Ðì¤(ÀÌØí9ÜôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí9ܹÑÉäÅÕ½Ðì°ÌàаÌàаàÄ°ÈÔ°À¤)U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí9Ý
±¥¬ÅÕ½Ðì¤)U%
ÑɱMÑQ¥À ´Ä°ÅÕ½Ðí
±¥¬¡ÉѼÍÑÉйÜÁ¥Í½¹ÑÉ丸¸ÅÕ½Ðì¤(ÀÌØíÁeÈôU%
Ñɱ
ÉÑ1° ÅÕ½ÐíÁ¥Í½eÈ¡¤¹¸°Íͽ¸ÌôÀ̤èÅÕ½Ðì°ØаÈÀ°ÄØØ°Äܤ(ÀÌØí1°ÄôU%
Ñɱ
ÉÑ1° ÅÕ½ÐíÁ¥Í½9յȡ¤¹¸°ØôÀؤèÅÕ½Ðì°àÔ°ÐÔ°ÄÐÔ°Äܤ(ÀÌØí1°ÈôU%
Ñɱ
ÉÑ1° ÅÕ½ÐíÁ¥Í½Ñ¥Ñ±èÅÕ½Ðì°ÄØÔ°ÜÄ°ØаÄܤ(ÀÌØí1°àôU%
Ñɱ
ÉÑ1° ÅÕ½Ðí=É¥¥¹°T¹L¸¥ÈÑ¡µ´¹¹åä¤èÅÕ½Ðì°ÜÄ°äаÄØÀ°Äܤ(ÀÌØí1°ÌôU%
Ñɱ
ÉÑ1° ÅÕ½ÐíM幥ѥ½¸¥ÈÑ¡µ´¹¹åä¤èÅÕ½Ðì°ÜÔ°ÄÄä°ÄÔØ°Äܤ(ÀÌØí1°ÐôU%
Ñɱ
ÉÑ1° ÅÕ½Ðí]É¥ÑѸäèÅÕ½Ðì°ÄÜÔ°ÄÐаÔÔ°Äܤ(ÀÌØí1°ÔôU%
Ñɱ
ÉÑ1° ÅÕ½Ðí¥ÉÑäèÅÕ½Ðì°ÄØä°ÄØä°ØÄ°Äܤ(ÀÌØí1°ØôU%
Ñɱ
ÉÑ1° ÅÕ½ÐíÕÍÐÍÑÉÉ¥¹ ±ÐìÐìôÄ°ÕÐÁÕб°½¸Ä±¥¹¤èÅÕ½Ðì°ÌÀ°ÄäаÈÀÀ°Äܤ(ÀÌØí1°ÜôU%
Ñɱ
ÉÑ1° ÅÕ½ÐíÁ¥Í½Íå¹½Á̡ͥµÕ±Ñ¤µ±¥¹°½½ÕÉÍ°Á½ÍÍ¥±°ÕйÍÕɹ¼¡ÉÉÑÕɹ̸¤èÅÕ½Ðì°ÌаÈÌÈ°ÌØаÄܤ)U%MÑMÑÑ¡M]}M!=¤(¹I¥½¸9-½U$ÍÑ¥½¸()]¡¥±Ä)M±À ÄÀÀ¤)]¹()Õ¹%¹ÁÕÐÄ ¤(ÀÌØí¥QáÐÄôU%
ÑɱI ÀÌØí%¹ÁÕÐĤìIÑ¡½¹Ñɽ°Ñ¼ÙÉ¥±¸)¹Õ¹)Õ¹%¹ÁÕÐÈ ¤(ÀÌØí¥QáÐÈôU%
ÑɱI ÀÌØí%¹ÁÕÐȤìIÑ¡½¹Ñɽ°Ñ¼ÙÉ¥±¸)¹Õ¹)Õ¹%¹ÁÕÐÌ ¤(ÀÌØí¥QáÐÌôU%
ÑɱI ÀÌØí%¹ÁÕÐ̤ìIÑ¡½¹Ñɽ°Ñ¼ÙÉ¥±¸)¹Õ¹)Õ¹%¹ÁÕÐÐ ¤(ÀÌØí¥QáÐÐôU%
ÑɱI ÀÌØí%¹ÁÕÐФìIÑ¡½¹Ñɽ°Ñ¼ÙÉ¥±¸)¹Õ¹)Õ¹%¹ÁÕÐÔ ¤(ÀÌØí¥QáÐÔôU%
ÑɱI ÀÌØí%¹ÁÕÐÔ¤ìIÑ¡½¹Ñɽ°Ñ¼ÙÉ¥±¸)¹Õ¹)Õ¹%¹ÁÕÐØ ¤(ÀÌØí¥QáÐØôU%
ÑɱI ÀÌØí%¹ÁÕÐؤìIÑ¡½¹Ñɽ°Ñ¼ÙÉ¥±¸)¹Õ¹)Õ¹%¹ÁÕÐÜ ¤(ÀÌØí¥QáÐÜôU%
ÑɱI ÀÌØí%¹ÁÕÐܤìIÑ¡½¹Ñɽ°Ñ¼ÙÉ¥±¸)¹Õ¹)Õ¹%¹ÁÕÐà ¤(ÀÌØí¥QáÐàôU%
ÑɱI ÀÌØí%¹ÁÕÐà¤ìIÑ¡½¹Ñɽ°Ñ¼ÙÉ¥±¸)¹Õ¹)Õ¹Á¥Í½Må¹½ÁÍ¥Ì ¤(ÀÌØí¥QáÐäôU%
ÑɱI ÀÌØí%¹ÁÕÐä¤ìIÑ¡½¹Ñɽ°Ñ¼ÙÉ¥±¸)¹Õ¹)Õ¹9Ý
±¥¬ ¤(U%
ÑɱMÑÑ ÀÌØí¥¹ÁÕÐÄ°ÅÕ½ÐìÅÕ½Ðì¤ìIÍÐÑ¡¥¹ÁÕн¹Ñɽ°Ñ¼±¹¬ÍÑÉ¥¹¸(U%
ÑɱMÑÑ ÀÌØí¥¹ÁÕÐÈ°ÅÕ½ÐìÅÕ½Ðì¤ìIÍÐÑ¡¥¹ÁÕн¹Ñɽ°Ñ¼±¹¬ÍÑÉ¥¹¸(U%
ÑɱMÑÑ ÀÌØí¥¹ÁÕÐÌ°ÅÕ½ÐìÅÕ½Ðì¤ìIÍÐÑ¡¥¹ÁÕн¹Ñɽ°Ñ¼±¹¬ÍÑÉ¥¹¸(U%
ÑɱMÑÑ ÀÌØí¥¹ÁÕÐаÅÕ½ÐìÅÕ½Ðì¤ìIÍÐÑ¡¥¹ÁÕн¹Ñɽ°Ñ¼±¹¬ÍÑÉ¥¹¸(U%
ÑɱMÑÑ ÀÌØí¥¹ÁÕÐÔ°ÅÕ½ÐìÅÕ½Ðì¤ìIÍÐÑ¡¥¹ÁÕн¹Ñɽ°Ñ¼±¹¬ÍÑÉ¥¹¸(U%
ÑɱMÑÑ ÀÌØí¥¹ÁÕÐØ°ÅÕ½ÐìÅÕ½Ðì¤ìIÍÐÑ¡¥¹ÁÕн¹Ñɽ°Ñ¼±¹¬ÍÑÉ¥¹¸(U%
ÑɱMÑÑ ÀÌØí¥¹ÁÕÐÜ°ÅÕ½ÐìÅÕ½Ðì¤ìIÍÐÑ¡¥¹ÁÕн¹Ñɽ°Ñ¼±¹¬ÍÑÉ¥¹¸(U%
ÑɱMÑÑ ÀÌØí¥¹ÁÕÐà°ÅÕ½ÐìÅÕ½Ðì¤ìIÍÐÑ¡¥¹ÁÕн¹Ñɽ°Ñ¼±¹¬ÍÑÉ¥¹¸(U%
ÑɱMÑÑ ÀÌØí¥¹ÁÕÐä°ÅÕ½ÐìÅÕ½Ðì¤ìIÍÐÑ¡¥¹ÁÕн¹Ñɽ°Ñ¼±¹¬ÍÑÉ¥¹¸)¹Õ¹)Õ¹=-
±¥¬ ¤(
±¥ÁAÕÐ ÀÌØí¥QáÐĵÀìÅÕ½ÐíàÅÕ½ÐìµÀìÀÌØí¥QáÐȵÀìÌäì°ÅÕ½ÐìÌäìµÀìÀÌØí¥QáÐ̵ÀìÌäìÅÕ½Ðì¼=ÉUM¥ÉÑèÌäìµÀìÀÌØí¥QáÐеÀì|(ÅÕ½Ðì¼M幥ѥ½¹¥ÉÑèÅÕ½ÐìµÀìÀÌØí¥QáÐÔµÀìÅÕ½Ðì¼]É¥Ñѹ    äèÅÕ½ÐìµÀìÀÌØí¥QáÐصÀìÅÕ½Ðì¼¥ÉÑ   äèÅÕ½ÐìµÀì|($$ÀÌØí¥QáÐܵÀìÅÕ½Ðì¼ÕÍÑMÑÉÌèÅÕ½ÐìµÀìÀÌØí¥QáÐàµÀìÅÕ½Ðì¼À¹Må¹½ÁÍ¥ÌèÅÕ½ÐìµÀìÀÌØí¥QáÐؤ(%M±À ÜÔÀ¤(% À ÄÔÀÀ°ÈÔÀ¤(% À ÄÀÀÀ°ÔÀÀ¤)¹Õ¹)Õ¹
¹±
±¥¬ ¤(%á¥Ð쥹¥Í¡)¹Õ¹

Like I mentioned above, after clicking the "New Entry" button and the boxes get wiped of data, is there any way to get the cursor back into the first box? Ideally, one would hit "New Entry" and then start typing in the info right away.

Thanks! Much appreciated. Great help from everyone. :)

p.s., in case anyone was wondering about the strange format of the output text or even the reason why for this script, I've been working on Stargate-related word lists for building puzzles. After extensive searches over last couple of years or more, early on felt that the "clues database" and all other reference materials would be best in text file format. This was because the main app I use works with text word lists that one simply loads into the program. A year or so ago, I discovered regex and last weekend I finally settled on just keeping database in a 1-line per word text file format. This script standardizes the data without user needing to do more than type in or paste in clues. Since I just modified the original word list, all this does is add a long line of information to the right of each wordd. So I have the original word list plus one that has the extra episode information which I then find words and their clues via simple regex on the directory. Thx. :P

Link to comment
Share on other sites

Like I mentioned above, after clicking the "New Entry" button and the boxes get wiped of data, is there any way to get the cursor back into the first box?

In your NewEntry() Func, add the line

GUICtrlSetState($Input1, $GUI_FOCUS)

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

It's difficult to ignore the other code because there is a problem in there that will prevent you from getting what you want without a lot of calls (that you don't need) to a function.

Since all of the input controls are in order it's easy to read them in a loop but the function you should be doing it in is Func OKClick().

Comment out the lines that say "GUICtrlSetOnEvent(-1, "Input *")

Then Change your OKClick() function to

;
Func OKClick()
    Local $I, $cTxt = ""
    ClipPut($cTxt)
    For $I = $Input1 To $Input7
       $cTxt &= GUICtrlRead($I) & @CRLF;; Read the value of each control and add it to the variable $cTxt
    Next
    ClipPut(StringStripWS($cTxt, 2));; Strip the last @CRLF and place the variables contents on the clipboard.
EndFunc
;

Your NewClick function probably won't be reqired in the end but for now you could use it just to reset all of the inputs like so.

;
Func NewClick()
    For $I = $Input1 To $Input7
       GUICtrlSetData($I, "") & @CRLF;; reset the contents of the inputs to empty strings.
    Next
EndFunc
;
Thanks, GS! Last night I had so little time due to hour when I got to this, I targeted the other solution but will look at this. Thanks! :)
Link to comment
Share on other sites

In your NewEntry() Func, add the line

GUICtrlSetState($Input1, $GUI_FOCUS)

<dancing jig> This is so very kewl. My new GUI works and seems to do so perfectly <knock on wood>! <g>

I only have a couple of questions,

1) when I've tried to compile scripts, I often get an error re opening an include file. I'm guessing because the code is external to the script (?) ... how do you compile GUIs like this or even plain scripts where the include file "cannot be opened", or whatever the error is?

2) In all the message boxes I've ever made incl. this GUI, the "X" close button at the upper right-hand corner never works. How _do_ we get that thing to function, anyone know?

Thanks GS! Much appreciated. :)

Link to comment
Share on other sites

<dancing jig> This is so very kewl. My new GUI works and seems to do so perfectly <knock on wood>! <g>

I only have a couple of questions,

1) when I've tried to compile scripts, I often get an error re opening an include file. I'm guessing because the code is external to the script (?) ... how do you compile GUIs like this or even plain scripts where the include file "cannot be opened", or whatever the error is?

2) In all the message boxes I've ever made incl. this GUI, the "X" close button at the upper right-hand corner never works. How _do_ we get that thing to function, anyone know?

Thanks GS! Much appreciated. :)

For #1 it's probably because the files you are trying to include are not in the AutoIt3\Include folder To #include a file that is not located there, use

#Include "Drive\FolderPath\My_File.au3". If The file is in the same folder as the script then you can use #Include "My_File.au3"

The #Include<File.au3> method only works when the file is in the same path as your standard UDFs which are installed with AutoIt.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I only have a couple of questions,

1) when I've tried to compile scripts, I often get an error re opening an include file. I'm guessing because the code is external to the script (?) ... how do you compile GUIs like this or even plain scripts where the include file "cannot be opened", or whatever the error is?

Done. This part recvd kind help on. Thx!

2) In all the message boxes I've ever made incl. this GUI, the "X" close button at the upper right-hand corner never works. How _do_ we get that thing to function, anyone know?

I found this out, too. Will post solution later. I stumbled upon a sample script for something else and on a lark tried the "X" button and it worked so extracted the syntax for that particular feature. 'sall good!

I am just moving on to the other typing of the 3 types of data capture, or better yet, user input capture, the checkbox. This thread started with the capturing text input. Got that pat and can now go on to use the process forever after. The 2nd type of user input that needs to be captured is simple checkboxes. I'm hoping it's okay to keep it all in the same thread as then the information will be all in one spot.

So the user will open up a script and then get a choice, say, of ticking off pre-established items that will then go to the clipboard or to an email client as a mailto, or wherever. An example,

I'd like to send an email to:

[ ]  Person A
[ ]  Person B
[ ]  Person C
[ ]  Person D
[ ]  Person E
So the action takes place according to whoever/whatever is selected, either to 1 or 2 or more in any combination of choices. In this example, clicking OK would collect mailto code together and be sent to the email client. It's just, how does one deal with the checkboxes. I haven't built the GUI yet but will do so using Koda, that part is the easy part! <g> If anyone can point me to a sample script, that would be great!

At the end of this thread, I'll post my sample scripts so that other newbies have a starting point to work with. I searched and searched but found little to help out with this. Granted, there are probably tons of scripts that use this feature, it's just not coming up in a standard search easily.

Thanks, as always!!! :)

Edited by Diana (Cda)
Link to comment
Share on other sites

  • 2 weeks later...

I'd like to send an email to:

[ ]  Person A
[ ]  Person B
[ ]  Person C
[ ]  Person D
[ ]  Person E
So the action takes place according to whoever/whatever is selected, either to 1 or 2 or more in any combination of choices. In this example, clicking OK would collect mailto code together and be sent to the email client. It's just, how does one deal with the checkboxes. I haven't built the GUI yet but will do so using Koda, that part is the easy part! <g> If anyone can point me to a sample script, that would be great!
Still with this one. I just haven't had a chance to look at this problem again. Quite some time has passed while I've been dealing with fallout from switching to new AVG8 from AVG7 and getting malware and wiping drive twice, in and amongst trying to go to work and dealing with my mom going to emergency, ... ! Been an eventful time lately.

But now would really like to see what I can come up with re this. If anyone knows how to capture ticked checkboxes, would greatly appreciate it. I did a ton of searching in the help file and in the forum search with no results but maybe this time will yield something. I'll try again. But if anyone knows any code to help with this, that would help enormously.

Thanks. muttley

Link to comment
Share on other sites

  • Moderators

But now would really like to see what I can come up with re this. If anyone knows how to capture ticked checkboxes, would greatly appreciate it. I did a ton of searching in the help file and in the forum search with no results but maybe this time will yield something. I'll try again. But if anyone knows any code to help with this, that would help enormously.

Thanks. muttley

I wrote an example of how to do this 2 different ways for the old help files, but it looks like Gary took them out.
#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

Example()

Func Example()
    Local $checkCN, $msg
    GUICreate("My GUI Checkbox")  ; will create a dialog box that when displayed is centered
    $checkCN = GUICtrlCreateCheckbox("CHECKBOX 1", 10, 10, 120, 20)
    GUISetState()       ; will display an  dialog box with 1 checkbox

    ; Run the GUI until the dialog is closed
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                Exit
            Case $checkCN
                If GUICtrlRead($checkCN) = $GUI_CHECKED Then
                    MsgBox(64, "Checked", "Checkbox is checked.")
                EndIf
        EndSwitch
    WEnd
EndFunc   ;==>Example

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I wrote an example of how to do this 2 different ways for the old help files, but it looks like Gary took them out.

Don't think it was me.

I usually don't mess with the regular examples only the UDFs.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...