--- In [email protected], "qzzyyx" <blackh...@...> wrote:
> 
> --- In [email protected], "Sheri" <sherip99@> wrote:
> >
> > --- In [email protected], "qzzyyx" <BlackHole@> wrote:
> > > 
> > > I don't know how to get (for example)
> > > expr(myplugin.newold("v:\","*.txt","+W")) [newest txtfile in V:\
> > > by write time] into the **command** of a PowerPro button (or to
> > > get PowerPro to execute it as if it were the **command**). Help.
> > 
> > I think you're looking for "do". Try:
> > 
> > do(myplugin.newold("v:\","*.txt","+W"))
> 
> Thanks, Sheri, that works.  Where did you find that one?

I learned it long ago on the forum. It may be one of those things you have to 
know before you can find it in the documentation.

> It does not (and should) appear in "Command entry codes".

Maybe that would be a help. However I think I was trying to launch a file via 
script instead of command list entry when I needed help.

BTW, you could have done your task with existing functionality using a script, 
and run your script in your command entry.

Something like:

local moddate,newestfile
for each line thisfile in file.listfiles(...)
if (file.getdate(thisfile,"m") > moddate) do
moddate=file.getdate(thisfile,"m")
newestfile=thisfile
endif
endfor
do(newestfile)

Regards,
Sheri

Reply via email to