[proFit-list] pro Fit and Applescript…doesn't like '/' in file names
proFit Support
profit at quansoft.com
Fri Nov 18 23:21:23 CST 2011
Dear Dave
In the present case, I do not really know if the problem resides in Apple Script or in pro Fit. However, using a "/" in a file name is generally not recommended, see any of the following:
http://www.jmu.edu/computing/mac/filenamesOSX.shtml
http://reviews.cnet.com/8301-13727_7-10342944-263.html
http://documentation.apple.com/en/finalcutpro/usermanual/index.html#chapter=3%26section=4%26tasks=true
http://www.google.ch/search?q=macos+slash+in+filename
Best regards
Kurt Sutter
QuantumSoft
On 19. Nov 2011, at 0:41, Dave Sopchak wrote:
> Hi all,
>
> I found out the hard way that pro Fit will give an error if you're trying to save a file while running from an Applescript and the file name or path has a '/' character in it. Bug or feature?
>
> The app itself can save files with a '/' character in the name, but I noticed on text file imports, while the data window's name has a '/' character in it, when you go to save, the '/' is converted to a '-'.
>
> Here's some example code and a workaround…
>
>
> Cheers,
> Dave
>
>
> set bar to (theFile as text) & ", pro fit data"
>
> set foo to replace_chars(bar, "/", "-")
>
> tell application "pro Fit 6.2.4"
> activate
> data import options mode custom headerLines 2 delimiter "*\\w" terminator "\\R" title delimiter "\\w" with copyInfo and titles
> open theFile as data window
>
> save window 1 in foo
> end tell
>
>
> on replace_chars(this_text, search_string, replacement_string)
> set AppleScript's text item delimiters to the search_string
> set the item_list to every text item of this_text
> set AppleScript's text item delimiters to the replacement_string
> set this_text to the item_list as string
> set AppleScript's text item delimiters to ""
> return this_text
> end replace_chars
>
>
> _______________________________________________
> proFit-list mailing list
> proFit-list at quantum-soft.com
> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com
More information about the proFit-list
mailing list