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

RE: [NTS] Any script language can work with Notetab?

Expand Messages
  • Alan C.
    Hi, ... [ . . ] http://groups.yahoo.com/group/ntb-scripts/message/277 There s one. http://groups.yahoo.com/group/ntb-scripts/messagesearch?query=runscript And,
    Message 1 of 6 , Jul 19, 2004
      >>Could any one show me how to use the RunScript command? Thanks!
      >>Why don't just publish the clip language source, let us fully
      >>understand what it is mean and make it more completely?
      > Jacob
      [ . . ]


      There's one.


      And, there's more. (courtesy of the Search Archive feature).

      ^!Set %ntpscripshort%=^$GetShort("^$GetScriptPath$")$
      ^!Set %myfile%=^**
      ^!Set %myfile%=^$GetShort("^%myfile%")$
      ^!RunScript "^$GetPerlExe$ ^1 ^%myfile%" "^%ntpscripshort%perltidy.pl"
      ; ----<end-clip<

      ^!Set %ntpscripshort%=^$GetShort("^$GetScriptPath$")$
      ^!Set %myfile%=^**
      ^!Set %myfile%=^$GetShort("^%myfile%")$
      ^!RunScript "^$GetPerlExe$ ^1 ^%myfile%" "^%ntpscripshort%tag2para.pl"
      ; ----<end-clip<

      There's two clips, each calls up a different Perl script. Pay particular attention to all of the getshort utilized as well as the double quotes utilized in the runscript lines.

      The perltidy.pl


      I used it to run perltidy on a current Notetab doc that's a Perl script. That's pretty good, eh? -- that is, Tidy up a Perl script using Perl to do so. Like, run Perl (the perl engine) so as to work on a Perl script. (Notetab is the command central or traffic director for that); It worked very nicely. The tag to para, it converts html <p> tags into the text equivalent, substitutes each <p> with a blank line.

      There's very little difference between runperl versus runscript. With Perl language, either of those two Notetab commands can be used but with one exception -- if you need parameter on the commandline then you must use runscript. If you need use of language engine other than Perl (with exception of runawk) then must use runscript.

      Notetab has two help files. Look in them for those two commands.

      My experience be in somewhat like fashion to that of what Grant shared with the exception that I found Notetab did/does it well enough that it (mostly--at least if not always at least worth a try anyways) warrants the use of these io thingys, output capturing, calling up external scripts on current doc, rather than limiting Notetab to the use of an excellent text editor. But, neither do I do what Grant does. Instead, my experience has been limited to calling perl and sometimes a few other external exe's

      Sometimes getoutput and getdosoutput can have inconsistencies. But the majority of the time it works rather than the inconsistency of it works in one situation while doesn't work in another.

      Notetab, however is VERY (repeat again: very) critical when it comes to what I importantly already mentioned which is worth mentioning again. And that is the getshort as well as the proper use of double quotes, ESPECIALLY SO (the double quotes) when it comes to a more complex commandline which I consider the above runscript lines to be just exactly that, towards a more complex commandline rather than a simpler, shorter one.

    Your message has been successfully submitted and would be delivered to recipients shortly.