How to convert the output of Applescript which is in object format to text or string format??
Hi All,
I want to convert the output of Applescript which is in object format to string or text format, am running Applescript with Java, I need to display the output of applescript in Eclipse Java Console, since its object format the output is not properly displayed..
Pls suggest.. I used the below code
repeat with i in allContents
if class of i is button then set the end of allStaticText to contents of i
end repeat
Applscript ouptput
{button 1 of window "Player Installer" of application process "Install Player" of application "System Events", button 2 of window "Player Installer" of application process "Install Player" of application "System Events", button 3 of window "Player Installer" of application process "Install Player" of application "System Events", button "Finish" of UI element 1 of scroll area 1 of window "Player Installer" of application process "Install Player" of application "System Events"}
Java output
<NSAppleEventDescriptor: 'obj '{ 'form':'indx', 'want':'butT', 'seld':1, 'from':'obj '{ 'form':'name', 'want':'cwin', 'seld':'utxt'(" Player Installer"), 'from':'obj '{ 'form':'name', 'want':'pcap', 'seld':'utxt'("Install Player"), 'from':'null'() } } }>
Mac OS X (10.7.4)