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

Re: [Clip] Launcher clip, Perl, maybe other dos

Expand Messages
  • Alan
    Hi, On the beginner Perl file clip, missed an option to (launch/run a *currently focused* beginner Perl file). So, this clip adds that feature. And the clip
    Message 1 of 1 , Sep 22, 2000
    • 0 Attachment
      Hi,

      On the beginner Perl file clip, missed an option to (launch/run a *currently
      focused* beginner Perl file). So, this clip adds that feature. And the
      clip is an updated version of the former version.

      Note that I tagged on another variable named curdoc onto the already lengthy
      ^!Set line. curdoc's control structure is also added to the clip.

      Note: If you just desire a simple clip which runs a beginner Perl file when
      the Perl file is the currently focused document in NoteTab then see my
      latest post to the "Filename for dos apps" thread has just such a clip.

      Have fun. Regards. Alan. p.s.: Thanks to all who help. It got me this
      far alongtheway

      _______clip begins below this line_______
      H="runPerl_DlxRevised"
      ;Alan Cummings 9-22-2000
      ;Launches and/or focuses console
      ;And, designed to execute Perl console type app file
      ;If desire, may use only the third or file open field
      ;Or, if desire, may use only the fourth CurrDoc field
      ;Alternate method is to copy your file name to the
      ;windows clipboard; then use either of top two fields
      ;so as to set the dir path to the file to be run
      ^!SetWizardTitle ChDir choice fields: Use either 1st *OR* 2nd
      ^!Set %cdbrws%=^?{(T=D)ChDir DirBrowse choice->ChDir to=no_brows};
      %spot%=^?{(H=16)ChDir Pick Folder choice->ChDir
      to==c:\BegPerl\Chap01\|c:\BegPerl\Chap02\|c:\BegPerl\Chap03\|c:\BegPerl\Chap
      04\|c:\exmpl\|c:\exmpl\mystuff\|Skip the ChDir (defaults NTP app dir)^=yes};
      %filopn%=^?{(T=O)FileOpen: If used, supercedes GetClipboard=no_filopn};
      %fil%=^$GetClipboard$.plx; %curdoc%=^?{(H=4)CurrDoc: If used, supercedes
      *ALL* other fields==_no currdoc^=|use currdoc^=^**}
      ^!IfSame "^%curdoc%" "^**" Next Else Skip_4
      ^!IfSame ^$Getext(^**)$ .plx Skip_2 Else Next
      ^!Info [L]^**^%nl% is not a .plx file and will not run under DOS.
      ^!Goto Exit
      ^!IfSame "^%curdoc%" "^**" usecurr
      ^!IfTrue ^%spot% Skip_2
      ^!IfSame "^%cdbrws%" "no_brows\" Next Else Skip_2
      ^!ChDir ^%spot%
      ^!Goto Skip
      ^!ChDir ^%cdbrws%
      :usecurr
      ^!IfAppOpen "C:\WINDOWS\System32\cmd.exe" skip else next
      ^!cmd.exe
      ^!FocusApp "C:\WINDOWS\System32\cmd.exe"
      ^!Delay 3
      ^!IfSame "^%curdoc%" "^**" runcurr
      ^!IfSame "^%filopn%" "no_filopn" Next Else Skip_2
      ^!Keyboard #perl ^%fil%# ENTER
      ^!Goto End
      ^!Keyboard #perl ^%filopn%# ENTER
      ^!Goto End
      :runcurr
      ^!Keyboard #perl ^%curdoc%# ENTER
      ;----<end of clip<<
    Your message has been successfully submitted and would be delivered to recipients shortly.