Hej Olof!

I tried the guts of your script on my MacBook and was a bit surprised to find 
that "kind of" actually returns the localized word for folder, i.e. "mapp". 
This was my first suspect.

Could it be that the files you try with now have no file type set? That would 
return 'missing value' for the file type check, and that doesn't match your 
"TEXT" condition.

Try this line instead:
                if (file type of oneFile is "TEXT" or file type of oneFile is 
missing value) ¬
                         and creator type of file oneFile is not "R*ch" then 
set creator type of file oneFile to "R*ch"

If you want the script to work regardless of localization you can use this 
condition instead, to compare with the kind of a known folder, for example the 
home folder:

                        if kind of oneFile ‚ kind of home then


At 15.57 +0200 2007-06-06, Olof Svensson wrote:
>hej alla!
>
>English is not my first language. I try to keep it short but I don't want to 
>sound unfriendly.
>
>I just upgraded to an Intel mac and this old script don't work anymore.
>
>--------------------------- script -------------------------
>on open FileList
>       repeat with oneFile in FileList
>               tell application "Finder"
>                       if kind of oneFile ‚ "mapp" then
>                               if file type of oneFile is ¬
>                                       "TEXT" and creator type of file oneFile 
> is not "R*ch" then set creator type of file oneFile to "R*ch"
>                       end if
>               end tell
>       end repeat
>end open
>
>--------------------------- end script -------------------------
>
>OR..
>is there another way to make BBEdit open all my "TEXT" files?
>
>From a sunny Stockholm
>Olof Svensson
>--
>------------------------------------------------------------------------
>Have a feature request? Not sure the software's working correctly?
>If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
>List FAQ: <http://www.barebones.com/support/lists/bbedit_script.shtml>
>List archives: <http://www.listsearch.com/bbeditscripting.lasso>
>To unsubscribe, send mail to:  <[EMAIL PROTECTED]>


--
     Johan Sölve    [FSA Member, Lasso Partner]
     Web Application/Lasso/FileMaker Developer
     MONTANIA SOFTWARE & SOLUTIONS
http://www.montania.se   mailto:[EMAIL PROTECTED]
 (spam-safe email address, replace '-' with 'a')

--
------------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_script.shtml>
List archives: <http://www.listsearch.com/bbeditscripting.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to