Re: Load Script Problem
Re: Load Script Problem
- Subject: Re: Load Script Problem
- From: Christopher Stone <email@hidden>
- Date: Sat, 14 Nov 2015 23:23:25 -0600
- X_v_e_cd: 64a54b7ef628e982031da1e383377121
- X_v_r_cd: 2988885977afeb638e9176d2b9b17c9f
On Nov 12, 2015, at 19:35, Stan Cleveland < email@hidden> wrote: It occcurs to me that there is another way. It’s the old second-level evaluation “trick” to coerce a string (or text file contents) into a script object:
______________________________________________________________________
Ha! Thanks. I tried that earlier and apparently flubbed something.
Somewhere your software converted a quote to a “smart” quote, so your script wouldn't compile for me without some doctoring.
I suppose I need to break down and write a zap-gremlins script for Script Debugger to deal with those and non-breaking spaces (both of which have been biting me lately).
This works nicely.
------------------------------------------------------------------------------------------- set pathToTextFile to alias ((path to downloads folder as text) & "testAS.txt") # Extra step to make debugging easier. set scriptText to ("script s" & return & (read pathToTextFile as «class utf8») & return & "end script" & return & "return s") set scriptObject to run script scriptText run scriptObject -------------------------------------------------------------------------------------------
|
_______________________________________________
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