• 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: do shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script


  • Subject: Re: do shell script
  • From: Axel Luttgens <email@hidden>
  • Date: Fri, 28 Mar 2014 08:53:09 +0100

Le 28 mars 2014 à 02:20, Iurista GmbH a écrit :

> Hi all
>
> Writing to a plist file like this:
>
> do shell script ("defaults write " & Plistfilename & " " & Key as text & " " & value)
>
> Plistfilename and Key are string globals, value may be a string or an integer.
>
> This works fine for text, but when the value is an integer, it does not transport that. The result in the plistfile is always a string.

Hello Rudolf,

The defaults command allows to specify the type of the data to be written to the plist; for example, in the case of an integer:

	do shell script ("defaults write " & Plistfilename & " " & Key as text & " -int " & value)

You may find the available type flags in the man page for defaults(1).

HTH,
Axel


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >do shell script (From: Iurista GmbH <email@hidden>)

  • Prev by Date: Re: Root User
  • Next by Date: Re: Root User
  • Previous by thread: Re: do shell script
  • Next by thread: QuickTime Pro 7
  • Index(es):
    • Date
    • Thread