• 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: Getting source text of a compiled script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Getting source text of a compiled script (From: "Kumar Shailove" <email@hidden>)

  • Prev by Date: Re: Powerpoint 2004 Search and replace
  • Next by Date: Re: POSIX and lists question
  • Previous by thread: Getting source text of a compiled script
  • Next by thread: Re: Getting source text of a compiled script
  • Index(es):
    • Date
    • Thread