home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rexxio46.zip / CREATE next >
Text File  |  1998-09-23  |  2KB  |  44 lines

  1. /*Create MAID Object from file.
  2. This script runs on OS/2 only and will convert a
  3. windows .mde file into an OS/2 MAID Object file.
  4. To use this script create a new MAID object under OS/2.
  5. Then use the system editor to edit the new object and
  6. replace the entire script with this script, save and run.
  7. */
  8. Arg Action
  9.     if DlgBox <> "DLGBOX" then signal value Action
  10.     DlgBox=MaidDlgFrame("Create MAID Object from file",67,50,200,128,Action)
  11. if DlgBox = "0" then exit
  12.     ENTRYLEFT  AUTOSCROLL MARGIN ANYCHARS 15 52 161 15 "ICONFILENAME" "C:\MAID\EXAMPLES\MAID.ICO"
  13.     PUSHBUTTON 15 8 161 15 "BTN2" "Set Icon"
  14.     PUSHBUTTON 14 28 162 20 "BTN1" "~Create OS/2 Object"
  15.     ENTRYLEFT  AUTOSCROLL MARGIN ANYCHARS 13 83 161 15 "FILENAME" "c:\maid\examples\ex04.mde"
  16.     TEXT 14 64 67 15 "TXT2" "Icon File Name"
  17.     TEXT 14 96 67 15 "TXT1" "NT Filename"
  18. exit
  19. MAID_INIT:
  20. /* INIT DIALOG SECTION */
  21. call RxFuncAdd 'rexxioinit' , 'REXXIO' , 'rexxioinit'
  22. call rexxioinit
  23. call RxFuncAdd 'SysLoadFuncs' , 'REXXUTIL' , 'SysLoadFuncs'
  24. call SysLoadFuncs
  25. exit
  26. MAID_BTN2:
  27. /*Single Click - BUTTON - BTN2*/
  28. deskdir=getdesktopdir()
  29. f=cd(deskdir)
  30. NewName=getfilepart(FILENAME)
  31. IconString="MAIDICONFILE="||IconFileName||";"
  32. f=SysCreateObject("MAID",NEWNAME,"<WP_DESKTOP>",IconString,"UPDATE")
  33. exit
  34. MAID_BTN1:
  35. /*Single Click - BUTTON - BTN1*/
  36. deskdir=getdesktopdir()
  37. f=cd(deskdir)
  38. NewName=getfilepart(FILENAME)
  39. f=SysCreateObject("MAID",NEWNAME,"<WP_DESKTOP>","MAIDFORCEBLANK=YES;MAIDTESTOBJ=M&ID","REPLACE")
  40. f=copycontentsfile(FILENAME,NewName);
  41. exit
  42. MAID_SHOWVARIABLES: SHOWVARIABLES
  43. exit
  44.