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

Re: Simple clip starts a Perl file

Expand Messages
  • Craig
    ... I just ... typing ... the type ... the ... maybe it ... would just ... then) ... the command ... if run ... close ... Greetings, Alan - I have
    Message 1 of 2 , Aug 29, 2000
    • 0 Attachment
      --- In ntb-clips@egroups.com, "Alan" <acummings@s...> wrote:
      > Hi,
      > The clip works for me. If anyone can use, here it is.
      >
      > I just began to tinker with Perl for the very first time ever. And
      I just
      > wrote this clip which saves me bunches of (well at least some)
      typing
      > whenever I run a .plx perl file. (the clip is designed to initiate
      the type
      > of a perl file that, after it starts, it requests user input from
      the
      > keyboard) (I dunno Java but if a Java file requests user input,
      maybe it
      > could be altered to initiate a Java file)
      >
      > It's for OS of the Win NT sort of OS at this point. For Win 9x
      would just
      > use path to command.com instead of cmd.exe
      >
      > Until I find if there is a (clip) method to (probably detect and
      then)
      > change directories, the current status of the clip is that After
      the
      command
      > console is opened, while it's open you must choose same source dir
      if run
      > clip again. Otherwise (if need different source dir) must just
      close
      > command console then run clip again.

      <snippage>

      Greetings, Alan -

      I have been using a nearly identical clip on NT 4.0:

      H="Perl Console"
      ^!Set %pl2run%=^?[(T=O;F="Perl Scripts (*.pl)|*.pl")Open file]
      ^!IfAppOpen "D:\WINNT\System32\cmd.exe" skip else next
      ^!cmd.exe
      ^!FocusApp "D:\WINNT\System32\cmd.exe"
      ^!Delay 3
      ^!Keyboard #perl -w ^%pl2run%# ENTER

      When this is executed, the working directory is automagically set to
      the directory where the file is located. If it is a script I'm
      currently editing, the File Open dialogue begins in the correct
      directory.
      A neat unintended "feature" that NoteTab provides is that after
      selecting a file, your are presented with a confirm dialogue. If your
      perl script uses command-line arguments, you can type them in here,
      after the file name.

      Clippin' along,
      Craig
    Your message has been successfully submitted and would be delivered to recipients shortly.