![]() |
|
#1
| |||
| |||
| path problems Hello guys and girls, I started scripting in photoshop with javascript a little while ago. I am currently making a script that automatically saves a copy of a psd as a resized TGA file in a user specified location. To get the file path and name I use a file browser box. saveFile = File.openDialog("Select a file", "Bitmaps: *.tga"); Now, to make it easier for the user, I want the selected path to be saved with the psd file, so the next time the user wants to save that file, he doesn't have to fill in the path again. To do this, I would like to save saveFile.absoluteURI (this contains the path as a string) This works fine for short paths without spaces (eg. c:\test\test.tga). But when the user selects a path that does contain spaces (eg. c:\program files\test.tga), the string in saveFile.absoluteURI reads "/c/program%20files/test.tga" and when the path gets a little longer (eg. c:\documents and settings\my name\my documents\test.tga) saveFile.absoluteURI reads "~my%20documents\test.tga" instead of the whole path. Does anyone know how to get around this problem? |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Removing Background | cybersip | Photo Retouching | 24 | 04-14-2010 01:49 PM |
| Color Problems | imann08 | Photo Retouching | 24 | 03-10-2007 07:43 AM |
| Can't Stroke Path | bestremera | Photoshop Help | 2 | 05-20-2006 07:28 AM |
| Skin problems, undefined... | pure | Photo Retouching | 43 | 03-02-2006 03:01 PM |
| Two problems | Mark Adams | Image Help | 23 | 05-22-2005 11:47 AM |