]>
Commit | Line | Data |
---|---|---|
61d6643f JS |
1 | --------------------------------------------------------------------------------- |
2 | -- Name: docs/mac/SetXMLCreator.applescript | |
3 | -- Purpose: Sets the creator types of the XML files | |
4 | -- Author: Ryan Wilcox | |
5 | -- Modified by: | |
6 | -- Created: 2004-03-30 | |
7 | -- RCS-ID: $Id$ | |
8 | -- Copyright: (c) 2004 Ryan Wilcox | |
9 | -- Licence: wxWindows licence | |
10 | -- | |
11 | -- Press the run button and select the file you need (or, alternatively, save the | |
12 | -- script as an application drag-and-drop the files on top of it). | |
13 | --------------------------------------------------------------------------------- | |
14 | ||
15 | <begin applescript> | |
16 | ||
17 | on run | |
18 | set myFile to choose file | |
19 | open ({myFile}) | |
20 | end run | |
21 | ||
22 | ||
23 | on open (fileList) | |
24 | ||
25 | repeat with each in fileList | |
26 | ||
27 | tell application "Finder" | |
28 | if name of each contains "M5" or name of each contains "M7" or name of each contains "M8" then | |
29 | set creator type of each to "CWIE" | |
30 | set file type of each to "TEXT" | |
31 | ||
32 | log "set" | |
33 | end if | |
34 | ||
35 | end tell | |
36 | end repeat | |
37 | end open | |
38 | ||
39 | </begin applescript> | |
40 |