From: matt@... (matt neuburg) Date: 2006-12-18T11:15:12+09:00 Subject: Re: Using ruby in applescript studio Logan Capaldo wrote: > On Mon, Dec 18, 2006 at 09:55:16AM +0900, bluephonic@gmail.com wrote: > > Okay, I've run into a problem. I've added the .rb file to the project > > in XCode and referenced it in the applescript file with this line: > > > > set theArticleText to (do shell script (quoted form of POSIX path of > > (path to resource "getArticle.rb")) & " \"" & theArticleName & "\" \"" > > & wikiLanguage & "\" \"" & wikiProject & "\"" with administrator > > privileges) > > > > But whenever I run the program, it throws an error -- "Permission > > denied" -- even after I enter my password. > > > Just a guess here but either chmod +x getArticle.rb or change the > applescript to say > do shell script "ruby " & (quoted form of POSIX path of (path to > resource "getArticle.rb")) & ... That's right. > Geez AppleScript is verbose. That's right too. Don't get me started. My book contains the full rant. Fortunately, we now have alternate, Ruby-based ways of sending Apple events to AppleScriptable apps, such as rb-appscript: This means that instead of using a mix of AppleScript and Ruby, I just stay in Ruby all the time. :) m. -- matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/ Tiger - http://www.takecontrolbooks.com/tiger-customizing.html AppleScript - http://www.amazon.com/gp/product/0596102119 Read TidBITS! It's free and smart. http://www.tidbits.com