Hi.
--- In [email protected], Cüneyt <[EMAIL PROTECTED]> wrote:
> I've also suspected that PP might not be waiting for file.copy to 
> finish, and the bar gets shown before the file operation, so I've 
done a 
> "wait sleep 10000". Nothing changes.

No chance. I suppose Bruce has a check there, if a file of a given 
path has already been loaded.

> I'm clueless.

I give the captured file a unique name now (timestamp), load it with 
SetBackground (or write it to a skin-file and load that) and then 
delete it. Works fine so far.
Actually this is not so bad, when the captured image is deleted 
right away. No cleaning up needed :-)

Here's a little script using IM, that takes the image from the 
clipboard, resizes it, places a dropshadow behind it, fills it with 
a pattern for pseudo-transparency and fills the rest of the image 
with transparent-color #FF00FF:

win.keys("%{printscreen}")
local capFile = "cap" ++ date ++ time ++ ".bmp"
file.runwait(5000, ?"C:\Programme\ImageMagick\convert.exe", ;;+
?$clipboard: -resize 194x144 ;;+
( +clone -fill black -colorize 100% ;;+
-tile pattern:gray50 -draw "color 0,0 replace" ;;+
-fill #FF00FF -opaque white ;;+
-repage +6+6 ) ;;+
+swap -background none -mosaic ;;+
-size 200x150 xc:#FF00FF +swap -gravity center -composite +matte ;;+
"$ ++ capFile ++ ?$"$, "", "hide")

Maybe a bit too complicated but I'm no IM-expert...
Image-path can then be placed in skin-file:

local fh = file.open("skins/cap.txt", "w")
fh.writeline("*skin")
fh.writeline(?$*bar shape "$ ++ capFile ++ ?$"$)
fh.close

Then be used for the bar:
...
cl.AddProperties("bar", "Skin = cap.txt")
...

And then the image can be deleted:
file.deleteNoRecycle(capFile)

It might be nicer to put another bar as a shadow behind the image, 
if I think about it, though...

Mockey






Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to