gettingstarted
[Top] [All Lists]

Re: How can I pass parameters from RB to an AppleScript for InDesign?

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: How can I pass parameters from RB to an AppleScript for InDesign?
From: David Glass <dglass at graymattercomputing dot com>
Date: Sun, 29 Jan 2006 04:45:08 -0800
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <20060128180008 dot 6340910952AD at lists dot realsoftware dot com> <p0623090bc0016bc9ac42 at [192 dot 168 dot 0 dot 100]>
Do you know that all AppleScripts called from Rb have to have an explicit 'run' handler?

If so, your 'run' handler would have parameters for the items provided by the interface:

on run(inboundWidth, inboundHeight, inboundColor)
......
end run

Then your call to the script looks like this:

myScript(3,5,color*)

* - not sure how you would specify the desired color. Off the top of my head, I would think you could have an AS that grabbed the names of all the swatches and returned them to Rb as a delimited list to use filling a popup menu.

all inbound values are strings if memory serves so you may have to handle conversions to the proper types depending on what ID needs.

On Jan 28, 2006, at 10:49, Joe Cabrera wrote:

I've got a program written in RB that I want to use as an interface to draw various graphical objects (rectangles, text, nothing fancy) in an Adobe InDesign template. So I can write an AppleScript to, say, draw a 2" x 2" red rectangle on my ID template page just fine, but how can I use my RB interface to let the user change those values to maybe a 3" x 5" black rectangle?

--
David Glass - Gray Matter Computing
graymattercomputing.com - corepos.com
559-303-4915

Apple Certified Help Desk Specialist

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>