Your best friend for file transfer.

Preferred Encoding - Contextual Menu (5 posts)
- Started 12 years ago by Randy
- Latest reply 12 years ago from Randy
-
Randy Member
-
Jim Matthews Administrator
Hi Randy,
Thanks for that suggestion, we'll think about that. In the meantime, I think you could use an AppleScript to switch the preference to GB18030, edit the file, and then switch the preference back.
Here is an AppleScript to try. You would paste it into Script Editor, and then save it. If you have a Script menu in your menu bar, you can add the script to that menu by putting it in the Scripts folder inside the Library folder of your home folder. If you don't have a Scripts menu you can Google for instructions on adding it, or just add the script to your Dock and run it that way.
The script:
tell application "Fetch"
set savedEncoding to preferred encoding
set preferred encoding to GB18030set selectedItems to selection
if (count of selectedItems) is 0 then
display dialog "Please select a file to edit using the GB18030 encoding"
else
repeat with aFile in selectedItems
edit aFile
end repeat
end ifset preferred encoding to savedEncoding
end tellThanks,
Jim Matthews
Fetch Softworks -
Randy Member
(Possible to have a scripts icon in the Fetch window?)
-
Jim Matthews Administrator
Not currently, no, but I'll take that as a request for such a feature.
Thanks,
Jim Matthews
Fetch Softworks -
Randy Member
(I request all requests be implemented.) lol...
- Page 1
I work with files that are mostly Latin1 but often GB18030.
It would be quite nice to be able to option click those GB files and be able to choose GB18030 from a menu called 'Open Using Encoding'. (Prefs let you select which to display, just as with BBedit.)
Posted 12 years ago #