[Pharo-project] Weird result with OSProcess and Applescript
1. The following hangs forever. The output is there, but the process never completes PipeableOSProcess waitForCommand: '/usr/bin/osascript -ss -e "tell application \"Safari\" to get source of current tab of window 1"'. 2. The same command in Terminal returns right away. 3. And this works: PipeableOSProcess waitForCommand: '/usr/bin/osascript -ss -e "tell application \"Safari\" to get window 1"'. So #2 would seem to rule out a problem with the command, and #3 with the connection between OSProcess and Applescript. I have no idea where to go from here... sean -- View this message in context: http://forum.world.st/Weird-result-with-OSProcess-and-Applescript-tp4415603p... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
So weird! Even compiling the script into a file and running it that way has the same result: PipeableOSProcess waitForCommand: '/usr/bin/osascript -ss "/path/to/get_source_of_current_safari_tab.scpt"' For now, I made a Ruby one-liner, using rb-appscript, that doesn't hang waitForCommand:, but I'm still curious... -- View this message in context: http://forum.world.st/Weird-result-with-OSProcess-and-Applescript-tp4415603p... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
you're probably one of the few who using OSProcess plugin and in such fashion.. i'd willing to help, but i don't know much about OP implementation. Maybe you will have some response if you post on vm-dev list? On 24 February 2012 21:47, Sean P. DeNigris <sean@clipperadams.com> wrote:
So weird! Even compiling the script into a file and running it that way has the same result:
PipeableOSProcess waitForCommand: '/usr/bin/osascript -ss "/path/to/get_source_of_current_safari_tab.scpt"'
For now, I made a Ruby one-liner, using rb-appscript, that doesn't hang waitForCommand:, but I'm still curious...
-- View this message in context: http://forum.world.st/Weird-result-with-OSProcess-and-Applescript-tp4415603p... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
participants (2)
-
Igor Stasenko -
Sean P. DeNigris