--- In [email protected], "dleidinger" <dleidin...@...> wrote:
>
> 
> 
> Hi Sheri,
> 
> thanks for your script - works perfect. 
> 
> I adjusted to my needs for interactive usage:
> 
> Best regards Detlef
> 
> 
> 
> function SET_FONT(f_font)
> local l_hwin = win.handlefrompoint(xmouse,ymouse)
> if(not l_hwin)
>    quit
> local l_font = f_font
> if(not l_font)
>    l_font = dialog.choose_font()
> if(not l_font)
>    quit
> dialog.set_font(l_hwin,l_font)
>

Just be aware that this way you haven't provided yourself a way to reuse or 
destroy the font resource. That doesn't happen automatically (except for fonts 
applied to dialogs made with the dialog plugin). The downside is, each time you 
use your script more resources are lost. If you ran it over and over, 
eventually you'd have to restart Powerpro.

Regards,
Sheri

Reply via email to