Re: Passing an AppleScript string to a perl routine

2002-03-01 Thread Gero Herrmann

At 22:50 -0600 2002-02-28, Bruce A. Burdick, Jr. wrote:
>What about:
>set perlFileCall to perlFile & " " & myStr
>set myDate to do shell script perlFileCall

This works as long as the Perl script is stored in a separate file. When
embedding the Perl script inside the AppleScript I could not make it work
but in that case all data to be passed can be embedded in the text of the
Perl script itself - there is no need for command line arguments.

-

set argument to "This is passed to Perl"

set my text item delimiters to return
set perlScript to text items of "/usr/bin/perl <<'__END__'
my $argument = <<'EOFARGS';
" & argument & "
EOFARGS
chomp $argument;
print qq(Perl was passed: $argument);
__END__
"
set my text item delimiters to ascii character 10
do shell script (perlScript as text)

display dialog result

-

Whith this technique AppleScript droplets can be made that contain Perl
code just like MacPerl DropShell droplets do - but which work natively in
both Mac OS X and classic Mac OS, using the appropriate Perl.

Gero Herrmann
Nishinomiya, Japan



Re: Passing an AppleScript string to a perl routine

2002-03-01 Thread Chris Nandor

In article ,
 [EMAIL PROTECTED] (Paul N. Schatz) wrote:

>   It would be much nicer to simply pass myStr directly to the 
> perl script for execution without the use of a temporary file, but I 
> can't seem to do it.
> 
>   This subject was discussed on the MacPerl list quite a while 
> ago, but I couldn't make the methods discussed there work.

Well, in MacPerl, it is very different than in perl.  In perl, you might 
try executing from the command line, something like `osascript 
scriptname | perl perlscriptname`, where the output is piped to perl, 
etc.

-- 
Chris Nandor  [EMAIL PROTECTED]http://pudge.net/
Open Source Development Network[EMAIL PROTECTED] http://osdn.com/



Re: Announce: osx-client mailing list

2002-03-01 Thread Chris Nandor

In article , [EMAIL PROTECTED] 
wrote:

> This is just off the top of my head mind, I'm sure if you give me 
> time to think I could come up with a couple of others.

No, that's fine, I just didn't know what you meant by the phrase.  
Thanks,

-- 
Chris Nandor  [EMAIL PROTECTED]http://pudge.net/
Open Source Development Network[EMAIL PROTECTED] http://osdn.com/



oops!

2002-03-01 Thread robinmcf
Apologies to the other list members for the duplicate emails


Robin


Re: Announce: osx-client mailing list

2002-03-01 Thread connect-jp
At 10:03 pm -0500 28/02/02, Chris Nandor wrote:
>[EMAIL PROTECTED] wrote:
>>   Due to the lack of such a mailing list dealing with OSX client 
>>only problems
>>   I went ahead and set one up - send an email to [EMAIL PROTECTED]
>>   with subscribe osx-client on a line of it's own in the message body.
>
>What are "OSX client only problems"?

well for one how about seeing that OSX client is intended for 'the
general userbase', OSX client users don't get documentation bundled
regarding anything remotely unixish (ever tried the built in help
function on say Net Info manager?).

Oh sure you get the man pages I hear you say, but they don't point
out small details, for example the fact MacOSX uses a gcc compiler
which has been modified and perversely renamed back to 'cc'. Small
but significant I think you'll agree.

This is just off the top of my head mind, I'm sure if you give me
time to think I could come up with a couple of others.


Robin


Re: Announce: osx-client mailing list

2002-03-01 Thread robinmcf
At 10:03 pm -0500 28/02/02, Chris Nandor wrote:
>[EMAIL PROTECTED] wrote:
>>  Due to the lack of such a mailing list dealing with OSX client only problems
>>  I went ahead and set one up - send an email to [EMAIL PROTECTED]
>>  with subscribe osx-client on a line of it's own in the message body.
>
>What are "OSX client only problems"?

well for one how about seeing that OSX client is intended for 'the 
general userbase', OSX client users don't get documentation bundled 
regarding anything remotely unixish (ever tried the built in help 
function on say Net Info manager?).

Oh sure you get the man pages I hear you say, but they don't point 
out small details, for example the fact MacOSX uses a gcc compiler 
which has been modified and perversely renamed back to 'cc'. Small 
but significant I think you'll agree.

This is just off the top of my head mind, I'm sure if you give me 
time to think I could come up with a couple of others.


Robin