cocoadialog-users Mailing List for CocoaDialog (Page 3)
Status: Beta
Brought to you by:
sporkstorms
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(5) |
Nov
|
Dec
|
2006 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(15) |
2009 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mark A. S. <ma...@sp...> - 2005-03-02 19:43:30
|
Well, this is more of a shell question than a CocoaDialog question. It sounds like the heart of your question is regarding how to split a variable on newlines, yea? If so, something like this should work for bash (disclaimer: This may not be entirely correct, there may be better ways, etc etc. ;) I do most of my shell scripting with Perl.: OLD_IFS="$IFS" IFS=$'\n' rv=($($CD standard-inputbox --no-newline)) echo -n "User pressed: " echo ${rv[0]} echo -n "User typed: " echo ${rv[1]} IFS="$OLD_IFS" Now, note that ${rv[1]} will only contain the second line, so be sure to adjust that snippet accordingly if you want multi-line input (from the textbox for example). Also, i believe there is a bug in standard-inputbox when the --string-output is given. Hopefully i'll have time to look into it soon. (I'm just pointing it out so you don't bang your head on the desk for hours thinking your script is broken if you try to use that option). hth - mark On Mar 1, 2005, at 12:01 PM, Brad Schwie wrote: > > I haven't been able to find anything in this mailing list, the > documentation, or on the web about setting variables in a shell script > through user input. > > I'd like to be able to take user input via an inputbox or > standard-inputbox in a shell script and set a variable. Can anyone > explain to me how to do this? > > I was able to use the Perl examples for a standard-inputbox and > inputbox to set a variable, but here's my problem. The variable is > set, but the first line of the variable has the number of the button > that was pressed and then the input data (the data I really care > about) is stuck on the second line of the variable. How do I set the > variable so that just the input data is contained? Does the shell > have anyway to split data up, like Perl does? Maybe I need to use > pipes like a previous poster mentioned... Maybe I need to look at > more shell examples on the web? > > Thanks! > > Brad > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Cocoadialog-users mailing list > Coc...@li... > https://lists.sourceforge.net/lists/listinfo/cocoadialog-users > |
From: Brad S. <sc...@ya...> - 2005-03-01 18:01:55
|
I haven't been able to find anything in this mailing list, the documentation, or on the web about setting variables in a shell script through user input. I'd like to be able to take user input via an inputbox or standard-inputbox in a shell script and set a variable. Can anyone explain to me how to do this? I was able to use the Perl examples for a standard-inputbox and inputbox to set a variable, but here's my problem. The variable is set, but the first line of the variable has the number of the button that was pressed and then the input data (the data I really care about) is stuck on the second line of the variable. How do I set the variable so that just the input data is contained? Does the shell have anyway to split data up, like Perl does? Maybe I need to use pipes like a previous poster mentioned... Maybe I need to look at more shell examples on the web? Thanks! Brad |
From: Mark A. S. <ma...@sp...> - 2005-02-12 20:18:04
|
Hello. This problem isn't so much about the way Perl works, as it is about the way Unix works. The "Unix way" to do this sort of thing is to execute separate scripts, one after another, and pipe their results to the next program. The way you "return" values in the shell is to print them to stdout. Example: script1.sh | script2.pl | script3.sh | final_script.sh Where each of those scripts does one specific thing. Now if your script doesn't make sense to be split into multiple scripts, there are a couple of alternatives - probably easier to implement as well. You can just catch the stdout of a program with backticks. The syntax is the same in Perl (see "perldoc perlop") and bash (see "man bash"). Example: ------- main_program.sh -------- #!/bin/bash something=`perl hello.pl mark` echo "the Perl script wanted me to tell you $something" ----- snip ----- ---- hello.pl ---- #!/usr/bin/perl -w use strict; my $name = shift @ARGV; print "Hello ", $name, "\n"; --- snip --- Running main_program.sh will print to stdout "Hello mark". A third, and probably best solution is to just rewrite your scripts entirely in bash or entirely in Perl - whichever you're more comfortable with. I hope this helps. If not, let me know more specifically with examples what you're trying to do. - mark On Feb 11, 2005, at 5:40 PM, Heather Emmerton wrote: > Hi, > I don't know how regularly this list is monitored, but > thought I would try anyway... > I am using CocoaDialog to GUI-up some unix-based > procedures. I am hoping to use several of the example > functions in one 'master script'. Specifically I am > using msgboxes and the perl input text box. I'm a > novice perl user and I'm wondering if anyone can give > me any tips (or confirm it's even possible) to > pass variable values back UP from my perl input text- > box 'subroutine' to the parent bash script that called > it. I have tried to very crudely modify an ENV variable > in perl and read it from the bash script, but the > bash script is not reading the modified value. > I have been calling the perl script command-line style > from my bash script as follow: > perl myscript.pl > I would suppose there is a better way of using a perl > subroutine, but as a novice perl user (read 'never > used perl before needing the perl textbox script') > I don't know how to do this (I'll be buying a > perl book this weeke > nd to ameliorate this situation) > I don't think I can simply use a return value from > a perl subroutine, because I need to pass longer > values, specifically the string from the text > input box. > If anyone has a suggestion of how this could be > accomplished, your advice would be MUCH appreciated. > Thanks in advance, > Heather > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Cocoadialog-users mailing list > Coc...@li... > https://lists.sourceforge.net/lists/listinfo/cocoadialog-users > |
From: Heather E. <Hea...@sh...> - 2005-02-11 23:42:17
|
Hi, I don't know how regularly this list is monitored, but thought I would try anyway... I am using CocoaDialog to GUI-up some unix-based procedures. I am hoping to use several of the example functions in one 'master script'. Specifically I am using msgboxes and the perl input text box. I'm a novice perl user and I'm wondering if anyone can give me any tips (or confirm it's even possible) to pass variable values back UP from my perl input text- box 'subroutine' to the parent bash script that called it. I have tried to very crudely modify an ENV variable in perl and read it from the bash script, but the bash script is not reading the modified value. I have been calling the perl script command-line style from my bash script as follow: perl myscript.pl I would suppose there is a better way of using a perl subroutine, but as a novice perl user (read 'never used perl before needing the perl textbox script') I don't know how to do this (I'll be buying a perl book this weeke nd to ameliorate this situation) I don't think I can simply use a return value from a perl subroutine, because I need to pass longer values, specifically the string from the text input box. If anyone has a suggestion of how this could be accomplished, your advice would be MUCH appreciated. Thanks in advance, Heather |
From: <ben...@id...> - 2004-05-25 09:47:50
|
Dear Open Source developer I am doing a research project on "Fun and Software Development" in which I kindly invite you to participate. You will find the online survey under http://fasd.ethz.ch/qsf/. The questionnaire consists of 53 questions and you will need about 15 minutes to complete it. With the FASD project (Fun and Software Development) we want to define the motivational significance of fun when software developers decide to engage in Open Source projects. What is special about our research project is that a similar survey is planned with software developers in commercial firms. This procedure allows the immediate comparison between the involved individuals and the conditions of production of these two development models. Thus we hope to obtain substantial new insights to the phenomenon of Open Source Development. With many thanks for your participation, Benno Luthiger PS: The results of the survey will be published under http://www.isu.unizh.ch/fuehrung/blprojects/FASD/. We have set up the mailing list fa...@we... for this study. Please see http://fasd.ethz.ch/qsf/mailinglist_en.html for registration to this mailing list. _______________________________________________________________________ Benno Luthiger Swiss Federal Institute of Technology Zurich 8092 Zurich Mail: benno.luthiger(at)id.ethz.ch _______________________________________________________________________ |
From: Mark A. S. <ma...@sp...> - 2004-04-21 01:03:04
|
Just testing the mailing list was set up correctly |