[scribus] getting x, y coordinates in script

Gregory Pittman gregp_ky at yahoo.com
Fri Aug 19 00:53:12 UTC 2011


On 08/18/2011 02:51 PM, Fred Zimmerman wrote:
> HI,
>
> At the beginning of a script, I want to tell the user to click on a point
> (where he wants the box to begin) so that I can capture the x, y coordinates
> that he indicates.  How can I do that?  I then want the script to continue
> ahead so that I can collect some numeric info via valueDialogs.
>

Hi Fred,

Great question. I like impossible questions.

Strictly speaking, there is no way to do this with the mouse, but 
consider this substitute:

Before running the script, have the user make an arbitrary frame whose 
X-Pos, Y-Pos represents this x,y value, then make sure this frame is 
selected when the script is run. The script can then identify this 
selected object, get its X-Pos, Y-Pos, and use those values. If desired, 
you could meanwhile delete that frame with the script if the frame 
itself is not needed.
After that fire away with your dialogs.

Greg




More information about the scribus mailing list