Re: Fetching result from NSAppleScript
Re: Fetching result from NSAppleScript
- Subject: Re: Fetching result from NSAppleScript
- From: Nirnimesh <email@hidden>
- Date: Fri, 20 Jul 2007 05:07:55 +0530
Again, if you want more specific advice you'll need to say more about
what it is you're working on.
I'm infact working with python already. I want to be able to execute an
applescript like:
activate application "Safari"
tell application "System Events"
tell process "Safari"
-- check a link
get name of UI element "Îñţérñåţîöñåļîžåţîöñ" of group 4 of UI
element 1 of scroll area 1 of group 2 of front window
end tell
end tell
I expect the above script to return: Îñţérñåţîöñåļîžåţîöñ to my python
script.
I couldn't get this to work with "osascript -e" system() call with python. I
hunted around and discovered that osascript and the shell will mess up with
the non-ascii characters above.
Therefore, I thought I could use cocoa's NSAppleScript. I have installed
pyobjc to make objc classes available to my python scripts (assuming I'm
able to get NSAppleScript work as intended).
HTH
has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
http://appscript.sourceforge.net/objc-appscript.html
--
Gravitation is not responsible for people falling in love.
-- Albert Einstein.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden