launch propram via trigger

evilperro
2013-08-26
2013-08-26
  • evilperro

    evilperro - 2013-08-26

    I'm trying to open a clipboard manager via trigger, the idea is to have it opened/closed automatically when database is opened/closed.

    In w7 if I open a command prompt and type

    C:\startclipmate.bat

    clipmate is opened succesfully.

    contents of bat is:
    cd "C:\Program Files (x86)\ClipMatePortable\app\ClipMate\"
    clipmate.exe

    If I use this exact same line (C:\startclipmate.bat) in trigger>action> execute command line/url however, cmd prompt flashes by and nothing happens.

    edit: using line cd "C:\Program Files (x86)\ClipMatePortable\app\ClipMate\" & clipmate.exe

    has same result has above.

    cmd://"C:\startclipmate.bat"
    and
    cmd://C:\startclipmate.bat

    gives

    [Window Title]
    KeePass

    [Main Instruction]
    Trigger execution failed

    [Content]
    cmd://"C:\startclipmate.bat"

    Unknown error (0x80041002)

    [OK]

     
    Last edit: evilperro 2013-08-26
  • steelej

    steelej - 2013-08-26

    You are starting a Command window, the batch file runs and then terminates the program you are trying to leave open.

    Have you tried execution the program directly. The path can be obtained using this construct {ENV_PROGRAMFILES_X86} for a file in Programs 86.

    Something like

    {ENV_PROGRAMFILES_X86}\ClipMatePortable\app\ClipMate\clipmate.exe

    should work in the trigger

     
  • evilperro

    evilperro - 2013-08-26

    Thanks a bunch, using your line exactly as you have written it works! However what should I write in the second new trigger in the excute command line/url field for clipmate to close when database is closed?

     
    Last edit: evilperro 2013-08-26
  • steelej

    steelej - 2013-08-26

    From a google search (I have never used the program)

    ClipMate Command Line Parameters

    • STOP - Halts previously-running instance of ClipMate by sending it a kill message. Useful when using external overnight backup programs.
    Must be first and only parameter
    ex: ClipMate.exe STOP

    Try the same command but with STOP in the argument field

     
  • evilperro

    evilperro - 2013-08-26

    Yea, I considered that and it does work when used in a trigger. But there was a question mark concerning what "previously" means - I mean shouldn't it say "halts currently-running"?

    That's why I wanted to use a normal w7 command line function such as taskkill (which didn't work for me when I tried).

    Anyway I will try out the mentioned solution, if any problems arise then I can try other one.

     
  • evilperro

    evilperro - 2013-08-26

    nvm

     
    Last edit: evilperro 2013-08-26
  • steelej

    steelej - 2013-08-26

    you could test whether the program has terminated by using Teak Manager.

    Oops that should be TASK manager of course!

     
    Last edit: steelej 2013-08-26

Log in to post a comment.