-
File separator character?
Is it the \ or the / character that separates directories in Windows references?
I've been writing batch files (for use with Proxy) as which seems to work but maybe I'm supposed to use the \ instead (?).
Phyllis
-
Lifetime Friend of Site Staff
If you're writing BAT files use \, the / character is used for specifying options on command lines. Flash will normally accept either one when used in Flash commands like getURL because / is used in URLs so it just does the conversion. However, in third party products (like SWF Studio) you'll probably want to use \ (or "\\" when used in a string literal) when you refer to operating system paths to avoid any possible problems.
-
Okay thanks, I'll change them all on the next CD. Though the slash seems to work for the most part (I didn't find any machines where it didn't work). But I'd rather it be right!
-
What's the file separator for Mac, do you know? I think I read once that it was a colon, but I also heard slash, so dunno. Wondering if this is correct (may be a while before I can do a test & I don't understand most of this script):
Code:
--set the name of the file to open
property fileName : "pdf:1a.pdf"
--get the path to the containing folder
set myPath to (path to me as string)
set AppleScript's text item delimiters to ":"
set the parentFolder to ¬
((text items 1 thru -2 of myPath) & "") as string
set AppleScript's text item delimiters to ""
-- find the flash file
try
set targetFile to alias (the parentFolder & fileName)
on error
--ie if there's no file here by this name, it will quit.
return quit
end try
tell application "Finder"
open file targetFile
end tell
Thanks, Phyllis
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|