# RuntimeError: (-1753) OSACompileExecute

**URL:** <https://www.ruby-forum.com/t/runtimeerror-1753-osacompileexecute/98968>\
**Category:** Ruby\
**Created:** [July 19, 2006, 12:52pm UTC](https://www.ruby-forum.com/t/runtimeerror-1753-osacompileexecute/98968 "2006-07-19T12:52:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 19, 2006, 12:52pm UTC](https://www.ruby-forum.com/t/runtimeerror-1753-osacompileexecute/98968/1 "2006-07-19T12:52:10Z")

</div>

very oftently with a vaild and tested AppleScript i get this error :

RuntimeError: (-1753) OSACompileExecute  
method compile\_execute  
in osacomponent.rb at line 32  
method do\_script  
in osacomponent.rb at line 32  
method do\_osascript  
in osacomponent.rb at line 17  
at top level  
in wait\_4\_app\_and\_win.applescript.rb at line 10

(my line 10 is simply : p OSX.do\_osascript(as))

## in fact my ruby script only launch the AppleScript’s one by :

#!/usr/bin/env ruby

require ‘osx/aeosa’  
as=""  
File.open(“wait\_4\_app\_and\_win\_mod.applescript”).each { |l| as \<\< l}

## p OSX.do\_osascript(as)

what could i do in order to get out of this hole ?

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 19, 2006, 2:59pm UTC](https://www.ruby-forum.com/t/runtimeerror-1753-osacompileexecute/98968/2 "2006-07-19T14:59:59Z")

</div>

Le 19 juil. 06 Ã 12:50, Une bÃ©vue a Ã©crit :

> what could i do in order to get out of this hole ?

i found a solution, : rewrite completely the applescript for  
rubyaeosa, it seems the functions have to be defined just after all  
properties and before using them…

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 19, 2006, 11:30pm UTC](https://www.ruby-forum.com/t/runtimeerror-1753-osacompileexecute/98968/3 "2006-07-19T23:30:14Z")

</div>

On Jul 19, 2006, at 6:50 AM, Une bévue wrote:

> at top level  
> File.open(“wait\_4\_app\_and\_win\_mod.applescript”).each { |l| as \<\< l}
> 
> ## p OSX.do\_osascript(as)
> 
> what could i do in order to get out of this hole ?
> 
> –  
> une bévue

Use system(“osascript #{file}”) instead?

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 20, 2006, 8:09am UTC](https://www.ruby-forum.com/t/runtimeerror-1753-osacompileexecute/98968/4 "2006-07-20T08:09:47Z")

</div>

Le 19 juil. 06 Ã 23:29, Logan C. a Ã©crit :

> Use system(“osascript #{file}”) instead?

wawh ! that’s a clever idae, i’ll try it asap ))

never use that way because my applescripts are “method” for ruby (in  
vars out vars).

thanks,

Yvon
