Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for defprn.rex

(view source code of defprn.rex as plain text)

  1. /* Check for command line arguments (none required) */
  2. If Arg( 1, "E" ) Then Call Syntax
  3.  
  4. /* Initialize RexxIO's GetDefaultPrinter() function */
  5. Call RxFuncAdd "GetDefaultPrinter", "REXXIO", "GetDefaultPrinter"
  6.  
  7. /* Retrieve printer name and port from GetDefaultPrinter() function */
  8. Parse Value GetDefaultPrinter() With defprn",".","defport":"
  9.  
  10. /* Display the result */
  11. Say
  12. Say "Default printer is "||defprn||" on "||defport
  13.  
  14. /* Normal program termination */
  15. Exit 0
  16.  
  17.  
  18. Syntax:
  19. 	Say
  20. 	Say "DefPrn.rex,  Version 1.01 for Windows"
  21. 	Say "Display default printer name and port"
  22. 	Say
  23. 	Say "Usage:  <REXX>  DEFPRN.REX"
  24. 	Say
  25. 	Say 'Where:  "<REXX>" is your Rexx interpreter, like REGINA.EXE'
  26. 	Say "                 or REXX.EXE, whichever is installed"
  27. 	Say
  28. 	Say "This script uses LesTec Pty Ltd.'s RexxIO library"
  29. 	Say "http://www.lestec.com.au/"
  30. 	Say
  31. 	Say "Written by Rob van der Woude"
  32. 	Say "http://www.robvanderwoude.com"
  33. 	Exit 1
  34. Return
  35.  

page last modified: 2024-04-16; loaded in 0.0055 seconds