home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / slfinsta.zip / scripts / page4.cmd < prev   
OS/2 REXX Batch file  |  2000-03-26  |  6KB  |  195 lines

  1. /* $Id: page4.cmd,v 1.1 2000/03/27 04:53:13 ktk Exp $ */
  2.  
  3. /* REXX script to create fourth installer dialog page. */
  4.  
  5. /* Some System Defines */
  6. BOXHORZ = 0
  7. BOXVERT = 1
  8. HWND_DESKTOP = 1
  9. HWND_OBJECT = 2
  10. FCF_TITLEBAR =     x2d("1")
  11. FCF_SYSMENU = x2d("2")
  12. FCF_MENU = x2d("4")
  13. FCF_SIZEBORDER = x2d("8")
  14. FCF_MINBUTTON = x2d("10")
  15. FCF_MAXBUTTON = x2d("20")
  16. /*FCF_MINMAX = FCF_MINBUTTON | FCF_MAXBUTTON*/
  17. FCF_VERTSCROLL = x2d("40")
  18. FCF_HORZSCROLL = x2d("80")
  19. FCF_DLGBORDER = x2d("100")
  20. FCF_BORDER = x2d("200")
  21. FCF_SHELLPOSITION = x2d("400")
  22. FCF_TASKLIST = x2d("800")
  23. FCF_NOBYTEALIGN = x2d("1000")
  24. FCF_NOMOVEWITHOWNER = x2d("2000")
  25. FCF_ICON = x2d("4000")
  26. FCF_ACCELTABLE = x2d("8000")
  27. FCF_SYSMODAL = x2d("10000")
  28. FCF_SCREENALIGN = x2d("20000")
  29. FCF_MOUSEALIGN = x2d("40000")
  30. FCF_PALETTE_NORMAL = x2d("80000")
  31. FCF_PALETTE_HELP = x2d("100000")
  32. FCF_PALETTE_POPUPODD = x2d("200000")
  33. FCF_PALETTE_POPUPEVEN = x2d("400000")
  34. FCF_HIDEBUTTON = x2d("1000000")
  35. FCF_HIDEMAX = x2d("1000020")
  36. /*FCF_AUTOICON = x2d("40000000")*/
  37. FCF_STANDARD = x2d("cc3f")
  38. DT_LEFT = x2d("00000000")
  39. DT_QUERYEXTENT = x2d("00000002")
  40. DT_UNDERSCORE = x2d("00000010")
  41. DT_STRIKEOUT = x2d("00000020")
  42. DT_TEXTATTRS = x2d("00000040")
  43. DT_EXTERNALLEADING = x2d("00000080")
  44. DT_CENTER = x2d("00000100")
  45. DT_RIGHT = x2d("00000200")
  46. DT_TOP = x2d("00000000")
  47. DT_VCENTER = x2d("00000400")
  48. DT_BOTTOM = x2d("00000800")
  49. DT_HALFTONE = x2d("00001000")
  50. DT_MNEMONIC = x2d("00002000")
  51. DT_WORDBREAK = x2d("00004000")
  52. DT_ERASERECT = x2d("00008000")
  53. SLS_READONLY = x2d("80")
  54. SLS_RIBBONSTRIP = x2d("100")
  55. CLR_ERROR = -255
  56. CLR_NOINDEX = -254
  57. CLR_FALSE = -5
  58. CLR_TRUE = -4
  59. CLR_DEFAULT = -3
  60. CLR_WHITE = -2
  61. CLR_BLACK = -1
  62. CLR_BACKGROUND = 0
  63. CLR_BLUE = 1
  64. CLR_RED    = 2
  65. CLR_PINK = 3
  66. CLR_GREEN =4
  67. CLR_CYAN = 5
  68. CLR_YELLOW = 6
  69. CLR_NEUTRAL = 7
  70. CLR_DARKGRAY = 8
  71. CLR_DARKBLUE = 9
  72. CLR_DARKRED = 10
  73. CLR_DARKPINK = 11
  74. CLR_DARKGREEN = 12
  75. CLR_DARKCYAN = 13
  76. CLR_BROWN = 14
  77. CLR_PALEGRAY = 15
  78. TRUE = 1
  79. FALSE = 0
  80.  
  81. /*flStyle = FCF_SYSMENU | FCF_TITLEBAR | FCF_SHELLPOSITION | FCF_TASKLIST | FCF_DLGBORDER*/
  82.         
  83. call inst_packages
  84.  
  85. if arg(1) > 0 then
  86.         call dw_window_destroy arg(1)
  87.  
  88. mainwindow = dw_window_new(HWND_DESKTOP, "Installing PMBitchX 1.0c16", 3331)
  89.  
  90. /* This number must corespond to a resource ID in the bound resources */
  91. call dw_window_set_icon mainwindow, 2000
  92.  
  93. bigbox = dw_box_new(BOXVERT, 10)
  94.  
  95. call dw_box_pack_start mainwindow, bigbox, 0, 0, TRUE, 0
  96.  
  97. mainbox = dw_box_new(BOXHORZ, 10)
  98.  
  99. call dw_box_pack_start bigbox, mainbox, 0, 0, TRUE, 0
  100.  
  101. logo = dw_bitmap_new(1001)
  102.  
  103. /* This number must corespond to a resource ID in the bound resources */
  104. call dw_window_set_bitmap logo, 2001
  105.  
  106. call dw_box_pack_start mainbox, logo, 100, 275, FALSE, 5
  107.  
  108. custombox = dw_box_new(BOXVERT, 10)
  109.  
  110. call dw_box_pack_start mainbox, custombox, 0, 0, TRUE, 5
  111.  
  112. stext = dw_text_new("Please wait while installing PMBitchX 1.0c16...", 0)
  113.  
  114. call dw_window_set_style stext, DT_VCENTER, DT_VCENTER
  115.  
  116. call dw_box_pack_start custombox, stext, 300, 50, TRUE, 10
  117.  
  118. /*groupbox = dw_groupbox_new(BOXHORZ, 10)
  119.  
  120. call dw_window_set_text groupbox, "Progress"
  121.  
  122. call dw_box_pack_start custombox, groupbox, 300, 20, TRUE, 10*/
  123.  
  124. slider = dw_slider_new(1010)
  125.  
  126. call dw_window_set_style slider, SLS_READONLY, SLS_READONLY
  127.  
  128. call dw_window_set_style slider, SLS_RIBBONSTRIP, SLS_RIBBONSTRIP
  129.  
  130. call inst_setslider slider
  131.  
  132. /*call dw_box_pack_start groupbox, slider, 300, 30, TRUE, 10*/
  133.  
  134. call dw_box_pack_start custombox, slider, 300, 30, TRUE, 10
  135.  
  136. bleah = dw_text_new("", 0)
  137.  
  138. call dw_box_pack_start custombox, bleah, 300, 100, TRUE, 10
  139.  
  140. buttonbox = dw_box_new(BOXHORZ, 5)
  141.  
  142. call dw_box_pack_start bigbox, buttonbox, 0, 0, TRUE, 0
  143.  
  144. exitbutton = dw_button_new("Exit Installer", 1003)
  145.  
  146. call inst_setbutton 1003, "exit"
  147.  
  148. call dw_box_pack_start buttonbox, exitbutton, 100, 30, TRUE, 0
  149.  
  150. blanktext = dw_text_new("", 0)
  151.  
  152. call dw_box_pack_start buttonbox, blanktext, 150, 30, TRUE, 0
  153.  
  154. backbutton = dw_button_new("<< Back", 1002)
  155.  
  156. call dw_window_disable backbutton
  157.  
  158. call dw_box_pack_start buttonbox, backbutton, 60, 30, TRUE, 0
  159.  
  160. nextbutton = dw_button_new("Next >>", 1001)
  161.  
  162. call dw_window_disable nextbutton
  163.  
  164. call dw_box_pack_start buttonbox, nextbutton, 60, 30, TRUE, 0
  165.  
  166. /* Set some nice fonts and colors */
  167. call dw_window_set_color bigbox, CLR_PALEGRAY, CLR_PALEGRAY
  168. call dw_window_set_color mainbox, CLR_PALEGRAY, CLR_PALEGRAY
  169. call dw_window_set_color custombox, CLR_PALEGRAY, CLR_PALEGRAY
  170. call dw_window_set_color lbbox, CLR_PALEGRAY, CLR_PALEGRAY
  171. call dw_window_set_color buttonbox, CLR_PALEGRAY, CLR_PALEGRAY
  172. call dw_window_set_color directionbox, CLR_PALEGRAY, CLR_PALEGRAY
  173. call dw_window_set_color groupbox, CLR_PALEGRAY, CLR_PALEGRAY
  174. call dw_window_set_color slider, CLR_BLUE, CLR_PALEGRAY
  175. call dw_window_set_font stext, "9.WarpSans"
  176. call dw_window_set_font groupbox, "9.WarpSans"
  177. call dw_window_set_color stext, CLR_BLACK, CLR_PALEGRAY
  178. call dw_window_set_color blanktext, CLR_BLACK, CLR_PALEGRAY
  179. call dw_window_set_color bleah, CLR_BLACK, CLR_PALEGRAY
  180. call dw_window_set_font listbox, "9.WarpSans"
  181. call dw_window_set_font nextbutton, "9.WarpSans"
  182. call dw_window_set_font backbutton, "9.WarpSans"
  183. call dw_window_set_font exitbutton, "9.WarpSans"
  184.  
  185. newx = (dw_screen_width()-500)/2
  186. newy = (dw_screen_height()-400)/2
  187.  
  188. call dw_window_set_pos_size mainwindow, newx, newy, 500, 400
  189.  
  190. call dw_window_show mainwindow
  191.  
  192. call inst_setwindow mainwindow
  193.  
  194. call inst_start "finished.cmd"
  195.