Re: Trouble passing params to a program
- "joy8388608" <mycroftj@...> wrote:
>Ditching ^!Shell and invoking this app directly does the trick for me:
> I use the freeware program AM-DeadLink (http://www.aignes.com/deadlink.htm) which detects dead links and duplicates in browser bookmarks and text files.
> I thought it would be a good idea to write a simple clip to check the current (.htm or html) file.
> I could not get it to work and have no idea why. The problem MIGHT be with the program but it may be in my clip so I thought I'd ask.
> I DID get it to work by calling a batch file and also found it only works correctly if I change to the directory of the deadlink.exe program and does not work if I call it using the full path name. The program runs, but it scans my browsers (Opera) bookmarks instead of the current document.
> I'd love to know what's doing on if anyone can figure it out.
> ^!Set %DotExt%=^$GetExt(^$GetFileName(^$GetDocName$)$)$
> ^!Set %DotExt%=^$StrLower("^%DotExt%")$
> ^!If ^%DotExt%=.htm CALICD_IS_HTML
> ^!If ^%DotExt%=.html CALICD_IS_HTML
> ^!Prompt This (current) document must have extension of htm or html
> ^!Goto CALICD_CONT1
> ; This SHOULD work, but it checks all the links in Opera's bookmark file.
> ;^!ChDir "H:\Prog Files 2\AM-DeadLink"
> ;^!Shell deadlink /file="^$GetDocName$" /check /exit
> ^!Shell "H:\Documents and Settings\user\My Documents\Batch\ChkLinks.bat" "^$GetDocName$" /check /exit
> REM ChkLinks.bat
> cd "H:\Prog Files 2\AM-DeadLink"
> deadlink /file=%1 /check /exit
^!IfMatch "(?i).+\.html?" "^$GetDocName$" Skip_2
^!Prompt This clip needs an HTML/HTM doc!
^!"F:ull\Path\deadlink.exe" /file="^$GetDocName$" /check
- I wrote:
>It would make sense to replace "^!IfMatch ..." with:
> ^!IfMatch "(?i).+\.html?" "^$GetDocName$" Skip_2
> ^!Prompt This clip needs an HTML/HTM doc!
> ^!Goto End
> ^!"F:ull\Path\deadlink.exe" /file="^$GetDocName$" /check
^!IfTrue ^$IsHtmlDoc$ Skip_2