• 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: Question about PrefsStorageLib and compiling problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about PrefsStorageLib and compiling problem


  • Subject: Re: Question about PrefsStorageLib and compiling problem
  • From: "L. Lee" <email@hidden>
  • Date: Wed, 27 Mar 2019 17:43:56 -0500


> On Mar 27, 2019, at 4:21 PM, Stockly, Ed <email@hidden> wrote:
>
> What framework? There's no "use framework …" line in your script. Nor is
> there a
>
> use script "DefaultsLib" version "1.0.0"
>
> Is there more to the script that we're seeing?
>
> Have you tried replacing "as string" with "as text"?
>
> -------------------
>
> use AppleScript version "2.5"
> use scripting additions
> use framework "Appkit"
> use framework "Foundation"
> use framework "Carbon"
> use script "DefaultsLib" version "1.0.0"
>
>
> set tmpfile to (path to temporary items folder as string) & "exp_" &
> (characters 3 thru end of ((random number) as string) as string)
> -------------------
>
> What OS version are you using?
> -->  Script Debugger 7.0.7 (7A72)
> -->  Mac OS 10.11.6 (15G22010)
>


By “framework”, I simply meant all system components related to AppleScript.
I’m in Script Editor 2.11 in Mojave10.14.3.

Changing the last two occurrences of “string” to “text” allowed the script to
compile:

use AppleScript version "2.5"
use scripting additions
set tmpfile to (path to temporary items folder as string) & "exp_" &
(characters 3 thru end of ((random number) as text) as text)

I wasn’t aware that would affect the ability to compile when lines starting
with the “use” verb preceded the line in the script. The original form compiles
if the “use” statements follow the line instead of preceding it, although
moving them might also have unintended results. That means it may be related to
AppleScript after all. Anyway, I should be able to continue my experimenting
now.

Thanks.

Laine Lee
 _______________________________________________
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: 
 >Question about PrefsStorageLib and compiling problem (From: Laine Lee <email@hidden>)
 >Re: Question about PrefsStorageLib and compiling problem (From: "Stockly, Ed" <email@hidden>)
 >Re: Question about PrefsStorageLib and compiling problem (From: "L. Lee" <email@hidden>)
 >Re: Question about PrefsStorageLib and compiling problem (From: "Stockly, Ed" <email@hidden>)
 >Re: Question about PrefsStorageLib and compiling problem (From: "L. Lee" <email@hidden>)
 >Re: Question about PrefsStorageLib and compiling problem (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: Question about PrefsStorageLib and compiling problem
  • Next by Date: Re: Question about PrefsStorageLib and compiling problem
  • Previous by thread: Re: Question about PrefsStorageLib and compiling problem
  • Next by thread: Problem editing saved AppleScript apps since 10.4.4 update
  • Index(es):
    • Date
    • Thread