Re: Getting source text of a compiled script
Re: Getting source text of a compiled script
- Subject: Re: Getting source text of a compiled script
- From: Gnarlodious <email@hidden>
- Date: Fri, 12 Aug 2005 15:22:26 -0600
Entity Kumar Shailove spoke thus:
> Hey list,
> I need to do some text level operations in thousands of my compiled
> scripts.
> Opening and then processing them in a host application like Script
> Editor or Debugger really becomes cumbersome and time-consuming.
> Is there any way so that I can get the entire text of the compiled
> script in a variable and proceed with that variable without actually
> opening the script in Script Editor/Debugger.
No, because the text is in a resource fork.
But you can say this:
tell application "Finder"
set fileList to every file of folder "Rachel: iChat:"
repeat with i from 1 to count of fileList
set someFile to item i of fileList
if file type of someFile is "osas" then
tell application "Script Debugger"
open someFile
set scriptText to the text of the front window
-- do your stuff
set the front window to scriptText
close window 1 saving yes
end tell
end if
end repeat
end tell
-- Gnarlie
_______________________________________________
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