--- In [email protected], "homipda" <homi...@...> wrote:
> I know that, I Installed today this version, but I want
>especially size of font, small for standard notes and big for
>screensaver notes.
Well, you could use the dialog plugin to create an alternate font, and use a
script to send a message to an open note that will apply the alternate font to
the note. This works because the plugins runs in the same process space as
PowerPro. The alternate font consumes resources but the same one could be
applied to multiple open notes.
Here's an example. You could save the following script to a file named
ChangeNoteFont.powerpro in your scripts folder. Set up a hotkey that runs the
script for target "c=powerpronote" with the command .changenotef...@assignfont
The first time you use it in a session, it would allow you to choose the font,
as well as apply it to the note you are viewing. On subsequent runs it would
apply the same font options to other notes. As long as such notes remains open,
the font choice sticks.
You could have another hotkey or command item to run .changenotef...@makefont.
That would kill the previous alternate font variation and make a new one. The
new one doesn't automatically replace the old one on open notes. Until a
previously applied note is re-messaged, it would use a system font.
I suppose if you have a set of notes you always want to use with the alternate
font you could make a script that both opens the notes and applies the
alternate font to them.
I'm sure it would be possible for you to keep a variety of alternate fonts in a
vector or map, but because they do consume resources (at least until Powerpro
is restarted) it is necessary to keep up with them and reuse them or else
release them when no longer needed.
Regards,
Sheri
ChangeNoteFont.powerpro
======================
Function ReleaseFont()
static alternatefont
if (alternatefont !=="") do
local dialog_status
local res = dialog.clear(alternatefont, "hfont")
alternatefont=""
quit
Function AssignFont()
local dialog_status
static alternatefont
if (alternatefont=="") do
makefont()
else
local hwin=window("firstwindow", "c=powerpronote")
local cwin=win.handlefromindex(hWin, 1)
win.sendmessage(cwin, 0x0030, alternatefont, 1)
endif
quit
Function MakeFont()
local hwin=window("firstwindow", "c=powerpronote")
local cwin=win.handlefromindex(hWin, 1)
static alternatefont
local dialog_status
local fontspec=Dialog.choose_font(dialog.get_value(cwin,"font"))
if (alternatefont !=="") do
local a=messagebox("yesno question", ;;+
"Release previous and save current choice?", ;;+
"Make Alternate Font")
if (a==6)
Releasefont()
endif
static alternatefont=dialog.set_font(cwin, fontspec)
quit