• 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: What is wrong with this script?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is wrong with this script?


  • Subject: Re: What is wrong with this script?
  • From: Matthew Smith <email@hidden>
  • Date: Sat, 29 Nov 2003 16:05:00 +1100

on 29/11/2003 14:44, Michelle Steiner at email@hidden wrote:

> set effect to (button returned of (display dialog "Which Dock effect do
> you want?" buttons {"Scale", "Genie", " Suck"}))
>
> do shell script "defaults write com.apple.dock mineffect " & effect &
> return & "killall Dock"
>
> --> "2003-11-28 20:43:34.216 defaults[1019] Unexpected argument Dock;
> leaving defaults unchanged."

Shouldn't that be:

do shell script "defaults write com.apple.dock mineffect " & effect &
";killall Dock"

The ";" allows you to put 2 commands on the online. The second command oinly
executes if the first one succeeds.

Of course the newline character for unix is a linefeed not a return, but I
am not sure if "do shell script" can handle multiple lines.

--
Matthew Smith
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: What is wrong with this script?
      • From: "John W. Baxter" <email@hidden>
    • Re: What is wrong with this script?
      • From: Michelle Steiner <email@hidden>
References: 
 >What is wrong with this script? (From: Michelle Steiner <email@hidden>)

  • Prev by Date: What is wrong with this script?
  • Next by Date: Re: What is wrong with this script?
  • Previous by thread: What is wrong with this script?
  • Next by thread: Re: What is wrong with this script?
  • Index(es):
    • Date
    • Thread