Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Real n00b here, capturing input?


  • Please log in to reply
31 replies to this topic

#1 Diana (Cda)

Diana (Cda)

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 725 posts

Posted 15 June 2008 - 01:50 PM

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         
; ; 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("") EndFuncƒo݊÷ ؍ýšz-²êÞ­¶‡hìmj¢}ý¶¯y¬(®H§º1¡ûaŠËr¥ëh–Š$jÖýš ž²È§ƒœj{(™èhÂ뽪âi¹^²Új›n­ë¬z¸§¦ëbz)꺋bž›­Ö«¨µ¦è½ì(ºWHºÇ¬¢g­†)à–)¶¬jëhŠ×6Func Input1()     $Input1=... EndFuncƒo݊÷ ٩ݶ§Š{ayº-¶‰šºÚ"µÍ‘[˜ÈÒÐÛXÚÊ B‚PÛ]     œ][ÝÉˆÌ ÍŽÒ[œ] H ˜[È  ˆÌ ͎×××È   ˜[È  œ][ÝÈÚ]]™Ž‰œ][ÝÈ    ˜[È  ˆÌ ͎××È ˜[È ‹‹ˆ]ˈ ‹‹ŠB‘[™[˜


Thanks. :)

Edited by Diana (Cda), 15 June 2008 - 01:54 PM.








#2 martin

martin

    ~~\o/~~~/0\=¬''~~~

  • MVPs
  • 7,313 posts

Posted 15 June 2008 - 01:55 PM

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         
; ; 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("") EndFuncƒo݊÷ ؍ýšz-²êÞ­¶‡hìmj¢}ý¶¯y¬(®H§º1¡ûaŠËr¥ëh–Š$jÖýš ž²È§ƒœj{(™èhÂ뽪âi¹^²Új›n­ë¬z¸§¦ëbz)꺋bž›­Ö«¨µ¦è½ì(ºWHºÇ¬¢g­†)à–)¶¬jëhŠ×6Func Input1()     $Input1=... EndFuncƒo݊÷ ٩ݶ§Š{ayº-¶‰šºÚ"µÍ‘[˜ÈÒÐÛXÚÊ B‚PÛ]     œ][ÝÉˆÌ ÍŽÒ[œ] 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.

#3 Diana (Cda)

Diana (Cda)

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 725 posts

Posted 15 June 2008 - 02:07 PM

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! :)

#4 martin

martin

    ~~\o/~~~/0\=¬''~~~

  • MVPs
  • 7,313 posts

Posted 15 June 2008 - 02:24 PM

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.

#5 Diana (Cda)

Diana (Cda)

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 725 posts

Posted 15 June 2008 - 03:17 PM

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), 15 June 2008 - 03:18 PM.


#6 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,573 posts

Posted 15 June 2008 - 03:46 PM

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

GeorgeQuestion 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!"

#7 Diana (Cda)

Diana (Cda)

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 725 posts

Posted 15 June 2008 - 07:34 PM

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. :)

#8 Diana (Cda)

Diana (Cda)

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 725 posts

Posted 15 June 2008 - 07:39 PM

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! :)

#9 Diana (Cda)

Diana (Cda)

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 725 posts

Posted 16 June 2008 - 11:08 AM

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

#10 Malkey

Malkey

  • Active Members
  • PipPipPipPipPipPip
  • 1,496 posts

Posted 16 June 2008 - 02:33 PM

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         
; ; 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


#11 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,573 posts

Posted 16 June 2008 - 02:39 PM

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 ;

GeorgeQuestion 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!"

#12 Diana (Cda)

Diana (Cda)

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 725 posts

Posted 17 June 2008 - 04:41 AM

[quote name='Malkey' date='Jun 16 2008, 06:33 AM' post='537032']
I had a little play with your script and got the below script to put some stuff onto clipboard.
AutoIt         
; ; AutoIt 3x ; #include <GUIConstants.au3>ƒo݊÷ ÚÉ⤠²‰žßtájy,~Ší…æâ‚¥¦)í…êâ‚]Š·œ¶*':w"¶žÆÚÚ³)ík‰Ù÷öÙ'£hÂÚ ‡(ºWp¢¹(žØb²–¢žËZ’)à—+b–R ¢Û(™ëaŠx-…«_ºw-Š‰ìwb¶·š–¡ë0¢¹7Ýhh¡çžßym‚ AzZ0ŠËazÇ+Š›Z²+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

#13 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,573 posts

Posted 17 June 2008 - 06:03 AM

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)
GeorgeQuestion 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!"

#14 Diana (Cda)

Diana (Cda)

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 725 posts

Posted 17 June 2008 - 10:52 AM

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! :)

#15 Diana (Cda)

Diana (Cda)

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 725 posts

Posted 17 June 2008 - 10:56 AM

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. :)

#16 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,573 posts

Posted 17 June 2008 - 12:31 PM

<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.
GeorgeQuestion 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!"

#17 Diana (Cda)

Diana (Cda)

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 725 posts

Posted 23 June 2008 - 03:36 PM

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), 23 June 2008 - 03:41 PM.


#18 Diana (Cda)

Diana (Cda)

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 725 posts

Posted 05 July 2008 - 01:55 PM

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:

#19 SmOke_N

SmOke_N

    It's not what you know ... It's what you can prove!

  • Moderators
  • 15,730 posts

Posted 05 July 2008 - 02:01 PM

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


#20 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 05 July 2008 - 02:04 PM

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.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users