;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; NPADSET.SCT ; ; ; ; The compiled NPADSET.RUN file created by compiling this script ; ; with the PCT4W Script Tools should be placed on either a button ; ; bar or menu item on the PCT4W File Manager. Highlighting a file ; ; and then selecting the button or menu item will run an instance ; ; of Windows Notepad, change the defaults to those specified in ; ; this script, and print the file. ; ; ; ; K.Jeffrey Carr July 9,1993 CISID 76226,1045 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; NOTE: Before selecting TESTRUN in the Script Tools editor to ; compile this script, change the values for FOOTER, PAGE, and ; the four margins to whatever values you want the script to use. ; NOTE: make sure the command line in the tool bar or menu ; includes the %selection% parameter ; ie c:\cps\data\npadset.run %selection% A$=commandline$(1) Exec "Notepad"+" "+A$ ; the below routine extracts the file name from the command line ; so that the window can be properly identified, ie removes the drive ; and path names. Temp=Length(a$) i=1 label: test$=right$(a$,i) if left$(test$,1)="\" then goto ready endif new$=test$ i=i+1 goto label ready: Attach "NOTEPAD_Notepad - "+new$+"1", 1 Wk_PageSetup = 32 MenuSelect Wk_PageSetup Attach "NOTEPAD_Page Setup", 1 ; FOOTER replace &f to remove, ie EditText Wk_f "" Wk_f = 30 EditText Wk_f "&f" ; PAGE replace Page &p to remove Wk_Pagep = 31 EditText Wk_Pagep "Page &p" ; LEFT MARGIN replace 1.0 with desired value Wk_11 = 32 EditText Wk_11 "1.0" ; RIGHT MARGIN, replace 1.0 with desired value Wk_10 = 33 EditText Wk_10 "1.0" ; TOP MARGIN , replace 1 with desired value Wk_1 = 34 EditText Wk_1 "1" ; BOTTOM MARGIN, replace 1 with desired value Wk_1 = 35 EditText Wk_1 "1" Wk_OK = 1 Button Wk_OK SingleClick ; now to print the file Attach "NOTEPAD_Notepad - "+new$+"1", 1 Wk_Print = 14 MenuSelect Wk_Print