Mark,

This is the script importing Japanese file name of JPEG. It's used AppleScript. I am not good for AppleScript, I believe you can improve it. One problem of this script is when you use it many times, the script has an error. Probably it is an AppleScript bug. I think this script is not only way of importing image of AppleScript. Anyway you can use "do asScript as appleScript" or "shell command" on Runrev. We are hoping that RunRev is improved unicode on version 3.

The script duplicates a temporary English name of Japanese file name of JPEG by AppleScript. Then import JPEG image from the English name image file.

----------------------
  put "set afile to choose file " &cr into asScript
  put "set tFilePath to result "&cr after asScript
  put "set aDesk to (path to desktop) as text" \
         &cr after asScript
  put "tell application "&quote& "Image Events" \
        &quote &cr after asScript
  put "set myImage to open afile" & cr after asScript
  put "save myImage in file (aDesk & "&quote& \
        "tempo.jpg"&quote& ")  as JPEG" &cr after asScript
  put "end tell" &cr after asScript
  put "return tFilePath " after asScript
  do asScript as appleScript
  put the result into tPath
  replace ":" with "/"in tPath
  set the itemDel to "/"
  put item 2 to -2 of  tPath into tFilePath
  put url ("binfile:/" & tFilePath & "/" &"tempo.jpg") \
        into image 1
  if  the result is empty then
    delete file ("/"& tFilePath & "/" &"tempo.jpg")
  else
    answer the result
  end if

-------------------------

Good luck!
--
Kenji Kojima
RGB MusicLab: Pixels into Music
http://www.kenjikojima.com/rgbmusiclab/




On Jan 26, 2008, at 8:04 PM, Mark Smith wrote:

Viktoras, having got the filename, is it possible to actially do anything with the file, ie. open, read, write etc.? I've had no luck with this (and a confirmation from RunRev that Rev can't use unicode filenames in OS X).

Best,

Mark

On 26 Jan 2008, at 20:37, viktoras didziulis wrote:

Hi Mark,

forwarding the original posts on non-english file names by Kenji Kojima (2008-01-16) that describe a possible solution of your problem :-):

put "cd ~/Desktop" &cr& "ls" into tScript
set the unicodeText of fld 1 to uniencode(shell(tScript),utf8)

The first line was shell command got list names of files in working directory. You got UTF8 filenames. Then it's converted to UTF16 and set the test field 1.

Best regards
Viktoras

Mark E. Powell wrote:
Want to give this one last swag before throwing in the towel. If I want to use shell() to point a command line application to the folder below.

C:\říkáme\

How do I do it?

I am currently running 2.8.0. Perhaps something has changed in later versions that improves Rev's ability to preserve diacriticals in file and folder names when using 'the files' and 'the folders'?

Thanks in advance.

Mark

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution




_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution






_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to