Way to put PPPoE status in menubar?

Ken Ray kray at sonsothunder.com
Tue Mar 18 15:13:07 EST 2003


You need to put quotes around the file path because "Menu Extras" is two
words. You'll notice I did that in the Rev code; you'll need to do that
in the AppleScript code instead.

(Oh, and one last thing... I just noticed your posts and my reply was in
HTML - I've converted this response to plain text and you should tweak
your email client to only send plain text posts to the list.)

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 
-----Original Message-----
From: use-revolution-admin at lists.runrev.com
[mailto:use-revolution-admin at lists.runrev.com] On Behalf Of
RGould8 at aol.com
Sent: Tuesday, March 18, 2003 12:00 PM
To: use-revolution at lists.runrev.com
Subject: Re: Way to put PPPoE status in menubar?


Thanks! 

This is just what I'm looking for, except one thing - - - since this is
for a commercial application, I can't use the beta of Rev 2.  If I can
just get this working in Applescript, then I can get this working in Rev
1.1.1 with the Applescript PowerAdd-ons OSAX to make calls to the unix
shell.

The problem I'm having is that if I do:

Shell "open /System/Library/CoreServices/Menu Extras/PPPoE.menu"

in Applescript, it gives me this error:

No such file: /System/Library/CoreServices/Menu

This makes me think that AppleScript doesn't like the space after the
word "Menu".  AppleScript also doesn't like when I put quotes in the
shell command like this:

Shell (open "/System/Library/CoreServices/Menu Extras/PPPoE.menu")

it then says "can't open file due to AppleEvent error".

So unfortunately, this is turning more into an AppleScript problem as
opposed to a Revolution problem, but either way, I'm still somewhat
stuck.  Any advice is appreciated.

In a message dated 3/18/03 11:13:35 AM, kray at sonsothunder.com writes:




You can do it this way with Rev 2:

 

on mouseUp

  set the hideConsoleWindows to true

  get shell("open " & quote & "/System/Library/CoreServices/Menu
Extras/PPPoE.menu" & quote)

end mouseUp

 

Works for me in 10.2.4,

 


Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/




-----Original Message-----
From: use-revolution-admin at lists.runrev.com
[mailto:use-revolution-admin at lists.runrev.com] On Behalf Of
RGould8 at aol.com
Sent: Tuesday, March 18, 2003 8:44 AM
To: use-revolution at lists.runrev.com
Subject: Way to put PPPoE status in menubar?


I'm trying to figure out how to get Revolution to put the PPPoE status
in the menubar in Mac OS X.  (Basically mimicing what happens if the
user were to check the "show PPP status in menubar" checkbox in the
networking pane).

After digging around in the web for a bit, I read that this will do the
trick in the terminal window:

/System/Library/CoreServices/Menu Extras/PPPoE.menu

However, when I go into the "Library" folder, I don't see this
CoreServices directory.  I'm assuming if I can get this working in
terminal, then there's a way to get AppleScript to make a call to the
terminal from Revolution to execute the command.  Anyone have an idea of
what this syntax might look like?




More information about the use-livecode mailing list