Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 22, 2006, 03:33 AM   #1
semaja2
macrumors 6502a
 
Join Date: Dec 2005
Location: Adelaide
Send a message via MSN to semaja2
Convert Unicode text into a string

Hey guys, how do I convert Unicode text into a string for use with AppleScript, like I set a variable to some Unicode text but how do I convert it back into a string?

I tried looking in the Apple documentation but couldn't find a function that would work for me everytime i use the one in the documentation i get this error:

[Session started at 2006-05-20 13:52:29 +0930.]
2006-05-20 13:52:33.701 MultiAlarm[5483] "Error -1700: Can't make end of every «class defE» into type «class insl»."

Cant make <<data ****0523453154354554H35RE4H35TS4H354354>> into type Unicode text. (-1700)


the terminal reveals this for my prefrence file

starbuck:~ jamesas$ defaults read com.semaja2.MultiAlarm
{
alarmSensitivity = <040b7479 70656473 74726561 6d8103e8 84014084 8484084e 534e756d 62657200 8484074e 5356616c 75650084 84084e53 4f626a65 63740085 84012a84 84016497 0686>;
motionEngine = <040b7479 70656473 74726561 6d8103e8 84014084 8484084e 53537472 696e6701 8484084e 534f626a 65637400 8584012b 09706f77 6572626f 6f6b86>;
}
semaja2 is offline   0 Reply With Quote
Old May 22, 2006, 04:29 AM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
I think defaults understands UniCode. That looks more like encoded data via something like an NSArchiver.
robbieduncan is offline   0 Reply With Quote
Old May 22, 2006, 05:24 AM   #3
semaja2
Thread Starter
macrumors 6502a
 
Join Date: Dec 2005
Location: Adelaide
Send a message via MSN to semaja2
Quote:
Originally Posted by robbieduncan
I think defaults understands UniCode. That looks more like encoded data via something like an NSArchiver.

ahh thats it, all this time and it was a simple option i ticked in bindings, thanks for pointing it out i was ripping my hair out over this
semaja2 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
How do I convert time into a string with AppleScript? Shake 'n' Bake OS X 5 Jan 28, 2011 05:47 PM
converting scanned page into searchable text jelloshotsrule Mac Applications and Mac App Store 5 May 18, 2009 03:22 PM
ascii text from a URL into a string? jerrywickey iPhone/iPad Programming 25 Apr 28, 2009 10:49 PM
Convert a double into a string ricku425 Mac Programming 6 Feb 20, 2008 01:42 PM
convert an array of ints - into a string with semicolon in between. celia Mac Programming 20 Jun 26, 2007 03:41 PM


All times are GMT -5. The time now is 12:18 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC