This has been discussed before. Bruce hasn't found a method to get
this info for shortcuts.
You can dragdrop one or more *.LNKs and for some reason only one
*.URL to a button on a PowerPro bar and the actual filename will be
shown in the | variable.
The following works for me from Contextfolder for Explorer using
Pickstring:
;ShortcutFinder.powerpro
;arg(1) is optional
LOCAL d=arg(1)
LOCAL n,i,NoMask,recurse,allfiles
LOCAL NL=ESC(?"\n",?"\")
IF(d=="" && exefilename=="Explorer")DO
LOCAL han=WIN.Handle("active")
FOR(i=3;i<20;i=i+1)
d=WIN.ChildtextbyINDEX(han,i)
IF(_EOF_)DO
d=""
BREAK
ELSEIF(INDEX(d,?":\")==2)
BREAK
ELSE
d=""
ENDIF
ENDFOR
ENDIF
d=IFELSE(d=="",currentdir,d)
FOR(1)
IF(NOT INPUTDIALOG("d=&Directory name for files:"++;;+
",recurse=&Recurse Subdirectories && show ALL Files??"++ ;;+
",allfiles=&Show ALL Files *.* ??", ;;+
"*.LNK & *.URL File Finder"))
QUIT
IF(NOT FILE.Validpath(d))DO
IF(0==MESSAGEBOX("okcancel ERROR", ;;+
"Not a validpath:"++NL++d,"ERROR"))
QUIT
ELSE
d = d++IF(REVINDEX(d,?"\")!=LENGTH(d),?"\")
IF(LENGTH(d)>3)
NoMask=IFELSE(REVINDEX(d,?"\")==LENGTH(d),REMOVE(d,-1),d)
IF(recurse || allfiles)DO
n=FILE.AllFiles(NoMask,"",recurse,100)
ELSE
n=FILE.AllFiles(d++"*.LNK","",recurse,100)
n=n++FILE.AllFiles(d++"*.URL","",recurse,100)
ENDIF
IF(n>10000)DO
IF(1==MESSAGEBOX("okcancel QUESTION", ;;+
n++" files found for:"++NL++d, ;;+
"Continue will take awhile) ??"))
BREAK
ELSEIF(n==0)
IF(0==MESSAGEBOX("okcancel QUESTION", ;;+
"No files found for:"++NL++d,"Try again ??"))
QUIT
ELSE
BREAK
ENDIF
ENDIF
ENDFOR
LOCAL f,CRLF=ESC(?"\r\n",?"\")
IF(recurse || allfiles)DO
f=FILE.ListFiles(NoMask,recurse,100)
ELSE
f=FILE.ListFiles(d++"*.LNK",recurse,100)
f=f++NL++FILE.ListFiles(d++"*.URL",recurse,100)
ENDIF
LOCAL shortlist
d=IF(0==recurse,d)
shortlist=REPLACECHARS(f,d,"")
IF(pproversion>=4105)DO
shortlist=PICKSTRING(shortlist, ;;+
"Pick filename(s) to clipboard copy"++ ;;+
" (OK without selecting=Copy ALL) {total="++n++"}",1)
ELSE
shortlist=PICKSTRING(shortlist, ;;+
"Pick filename to clipboard copy"++ ;;+
" (OK without selecting=Copy ALL) {total="++n++"}")
ENDIF
IF(NOT shortlist)
QUIT
f=REPLACECHARS(d++shortlist,ESC(?"\r",?"\"),CRLF++d)
CLIP.Set(f)
QUIT
Ted
; I don't know why a *.LNK mask has never worked for recursing.
> i need ppro to return the filepath from
> windows explorer context menu.
>
> for quickmacros it helped to set the .lnk
> extension to visible in windows explorer.
>
> but no luck with ppro, even with your reg entry.
>
> cheers
> pi
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/