Won't have time to look at your request in detail until Monday, I'm
off in 30 minutes for the weekend
#1.
Maybe something is here, I've never noticed having to click the
button first. Just a sample of a working button on a bar:
[Bar_Clip1:Properties]
FontName = Arial
FontInfo = Weight: 400 Size: 8
Skin = C:\Program Files\PowerPro\skins\Bar_Clip1.txt
Format1 = IconSize: 8 Position: Floating
Format2 = Height: 20 MaxText: 15
Format3 = Flat Back: 255 000 255 Text: 255 255 191 TopMost Tooltips
AllVDesks 3DFrame
Format4 = TextCenter BarSize
[1]
Label = *Info expr (IFELSE(gBarClip1Text15=="","» Clipbrd
#1«",gBarClip1Text15))
Tooltip = »Set in Clipbrd.txt« //{dragdrop} fnames»clipbrd/{L}»
snippets menu.../{R}» clipbrd menu...
Format = text: 253 255 187 Width: 105
LCmd1 = Script
LParam1 = SetString f |
LCmd2 = If (f=="|") do
LCmd3 = messagebox("ok","Button pushed")
LCmd4 = else
; files were dragdropped
LCmd5 = .context(f)
; below normally not used except for balloontips
LCmd6 = ; if (contextlast)
LCmd7 = ; command for above if, last fillename was read...
LCmd8 = ENDIF
MCmd1 = (none)
RCmd1 = [EMAIL PROTECTED]
RCmd2 = DO
RParam2 = ([EMAIL PROTECTED], ?#.Bar_Clip_Menu(1, "rightmouse")#)
Not enough time to test tweaks I've made in above, hopefully, no
errors.
#2. maybe:
Check pproconf + Advanced setup + Other + Drag drop many files runs
each separately.
#3.
The simplest generic template for context.txt I could find (tolerate):
static vFiles
if (arg(1)=="|") do
messagebox("ok","button just clicked", "button just clicked")
QUIT
endif
if (context==0) do
if (vec.exists(vFiles))
vec.destroy(vFiles)
vFiles=vec.create(20,20)
endif
vFiles[context] = _file_
; could use vFiles[context] = arg(1)
context=context+1
if (contextlast)
event.createms(300,1, "."++ scriptname++ "@dowork")
QUIT
@dowork
static vFiles
if (not vec.exists(vFiles))
quit
; I prefer to do below and release the vector as soon as possible
LOCAL fn, fnames= REPLACECHARS(VEC.Makelines(vFiles), ??"?, "")
vFiles= vec.destroy(vFiles)
for (local i=1; i<context +1; i=i+1)
fn= LINE(fnames, i)
if (not fn)
break
;do something with fn
endfor
quit
Ted
--- In [email protected], sgp acs322000 wrote:
>
> I'm cooking one of Ted Wall's 3/2005 recipes on how to use an
> active button both as a menu button and as a drop target. I have
> a couple of problems. Can anyone point me in the right direction?
>
> 1. when the bar is first started, the drop target is inactive.
> You have to click on the button at least once (which displays
> the button's menu) in order for the drop target to become active.
>
> 2. when I drop multiple files on the target, I receive them in a
> single string, each file in doublequotes, but NO spaces between
> the file items, so cmd.exe fails to recognize them as multiple
> arguments.
> [5]
> id = media
> Tooltip = drop»play with VLC/L»wallpaper 1:player
> Icon = C:\Program Files\VideoLAN\VLC\vlc.exe
> LCmd1 = Script
> LParam1 = SetString c |
> LCmd2 = Script
> LParam2 = If (contextlast)
> LCmd3 = [EMAIL PROTECTED](?@"C:\Program
> Files\VideoLAN\VLC\vlc.exe" --intf wx@, c, "bar hideshow
> PicturePlayer")
>
> @DropFiles
> if (arg(2)=="|")do
> ;win.debug("will script to Run MENU", arg(3))
> do( arg(3) )
> else
> ;win.debug("will script to Run FILE", arg(1), arg(2))
> do ( "*dos *hide "++arg(1)++" "++arg(2) )
>
> endif
>
> QUIT
>
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/