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

Re: [Clip] Re: Running other programs with command lines

Expand Messages
  • Larry Thomas
    ... The problem with your command line appears to be the missing double quotes ( ). You have: ^!Shell C: Program Files Pretty HTML 3.7 prettyhtml.exe -ftba
    Message 1 of 4 , Jul 10, 2004
    • 0 Attachment
      At 12:35 AM 7/11/04 -0000, you wrote:

      >That works great Larry, but i have no idea why. I appreciate the
      >detailed answers from you guys, but heres the problem. I can see so
      >many possibilities for clips and i could come here everyday for
      >months with numerous questions on how to make and use them, but i
      >would quickly feel like i was imposing. I would like to at least
      >learn how to do (or figure out) the simple stuff myself, and i
      >thought running a command line on the current document whould be
      >about as simple as you can get. Yet, i could have spent many many
      >hours looking through the help docs and would never have figured out
      >how to do it this way. I mean, logic would tell me that
      >^!CommandLine is used to run command lines and also i would have
      >thought that ^$GetDocName$ and $GetDocName$ (or perhaps instead
      >^$GetDocumentPath$) would be used to find and insert the document
      >name. In the help files it states that "^$GetDocName$ returns the
      >active document name, if no index is specified, or the document name
      >at specified index position." Of course we are just supposed to
      >already know what "index position" means, no info on that is
      >anywhere to be found. This is a classic example of how the help
      >files are often useless to those who are not already knowledgeable
      >about programming. Anyway i still have no clue why this doesnt work;
      >^!CommandLine C:\P..Files\folder\prog.exe parameters $GetDocName$

      The problem with your command line appears to be the missing double quotes

      You have:

      ^!Shell "C:\Program Files\Pretty HTML 3.7\prettyhtml.exe" -ftba $GetDocName$

      You should get rid of the first $GetDocName$. It is missing the leading
      circumflex (^) anyway. And then you should place a couple of double quotes
      areound it to handle any spaces that might be included in the pathname.
      Like below:

      ^!Shell "C:\Program Files\Pretty HTML 3.7\prettyhtml.exe" -ftba

      In actual fact in most cases ^!Commandline should work just as well as
      ^!Shell Commandline:

      ^!"C:\Program Files\Pretty HTML 3.7\prettyhtml.exe" -ftba "^$GetDocName$"

      Should work the same a with the ^!Shell command. Eric added this command
      and I don't know what the difference is with the previous way of doing it.
      Most of the time I use the old way and don't use the ^!Shell Command at all
      but sometimes it just does not work for some things and then I try it and
      it works. Maybe Eric or Jody will see this and explain.

      I find that if I want to open Explorer on NoteTab's home folder, I can use:

      ^!C:\WINDOWS\EXPLORER.EXE /e,^$GetAppPath$

      Works perfectly fine and dandy so there. But what if I want to open the
      folder for NoteTab like you do when you are in Explorer and you click on
      the folder icon. I would use:


      And I get a nasty syntax error! So I use:

      ^!Shell "^$GetAppPath$"

      And it works like a charm. Why??? I don't know. And I don't know why I
      need double quotes in the last example but not in the
      ^!C:\WINDOWS\EXPLORER.EXE /e,^$GetAppPath$ example.

      What you have to do is start out slow and play with the commands. Read the
      help and try things to see how they work. Most of the time you are not
      going to break anything and there are things you can do to protect yourself
      while you are trying things out. Make up test clipbooks and create junk
      clips to test how various commands work. Use things such as the ^!Info
      command with variables to test what is happening when you run a command.
      Example: What do you actual get with ^$GetDocName$ ? Well create a junk

      ^!Info ^$GetDocName$

      And run it with different documents in focus, both saved and new unsaved
      and modified and see what you get. That is how I wrote the clip to show
      what ^** and ^## do because I was curious.

      ^!Goto Exit will act as a temporary break in your clip to see what happens
      up to that point when you are writing a large complicated clip. And you
      can highlight the ^!Goto Exit line and drag it up and down through your
      code and drop it in a different place to test the code to that point and
      when you want to run the code without it temporarily, you can comment it out:

      ;^!Goto Exit

      You can also use ^!SetDebug ON/OF 1 or 0 to step though a running clip or
      part of one. There are many many things like this that you can do and just
      play with it and after bit you will begin to see a pattern and remember
      things and pretty soon you will be writing your own useful clips. You can
      also go to NoteTab's Clipbook libraries located at:


      And Jody Adair's website at:


      and download various clipbook libraries to study to see how others wrote
      clips and you can study the clips Eric has provided with the program as
      well. And of coarse, you can always ask for help here if you get stuck on
      anything. There are plenty of people who are ready and willing to help.

      Good Luck.


      lrt@... e¿ê
    Your message has been successfully submitted and would be delivered to recipients shortly.