Loading ...
Sorry, an error occurred while loading the content.

20718Re: Trouble passing params to a program

Expand Messages
  • diodeom
    Jun 1, 2010
    • 0 Attachment
      "joy8388608" <mycroftj@...> wrote:
      >
      > 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.
      >
      > Thanks!
      > Joy
      >
      >
      > ^!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
      >
      > :CALICD_IS_HTML
      > ; 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
      >
      > :CALICD_CONT1
      > ---EXIT---
      >
      > ----------------
      > REM ChkLinks.bat
      > cd "H:\Prog Files 2\AM-DeadLink"
      > deadlink /file=%1 /check /exit
      > ----------------
      >

      Ditching ^!Shell and invoking this app directly does the trick for me:

      ^!IfMatch "(?i).+\.html?" "^$GetDocName$" Skip_2
      ^!Prompt This clip needs an HTML/HTM doc!
      ^!Goto End
      ^!"F:ull\Path\deadlink.exe" /file="^$GetDocName$" /check
    • Show all 4 messages in this topic