Perl Help Please

2002-11-25 Thread Chuck Taylor
This Perl newbie needs a little advanced help.  I'm trying a new 

Login Hook to start classic, I made the Perl script out of an 

Applescript.  However, and probably not surprising to you, it did not 

work.

 

It does work in the Applescript but I would prefer to make Perl for use 

in a hook.  Here is the Applescript

 



property appPath : /System/Library/CoreServices/Classic 

Startup.app/Contents/Resources/

property appName : TruBlueEnvironment

tell application Terminal

   do script with command cd '  appPath  ';./  appName  ;exit

   delay 6

end tell

#

 

After doing some debugging this is what I thought the Perl script 

should look like.

 

#!/usr/bin/perl

 

/System/Library/CoreServices/Classic 

Startup.app/Contents/Resources/';./cdTruBlueEnvironment;

 

I made sure it was executable using chmod +X but each time I test it I 

get a bad command.  What did I miss

 

Any help would be appreciated, Thanks!

 

Chuck Taylor

San Juan Unified School District K-12

 

 

 




RE: Perl Help Please

2002-11-25 Thread Chuck Taylor
Thanks Troy,

The CD was a problem but not entirely, some of my close but not perfect
scripts did not contain the cdTruBlueEnvironment; statement.  It's amazing
how you look at something a thousand times and never see something until
someone points it out.

TruBlueEnvironment is inside of the contents of Classic Startup.app when
launching Classic in this manner via the Applescript it opens Classic
silently no windows at all, well with the exception of the Terminal window.

That's what I was trying to avoid is the window thing, either by terminal or
by the app itself.  Here is another try, but I'm getting the same result
from the terminal Bad Command

#!/usr/bin/perl

cd '/System/Library/CoreServices/ClassicStartup.app/Contents/Resources/';./
TruBlueEnvironment;exit



Should I be saving this script as an executable or make it a Terminal
command?

Thanks
Chuck

-Original Message-
From: Troy Davis [mailto:[EMAIL PROTECTED]] 
Sent: Monday, November 25, 2002 2:23 PM
To: Chuck Taylor
Cc: [EMAIL PROTECTED]
Subject: Re: Perl Help Please

Hi Chuck,

Try this:

---
#!/usr/bin/perl

my $status = `open -a /System/Library/CoreServices/Classic Startup.app`;
---

I don't know what this means, though:
../cdTruBlueEnvironment;

Are you trying to cd into that dir?

Cheers,
Troy

This Perl newbie needs a little advanced help.  I'm trying a new

Login Hook to start classic, I made the Perl script out of an

Applescript.  However, and probably not surprising to you, it did not

work.



It does work in the Applescript but I would prefer to make Perl for use

in a hook.  Here is the Applescript





property appPath : /System/Library/CoreServices/Classic

Startup.app/Contents/Resources/

property appName : TruBlueEnvironment

tell application Terminal

do script with command cd '  appPath  ';./  appName  ;exit

delay 6

end tell

#



After doing some debugging this is what I thought the Perl script

should look like.



#!/usr/bin/perl



/System/Library/CoreServices/Classic

Startup.app/Contents/Resources/';./cdTruBlueEnvironment;



I made sure it was executable using chmod +X but each time I test it I

get a bad command.  What did I miss



Any help would be appreciated, Thanks!



Chuck Taylor

San Juan Unified School District K-12








-- 
___
There's nothing remarkable about it.  All one has to do is hit the right
keys at the right time and the instrument plays itself.
  - J.S. Bach