• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Toggle Screensaver - OP Feedback & POSIX file issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toggle Screensaver - OP Feedback & POSIX file issues


  • Subject: Re: Toggle Screensaver - OP Feedback & POSIX file issues
  • From: Mr Tea <email@hidden>
  • Date: Mon, 20 Feb 2006 18:33:36 +0000

Thanks again to John C Welch for the info about the systemsetup file buried
inside the 'ARDAgent' application, even though it wasn't what I was looking
for initially.

Using the script worked up by Kai and the options presented by John's tip, I
can now turn off screensaver activation and turn on display sleep in one
fell swoop, and the same in reverse. Marvellous, and for my purposes, even
better than what I originally set out to achieve.

I have some further questions about that 'systemsetup' file, though...

I'm not terribly au fait with shell scripting, so it took a bit of digging
around to figure out how to act on the info provided by Mr Welch. Seems that
I need to get a posix path to the file, append the relevant command, and run
it as a shell script. Simple really.

So, is 'systemsetup' a Unix executable file? (I've long been aware of the
existence of these fabled entities, but never quite understood what they
were about.)

Also, when I saw that systemsetup was actually an alias file, I looked for
the original, and found that it pointed to a file called
'systemsetup-panther' in the same directory (there was also one called
'systemsetup-jaguar'). Is this as it should be?

Finally, I encountered some strange issues with the posix file thing. Take
this single line script:

-->>>>>
set pf to POSIX file
"/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support
/systemsetup"
--<<<<<

If I type or paste the above into a script editor, then compile or run it,
the word 'POSIX' vanishes from the line and the slash-delimited path changes
into a colon delimited path. Why?

Worse than this, if I compile the script, then try to run it, I get an error
message: 'Can't make file "blah:blah" into type reference', and the text of
the path changes from Unicode to a crummy old string. BUT, if I run the same
script WITHOUT compiling it first, it runs just fine, time after time.
Surely this is a bug?

NB ­ I found that the compile/run problem could be avoided by putting the
posix-style path in a variable, thusly:

-->>>>>
set pp to
"/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support
/systemsetup"

set pf to POSIX file pp
--<<<<<

... but surely this extra step should not be necessary.



Nick
pp Mr Tea
--

Brew of the day: PG Tips

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Toggle Screensaver - OP Feedback & POSIX file issues
      • From: "Adam Bell" <email@hidden>
References: 
 >Re: Toggle Screensaver (From: "John C. Welch" <email@hidden>)

  • Prev by Date: Re: Variable for multiple recipients in Mail
  • Next by Date: Lists, Arrays, or Records ????
  • Previous by thread: Re: Toggle Screensaver
  • Next by thread: Re: Toggle Screensaver - OP Feedback & POSIX file issues
  • Index(es):
    • Date
    • Thread