Advertisement
Guest User

PWEditor Buggy Beta

a guest
Aug 6th, 2013
537
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 93.86 KB | None | 0 0
  1. ; PWE - Picture Window Editor v1.0 by: 3nter
  2. ;
  3. ;
  4. ;
  5. ; Below this line this line is the Main dialog
  6. dialog pwe_eventeditor {
  7. title "Window Event Editor"
  8. size -1 -1 360 234
  9. option dbu
  10. box "Window event(s) code", 1, 2 14 356 202
  11. edit "", 2, 4 22 352 190, multi return autohs autovs hsbar vsbar
  12. button "Save Changes", 3, 260 220 47 12
  13. button "Close", 4, 310 220 47 12
  14. combo 5, 50 2 152 50, size drop
  15. combo 6, 246 2 110 50, size drop
  16. text "Normal mirc scripting applies in this editor.", 7, 4 220 103 8
  17. text "Object Browser:", 8, 8 4 41 8
  18. text "Window Events:", 9, 204 4 41 8
  19. }
  20. dialog pwe_txtobject {
  21. title "Choose One"
  22. size -1 -1 102 48
  23. option dbu
  24. button "Dynamic Text", 1, 54 20 45 26
  25. button "Static Text", 2, 2 20 45 26
  26. text "Select the type of text object that you want to create.", 3, 2 2 95 14
  27. }
  28. dialog pwe_proman {
  29. title "Manager your projects"
  30. size -1 -1 166 120
  31. option dbu
  32. list 1, 5 20 106 96, size vsbar
  33. button "Delete", 3, 115 48 43 12
  34. box "", 4, 2 2 162 118
  35. button "New project", 5, 116 8 43 12
  36. button "Open selected", 2, 116 25 43 12
  37. edit "", 6, 6 8 90 10, read autohs
  38. button "...", 7, 98 8 13 10, flat
  39. }
  40. dialog PWEditor {
  41. title "PWE - Picture Window Editor v1.0"
  42. size -1 -1 136 226
  43. option dbu
  44. edit "", 33, 2 215 127 10, read autohs
  45. link "?", 34, 130 216 4 8
  46. tab "Properties", 18, 2 109 130 103
  47. text "Caption:", 31, 11 127 23 8, tab 18
  48. edit "", 32, 35 125 92 10, tab 18 autohs
  49. box "Selected Item", 26, 69 170 59 36, tab 18
  50. box "X-Y", 6, 69 139 59 29, tab 18
  51. box "W-H", 5, 8 138 59 30, tab 18
  52. box "Options", 42, 8 170 59 36, tab 18
  53. text "y", 16, 110 158 5 8, tab 18
  54. edit "", 17, 100 147 24 10, tab 18 read center
  55. edit "", 10, 74 147 24 10, tab 18 read center
  56. text "x", 15, 85 158 5 8, tab 18
  57. text "Width", 20, 16 158 17 8, tab 18
  58. edit "", 11, 39 147 24 10, tab 18 read center
  59. text "Hight", 21, 44 158 15 8, tab 18
  60. check "Disable", 43, 11 179 28 10, tab 18
  61. check "Flat", 45, 44 179 20 10, tab 18
  62. check "Hide", 44, 11 192 24 10, tab 18
  63. text "Name:", 30, 72 180 17 8, tab 18
  64. edit "", 27, 93 179 32 10, tab 18 read autohs
  65. edit "", 29, 106 192 18 10, tab 18 read
  66. check "Lock ID", 28, 72 192 28 10, tab 18
  67. edit "", 9, 12 147 24 10, tab 18 read center
  68. tab "Modify", 2
  69. box "W-H", 3, 6 126 59 30, tab 2
  70. edit "", 4, 37 133 24 10, tab 2 center
  71. text "Hight", 22, 42 144 15 8, tab 2
  72. text "Width", 19, 13 144 17 8, tab 2
  73. edit "", 12, 9 133 24 10, tab 2 center
  74. box "X-Y", 23, 6 158 59 31, tab 2
  75. edit "", 25, 10 167 24 10, tab 2 center
  76. edit "", 35, 37 167 24 10, tab 2 center
  77. text "y", 37, 47 178 5 8, tab 2
  78. text "x", 36, 19 179 5 8, tab 2
  79. box "Object Edges", 51, 84 126 44 30, tab 2
  80. radio "Rounded", 56, 88 134 36 10, tab 2
  81. radio "Square", 57, 88 144 36 10, tab 2
  82. button "Apply Changes", 38, 86 198 43 12, tab 2
  83. combo 52, 6 35 99 18, size edit drop
  84. box "Layer", 53, 2 27 132 22
  85. button "+", 54, 110 37 9 8
  86. button "-", 55, 120 37 9 8
  87. box "Color Swatches", 46, 19 2 96 22
  88. icon 47, 89 10 14 8, " $+ %pweditor.scriptdir $+ images\colorswatch-white.bmp", 0, border
  89. text "FG", 49, 72 11 9 8
  90. icon 48, 45 10 14 8, " $+ %pweditor.scriptdir $+ images\colorswatch-black.bmp", 0, border
  91. text "BG", 50, 28 11 9 8
  92. box "Object Browser", 58, 2 49 132 56
  93. list 59, 6 58 84 44, size
  94. button "Remove", 60, 96 87 31 12
  95. box "Show Objects", 39, 92 54 40 30
  96. check "Layer Only", 40, 94 63 36 8
  97. check "All", 41, 94 74 26 8
  98. menu "File", 80
  99. item "Project Manager", 81, 80
  100. item break, 88, 80
  101. item "Save", 83, 80
  102. item "Save As", 89, 80
  103. item break, 84, 80
  104. item "Export project to .mrc file", 85, 80
  105. item break, 86, 80
  106. item "Exit", 87, 80
  107. menu "View", 7
  108. item "Toolbar", 8, 7
  109. item break, 13, 7
  110. item "ScreenShot *.bmp", 14, 7
  111. menu "Window Event Editor", 24
  112. item "Show", 1, 24
  113. }
  114. ; When Creating a new picture window this Dialog will appear
  115. dialog PWE_newfile {
  116. title "New PWE Window"
  117. size -1 -1 144 84
  118. option dbu
  119. text "Window Name:", 25, 14 9 37 8
  120. text "Size:", 27, 16 25 13 8
  121. edit "100", 28, 39 23 16 10, limit 3
  122. edit "100", 29, 64 23 16 10, limit 3
  123. edit "500", 30, 90 23 16 10, limit 3
  124. edit "400", 31, 114 23 16 10, limit 3
  125. edit "Untitled", 26, 52 7 78 10
  126. text "X", 1, 34 25 5 8
  127. text "Y", 2, 59 25 5 8
  128. text "W", 3, 84 25 5 8
  129. text "H", 4, 109 25 5 8
  130. button "Create New Project", 5, 16 66 59 12
  131. button "Cancel", 6, 80 66 49 12, cancel
  132. box "", 22, 4 35 136 24
  133. icon 66, 111 41 15 15, " $+ [ %pweditor.scriptdir $+ [ images\colorswatch-black.bmp" ] $+ ]
  134. icon 70, 44 41 15 15, " $+ %pweditor.scriptdir $+ images\colorswatch-darkblue.bmp"
  135. text "Background", 71, 11 45 29 8
  136. text "Foreground", 72, 77 45 29 8
  137. }
  138. ;These 2 dialog's are the Color Swatchs
  139. dialog FG-color_swatches {
  140. title "Select a Foreground Color"
  141. size -1 -1 144 123
  142. option dbu
  143. box "Color Swatches", 17, 4 3 136 42
  144. icon 1, 9 11 11 11, "images\colorswatch-black.bmp", 0, noborder
  145. icon 2, 25 11 11 11, "images\colorswatch-darkblue.bmp", 0, noborder
  146. icon 3, 41 11 11 11, "images\colorswatch-green.bmp", 0, noborder
  147. icon 4, 57 11 11 11, "images\colorswatch-red.bmp", 0, noborder
  148. icon 5, 73 11 11 11, "images\colorswatch-darkred.bmp", 0, noborder
  149. icon 6, 89 11 11 11, "images\colorswatch-purple.bmp", 0, noborder
  150. icon 7, 105 11 11 11, "images\colorswatch-orange.bmp", 0, noborder
  151. icon 8, 121 11 11 11, "images\colorswatch-yellow.bmp", 0, noborder
  152. icon 9, 9 27 11 11, "images\colorswatch-limegreen.bmp", 0, noborder
  153. icon 10, 25 27 11 11, "images\colorswatch-teal.bmp", 0, noborder
  154. icon 11, 41 27 11 11, "images\colorswatch-lightblue.bmp", 0, noborder
  155. icon 12, 57 27 11 11, "images\colorswatch-blue.bmp", 0, noborder
  156. icon 14, 89 27 11 11, "images\colorswatch-grey.bmp", 0, noborder
  157. icon 15, 105 27 11 11, "images\colorswatch-lightgrey.bmp", 0, noborder
  158. icon 13, 73 27 11 11, "images\colorswatch-pink.bmp", 0, noborder
  159. icon 16, 121 27 11 11, "images\colorswatch-white.bmp", 0, border
  160. scroll "", 18, 34 68 66 8, horizontal bottom
  161. text "Red", 19, 13 69 12 8
  162. text "Green", 20, 13 80 15 8
  163. text "Blue", 21, 13 90 11 8
  164. scroll "", 23, 33 90 67 8, horizontal bottom
  165. scroll "", 24, 34 79 66 8, horizontal bottom
  166. edit "", 25, 107 69 21 9, autohs
  167. edit "", 26, 107 79 21 9, autohs
  168. edit "", 27, 107 89 21 9, autohs
  169. box "RGB Color Picker", 28, 4 48 136 71
  170. check "Enable RGB color picker", 29, 14 55 70 9
  171. button "Apply", 30, 53 102 37 12
  172. }
  173. dialog BG-color_swatches {
  174. title "Select a Background Color"
  175. size -1 -1 144 123
  176. option dbu
  177. box "Color Swatches", 17, 4 3 136 42
  178. icon 1, 9 11 9 9, "images\colorswatch-black.bmp", 0, noborder
  179. icon 2, 25 11 9 9, "images\colorswatch-darkblue.bmp", 0, noborder
  180. icon 3, 41 11 9 9, "images\colorswatch-green.bmp", 0, noborder
  181. icon 4, 57 11 9 9, "images\colorswatch-red.bmp", 0, noborder
  182. icon 5, 73 11 9 9, "images\colorswatch-darkred.bmp", 0, noborder
  183. icon 6, 89 11 9 9, "images\colorswatch-purple.bmp", 0, noborder
  184. icon 7, 105 11 9 9, "images\colorswatch-orange.bmp", 0, noborder
  185. icon 8, 121 11 9 9, "images\colorswatch-yellow.bmp", 0, noborder
  186. icon 9, 9 27 9 9, "images\colorswatch-limegreen.bmp", 0, noborder
  187. icon 10, 25 27 9 9, "images\colorswatch-teal.bmp", 0, noborder
  188. icon 11, 41 27 9 9, "images\colorswatch-lightblue.bmp", 0, noborder
  189. icon 12, 57 27 9 9, "images\colorswatch-blue.bmp, 0, noborder
  190. icon 14, 89 27 9 9, "images\colorswatch-grey.bmp", 0, noborder
  191. icon 15, 105 27 9 9, "images\colorswatch-lightgrey.bmp", 0, noborder
  192. icon 13, 73 27 9 9, "images\colorswatch-pink.bmp", 0, noborder
  193. icon 16, 121 27 9 9, "images\colorswatch-white.bmp", 0, border
  194. scroll "", 18, 34 68 66 8, horizontal bottom
  195. text "Red", 19, 13 69 12 8
  196. text "Green", 20, 13 80 15 8
  197. text "Blue", 21, 13 90 11 8
  198. scroll "", 23, 33 90 67 8, horizontal bottom
  199. scroll "", 24, 34 79 66 8, horizontal bottom
  200. edit "", 25, 107 69 21 9, autohs
  201. edit "", 26, 107 79 21 9, autohs
  202. edit "", 27, 107 89 21 9, autohs
  203. box "RGB Color Picker", 28, 4 48 136 71
  204. check "Enable RGB color picker", 29, 14 56 70 9
  205. button "Apply", 30, 53 102 37 12
  206. }
  207. ;This is where the Code starts Do not change and information past
  208. ;this line unless you have been given permission by Reg. Finley
  209. menu status,channel {
  210. PWEditor-\=-
  211. .Open:/dialog -mav PWEditor PWEditor
  212. }
  213. ;--------------------------------------------
  214. ;When the mouse move these are its proerties
  215. ;============================================
  216. menu @PWEditor {
  217. mouse: { /did -i pweditor 10 1 $mouse.x | /did -i pweditor 17 1 $mouse.y
  218. ;/echo -s $inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pweditor.scriptdir $+ Documents\ $+ %pweditor.tempwindowname $+ -pw.ini,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pweditor.scriptdir $+ Documents\ $+ %pweditor.tempwindowname $+ -pw.ini,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pweditor.scriptdir $+ Documents\ $+ %pweditor.tempwindowname $+ -pw.ini,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pweditor.scriptdir $+ Documents\ $+ %pweditor.tempwindowname $+ -pw.ini,%pwe.winlines),8,32) $+ )
  219.  
  220. ;if ($inrect($mouse.x,$mouse.y,0,0, $+ %Pweditor.width $+ , $+ %Pweditor.length $+ ) == $true) {
  221. ; /echo -s in rectangle
  222. ; /did -i pweditor 10 1 $mouse.x
  223. ; /did -i pweditor 17 1 $mouse.y
  224. ;}
  225. }
  226. }
  227. ;--------------------------------------------------------------------
  228. ;When the user Selects a object to inset this Menu draws the
  229. ;selcected Item.
  230. ;====================================================================
  231. #notask on
  232. ...
  233. menu @PWEditor {
  234. sclick: {
  235. /set %pwe.winlines 0
  236. :loop
  237. while (%pwe.winlines < $lines( $+ %pwe.openfile $+ )) {
  238. if ($read( $+ %pwe.openfile $+ ,%pwe.winlines) != #This window was Created in PWEditor v1.0 ) { inc %pwe.winlines | goto loop }
  239. elseif ($read( $+ %pwe.openfile $+ ,%pwe.winlines) == #This window was Created in PWEditor v1.0) { goto next2 }
  240. else { goto next2 }
  241. :next2
  242. inc %pwe.winlines
  243. if ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Open) {
  244. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  245. else { goto next2 }
  246. }
  247. elseif ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Fill) {
  248. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  249. else { goto next2 }
  250. }
  251. else {
  252. if (Button isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) {
  253. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32) $+ ) == $true) {
  254. ;/drawrect @PWEditor 14 2 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32) $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  255. ;/drawrect @PWEditor 14 2 $calc($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) - 5) $calc($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) - 5) 6 6
  256. ;/drawrect @PWEditor 14 2 $calc($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) + $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)) $calc($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) - 5) 6 6
  257. ;/drawrect @PWEditor 14 2 $calc($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) - 5) $calc($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) + 20) 6 6
  258. ;/drawrect @PWEditor 14 2 $calc($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) + $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)) $calc($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) + 20) 6 6
  259. ;/enable #buttonresize
  260. goto done
  261. }
  262. }
  263. if (Image isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  264. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),2,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),6,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  265. goto done
  266. }
  267. }
  268. if (StaticText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  269. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  270. goto done
  271. }
  272. }
  273. if (DynamicText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  274. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  275. goto done
  276. }
  277. }
  278. if (TextBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  279. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  280. goto done
  281. }
  282. }
  283. if (GroupBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  284. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  285. goto done
  286. }
  287. }
  288. if (CheckBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  289. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  290. goto done
  291. }
  292. }
  293. if (Link isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  294. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  295. goto done
  296. }
  297. }
  298. :done
  299. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  300. else { goto next2 }
  301. }
  302.  
  303. }
  304. }
  305.  
  306. }
  307.  
  308. ;--------------------------------------------------------------------
  309. ;When the Use Clicks anywhere inside the picture window
  310. ;This menu the proporties of the object that the user select
  311. ;in the picture window.
  312. ;====================================================================
  313. menu @PWEditor {
  314. sclick: {
  315. /set %PWEditor.xstartloc $did(Pweditor,10)
  316. /set %PWEditor.ystartloc $did(Pweditor,17)
  317. /set %pwe.winlines 0
  318. :loop
  319. /did -i pweditor 33 1 Gathering %pweditor.insertobject information please wait...
  320. while (%pwe.winlines < $lines( $+ %pwe.openfile $+ )) {
  321. if ($read( $+ %pwe.openfile $+ ,%pwe.winlines) != #This window was Created in PWEditor v1.0 ) { inc %pwe.winlines | goto loop }
  322. elseif ($read( $+ %pwe.openfile $+ ,%pwe.winlines) == #This window was Created in PWEditor v1.0) { goto next2 }
  323. else { goto next2 }
  324. :next2
  325. inc %pwe.winlines
  326. if ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Open) {
  327. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  328. else { goto next2 }
  329. }
  330. elseif ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Fill) {
  331. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  332. else { goto next2 }
  333. }
  334. else {
  335. ;/echo -s $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)
  336. /set %pwe.backgroundstring -BG
  337. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Button isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  338. ;Button $+ %pwe.winlines $+ -BG
  339. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32) $+ ) == $true) {
  340. /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  341. /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  342. /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  343. /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  344. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  345. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  346. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  347. /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),9-,32),32)
  348. goto done
  349. }
  350. }
  351. if (Image isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  352. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),2,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),6,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  353. /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58))
  354. /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9-,32)
  355. /did -i PWEditor 9 1 $gettok($read( $+ %pweditor.scriptd
  356. /did -i PWEditor 12 1 $gettok($read( $+ %pweditor.sir $+ Documents\ $+ %pweditor.tempwindowname $+ -pw.ini,%pwe.winlines),7,32)
  357. /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  358. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  359. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  360. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  361. goto done
  362. }
  363. }
  364. if (StaticText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  365. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  366. /did -i PWEditor 27 1 $remove $+ $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58))
  367. /did -i PWEditor 32 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),11-,32),$chr(58),-Text)
  368. /did -r PWEditor 9
  369. /did -r PWEditor 11
  370. /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  371. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  372. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  373. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  374. goto done
  375. }
  376. }
  377. if (DynamicText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  378. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  379. /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58))
  380. /did -i PWEditor 32 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),12-,32),$chr(58),-Text)
  381. /did -r PWEditor 9
  382. /did -r PWEditor 11
  383. /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  384. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  385. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),11,32)
  386. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),12,32)
  387. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  388. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  389. goto done
  390. }
  391. }
  392. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (TextBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  393.  
  394. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  395. /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  396. /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  397. /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  398. /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  399. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  400. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  401. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  402. ;/did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),8-,32),32)
  403.  
  404. /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),8-,32),32)
  405. goto done
  406. }
  407. }
  408. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (GroupBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  409. ; /echo -s found gather box
  410. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32) $+ ) == $true) {
  411. /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  412. /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  413. /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  414. /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  415. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  416. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  417. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  418. /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),9-,32),32)
  419.  
  420. goto done
  421. }
  422. }
  423. if (CheckBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  424. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  425. /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),BG)
  426. /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  427. /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  428. /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  429. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  430. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  431. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  432. /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),9-,32),32)
  433. goto done
  434. }
  435. }
  436. if (Link isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  437. if ($inrect($mouse.x,$mouse.y, $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) $+ , $+ $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) $+ ) == $true) {
  438. /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),BG)
  439. /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  440. /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  441. /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  442. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  443. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  444. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  445. /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),9-,32),32)
  446. goto done
  447. }
  448. }
  449. :done
  450. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { /did -o pweditor 33 1 Done Gathering %pweditor.insertobject information. | halt }
  451. else { goto next2 }
  452. }
  453. }
  454. }
  455. }
  456.  
  457. ...
  458. #notask end
  459. alias refreshtoolbar {
  460. /clear -u @toolbar
  461. /window -apk0 +l @ToolBar 0 0 89 349
  462. /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ "
  463. }
  464.  
  465. ; if ($did == 58) { /set %pweditor.insertobject Image | /insertobject }
  466. ; if ($did == 59) { /set %pweditor.insertobject Button | /insertobject }
  467. ; if ($did == 60) { /set %pweditor.insertobject Text | /insertobject }
  468. ; if ($did == 7) { /set %pweditor.insertobject Selection | /insertobject }
  469. ; if ($did == 8) { /set %pweditor.insertobject Erase | /insertobject }
  470. ; if ($did == 39) { /set %pweditor.insertobject List Box | /insertobject }
  471. ; if ($did == 22) { /set %pweditor.insertobject Check Box | /insertobject }
  472. ; if ($did == 23) { /set %pweditor.insertobject Drop Menu | /insertobject }
  473. ; if ($did == 24) { /set %pweditor.insertobject Link | /insertobject }
  474. ; if ($did == 41) { /set %pweditor.insertobject Box | /insertobject }
  475. menu @Toolbar {
  476. sclick: {
  477. if ($inrect($mouse.x,$mouse.y,0,5,30,30) == $true) { /drawrect -d @ToolBar 4 1 5 5 34 34 | /set %pweditor.insertobject Button | /insertobject }
  478. else {
  479. if ($inrect($mouse.x,$mouse.y,0,45,30,30) == $true) { /drawrect -d @ToolBar 4 1 5 44 34 34 | /set %pweditor.insertobject TextBox | /insertobject }
  480. else {
  481. if ($inrect($mouse.x,$mouse.y,0,85,30,30) == $true) { /drawrect -d @ToolBar 4 1 5 83 34 34 | /set %pweditor.insertobject GroupBox | /insertobject }
  482. else {
  483. if ($inrect($mouse.x,$mouse.y,0,120,30,30) == $true) { /drawrect -d @ToolBar 4 1 5 120 34 34 | /set %pweditor.insertobject CheckBox | /insertobject }
  484. else {
  485. if ($inrect($mouse.x,$mouse.y,0,160,30,30) == $true) { /drawrect -d @ToolBar 4 1 5 160 34 34 | /set %pweditor.insertobject Image | /insertobject }
  486. else {
  487. if ($inrect($mouse.x,$mouse.y,0,197,30,30) == $true) { /drawrect -d @ToolBar 4 1 5 197 34 34 | halt }
  488. else {
  489. if ($inrect($mouse.x,$mouse.y,42,5,30,30) == $true) { /drawrect -d @ToolBar 4 1 42 5 34 34 | halt }
  490. else {
  491. if ($inrect($mouse.x,$mouse.y,42,45,30,30) == $true) { /drawrect -d @ToolBar 4 1 42 45 34 34 | /set %pweditor.insertobject Text | /insertobject }
  492. else {
  493. if ($inrect($mouse.x,$mouse.y,42,85,30,30) == $true) { /drawrect -d @ToolBar 4 1 42 85 34 34 | halt }
  494. else {
  495. if ($inrect($mouse.x,$mouse.y,42,120,30,30) == $true) { /drawrect -d @ToolBar 4 1 42 120 34 34 | halt }
  496. else {
  497. if ($inrect($mouse.x,$mouse.y,42,160,30,30) == $true) { /drawrect -d @ToolBar 4 1 42 160 34 34 | /set %pweditor.insertobject Link | /insertobject }
  498. else {
  499. if ($inrect($mouse.x,$mouse.y,42,197,30,30) == $true) { /drawrect -d @ToolBar 4 1 42 197 34 34 | halt }
  500.  
  501. }
  502. }
  503. }
  504. }
  505. }
  506. }
  507. }
  508. }
  509. }
  510. }
  511. }
  512. }
  513.  
  514. mouse: {
  515. if ($inrect($mouse.x,$mouse.y,0,0,89,349) == $true) {
  516. if ($inrect($mouse.x,$mouse.y,0,5,30,30) == $true) { /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ " | /drawrect -ecd @ToolBar 1 1 5 5 34 34 | halt }
  517. else {
  518. if ($inrect($mouse.x,$mouse.y,0,45,30,30) == $true) { /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ " | /drawrect -ecd @ToolBar 1 1 5 44 34 34 | halt }
  519. else {
  520. if ($inrect($mouse.x,$mouse.y,0,85,30,30) == $true) { /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ " | /drawrect -ecd @ToolBar 1 1 5 83 34 34 | halt }
  521. else {
  522. if ($inrect($mouse.x,$mouse.y,0,120,30,30) == $true) { /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ " | /drawrect -ecd @ToolBar 1 1 5 120 34 34 | halt }
  523. else {
  524. if ($inrect($mouse.x,$mouse.y,0,160,30,30) == $true) { /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ " | /drawrect -ecd @ToolBar 1 1 5 160 34 34 | halt }
  525. else {
  526. if ($inrect($mouse.x,$mouse.y,0,197,30,30) == $true) { /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ " | /drawrect -ecd @ToolBar 1 1 5 197 34 34 | halt }
  527. else {
  528. if ($inrect($mouse.x,$mouse.y,42,5,30,30) == $true) { /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ " | /drawrect -ecd @ToolBar 1 1 42 5 34 34 | halt }
  529. else {
  530. if ($inrect($mouse.x,$mouse.y,42,45,30,30) == $true) { /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ " | /drawrect -ecd @ToolBar 1 1 42 45 34 34 | halt }
  531. else {
  532. if ($inrect($mouse.x,$mouse.y,42,85,30,30) == $true) { /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ " | /drawrect -ecd @ToolBar 1 1 42 85 34 34 | halt }
  533. else {
  534. if ($inrect($mouse.x,$mouse.y,42,120,30,30) == $true) { /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ " | /drawrect -ecd @ToolBar 1 1 42 120 34 34 | halt }
  535. else {
  536. if ($inrect($mouse.x,$mouse.y,42,160,30,30) == $true) { /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ " | /drawrect -ecd @ToolBar 1 1 42 160 34 34 | halt }
  537. else {
  538. if ($inrect($mouse.x,$mouse.y,42,197,30,30) == $true) { /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ " | /drawrect -ecd @ToolBar 1 1 42 197 34 34 | halt }
  539.  
  540. }
  541. }
  542. }
  543. }
  544. }
  545. }
  546. }
  547. }
  548. }
  549.  
  550. }
  551. }
  552. }
  553. }
  554. }
  555.  
  556.  
  557.  
  558. ;--------------------------------------------------------------------
  559. ;When the user Selects a object and wants to resize a button this
  560. ;menu will be activated.
  561. ;====================================================================
  562. #buttonresize off
  563. ...
  564. menu @PWEditor {
  565. sclick: {
  566. if ($inrect($mouse.x,$mouse.y, $+ $calc($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32) - 5) $+ , $+ $calc($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32) - 5) $+ ,6,6) == $true) {
  567. /echo -s working
  568. }
  569. }
  570. }
  571. ...
  572. #buttonresize end
  573. ;--------------------------------------------------------------------
  574. ;When the user chooses to insert a IMAGE this menu will be activated
  575. ;====================================================================
  576. #insertimage off
  577. ...
  578. menu @PWEditor {
  579. sclick: {
  580. /set %pweditor.imagelocation $sfile(" $+ $+ %pweditor.scriptdir $+ $+ ",Locate the image you wish to insert.,Select)
  581. if ($exists(" $+ %pweditor.imagelocation $+ ") != $false) { goto next1 }
  582. else { /did -i pweditor 33 1 The file you are trying to load dose not exist. | /.disable #insertimage | halt }
  583. :next1
  584. if ($gettok(%pweditor.imagelocation, $+ $numtok( $+ %pweditor.imagelocation $+ ,46) $+ ,46) == bmp) { goto next2 }
  585. elseif ($gettok(%pweditor.imagelocation, $+ $numtok( $+ %pweditor.imagelocation $+ ,46) $+ ,46) == jpg) { goto next2 }
  586. else { /did -i pweditor 33 1 The file you are trying to load is not bmp or jpg format. *.bmp *.jpg ONLY. | /.disable #insertimage | halt }
  587. :next2
  588. /set %PWEditor.ximagloc $mouse.x
  589. /set %PWEditor.yimagloc $mouse.y
  590. if ($inrect( $+ %PWEditor.ximagloc $+ , $+ %PWEditor.yimagloc $+ ,0,0, $+ %Pweditor.width $+ , $+ %Pweditor.length $+ ) == $true) {
  591. /set %PWEditor.imagwidth $pic(%pweditor.imagelocation).width
  592. /set %PWEditor.imagheight $pic(%pweditor.imagelocation).height
  593. /did -i pweditor 17 1 %PWEditor.ximagloc
  594. /did -i pweditor 10 1 %PWEditor.yimagloc
  595. /did -i pweditor 9 1 %PWEditor.imagwidth
  596. /did -i pweditor 11 1 %PWEditor.imagheight
  597. }
  598. /countobjects
  599. inc %pwe.totalimage
  600. /write " $+ %pwe.openfile $+ $+ " Image $+ %pwe.totalimage $+ : drawpic -hs @PWEditor %PWEditor.ximagloc %PWEditor.yimagloc %PWEditor.imagwidth %PWEditor.imagheight " $+ %pweditor.imagelocation $+ "
  601. /did -i pweditor 33 1 Image Inserted successfully...
  602. /unset %PWEditor.ximagloc
  603. /unset %PWEditor.yimagloc
  604. /unset %pweditor.imagelocation
  605. /unset %PWEditor.imagwidth
  606. /unset %PWEditor.imagheight
  607. /createproject
  608. /.disable #insertimage
  609. }
  610. }
  611. ...
  612. #insertimage end
  613. ;--------------------------------------------------------------------
  614. ;When the user chooses to insert a Link this menu will be activated
  615. ;====================================================================
  616. #insertlink off
  617. ...
  618. menu @PWEditor {
  619. sclick: {
  620. /set %PWEditor.xtxtloc $mouse.x
  621. /set %PWEditor.ytxtloc $mouse.y
  622. if (%pwe.temptext == $chr(32)) { /did -i pweditor 33 1 Unable to insert text. | /.disable #inserttext | halt }
  623. else { /set %pwe.temptext $$?="Enter the text you wish to insert here." }
  624. /set %pweditor.tempurl $$?="Enter the url for this link."
  625. /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
  626. /set %PWEditor.linkwidth $calc(10 * %pwe.txtnum + 5)
  627. /set %PWEditor.linkheight 21
  628. /set %PWEditor.Line2y $calc(%PWEditor.ytxtloc + 16)
  629. /countobjects
  630. inc %pwe.totallink
  631. ;%PWEditor.linkwidth + %pwe.blanktokens
  632. /set %pwe.widthx $calc(%PWEditor.xtxtloc + %PWEditor.linkwidth)
  633. ;/echo -s $calc(%PWEditor.xtxtloc + %PWEditor.linkwidth)
  634. ;/echo -s %PWEditor.xtxtloc %PWEditor.linkwidth
  635. /set %pwe.widthy $calc(%PWEditor.ytxtloc + 16 \ 4.5)
  636. ;/echo -s %pwe.widthx %pwe.widthy
  637. /write " $+ %pwe.openfile $+ $+ " Link $+ %pwe.totallink $+ -BG : drawrect -f @PWEditor %BGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.linkwidth %PWEditor.linkheight
  638. /write " $+ %pwe.openfile $+ $+ " Link $+ %pwe.totallink $+ -Text: drawtext -hb @PWEditor %FGsel.color %BGsel.color %PWEditor.xtxtloc %PWEditor.ytxtloc %pwe.temptext
  639. /write " $+ %pwe.openfile $+ $+ " Link $+ %pwe.totallink $+ -Line: drawline -i @PWEditor %FGsel.color 2 %PWEditor.xtxtloc %PWEditor.Line2y %pwe.widthx %pwe.widthy
  640. ;/echo -s drawline -i @PWEditor %FGsel.color 2 %PWEditor.xtxtloc %PWEditor.Line2y %PWEditor.widthx %PWEditor.widthy
  641. /write " $+ %pwe.openfile $+ $+ " Link $+ %pwe.totallink $+ -URL: %pweditor.tempurl
  642. /did -i pweditor 33 1 Link Inserted successfully...
  643. /unset %PWEditor.xtxtloc
  644. /unset %PWEditor.ytxtloc
  645. /unset %pweditor.temptext
  646. /.disable #insertlink
  647. /createproject
  648. /unset %PWEditor.xtxtloc
  649. /unset %PWEditor.ytxtloc
  650. }
  651. }
  652. ...
  653. #insertlink end
  654. ;--------------------------------------------------------------------
  655. ;When the user chooses to insert a TEXT this menu will be activated
  656. ;====================================================================
  657. #inserttext off
  658. ...
  659. menu @PWEditor {
  660.  
  661. sclick: {
  662. /set %PWEditor.xtxtloc $mouse.x
  663. /set %PWEditor.ytxtloc $mouse.y
  664. ;/set %PWEditor.xtxtloc $did(Pweditor,10)
  665. ;/set %PWEditor.ytxtloc $did(Pweditor,17)
  666. if (%pweditor.temptext == $chr(32)) { /did -i pweditor 33 1 Unable to insert text. | /.disable #inserttext | halt }
  667. else { /set %pweditor.temptext $$?="Enter the text you wish to insert here." }
  668. /countobjects
  669. /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
  670. inc %pwe.totalstattext
  671. /write " $+ %pwe.openfile $+ $+ " StaticText $+ %pwe.totalstattext $+ -Text: drawtext -hbc @PWEditor %FGsel.color %BGsel.color %PWEditor.xtxtloc %PWEditor.ytxtloc $calc(%pwe.txtnum * 21) 21 %pweditor.temptext
  672. /did -i pweditor 33 1 Text Inserted successfully...
  673.  
  674.  
  675. /createproject
  676. /.disable #inserttext
  677. /unset %PWEditor.xtxtloc
  678. /unset %PWEditor.ytxtloc
  679. /unset %pweditor.temptext
  680. ;/unset %PWEditor.xtxtloc
  681. ;/unset %PWEditor.ytxtloc
  682.  
  683. }
  684. }
  685. ...
  686. #inserttext end
  687. ;--------------------------------------------------------------------
  688. ;When the user chooses to insert a DynamicTEXT this menu will be activated
  689. ;====================================================================
  690. #insertdyntext off
  691. ...
  692. menu @PWEditor {
  693. sclick: {
  694. /set %PWEditor.xtxtloc $mouse.x
  695. /set %PWEditor.ytxtloc $mouse.y
  696. ;/set %PWEditor.xtxtloc $did(Pweditor,10)
  697. ;/set %PWEditor.ytxtloc $did(Pweditor,17)
  698. if (%pweditor.temptext == $chr(32)) { /did -i pweditor 33 1 Unable to insert text. | /.disable #inserttext | halt }
  699. else { /set %pweditor.temptext $$?="Enter the text you wish to insert here." }
  700. /countobjects
  701. /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
  702. inc %pwe.totaldyntext
  703. /write " $+ %pwe.openfile $+ $+ " DynamicText $+ %pwe.totaldyntext $+ -Text: drawtext -hbo @PWEditor %FGsel.color %BGsel.color %PWEditor.xtxtloc %PWEditor.ytxtloc $calc(%pwe.txtnum * 21) 21 %pweditor.temptext
  704. /did -i pweditor 33 1 Dynamic text inserted successfully...
  705.  
  706.  
  707. /createproject
  708. /.disable #insertdyntext
  709. /unset %PWEditor.xtxtloc
  710. /unset %PWEditor.ytxtloc
  711. /unset %pweditor.temptext
  712. ;/unset %PWEditor.xtxtloc
  713. ;/unset %PWEditor.ytxtloc
  714. }
  715. }
  716.  
  717. ...
  718. #insertdyntext end
  719. ;--------------------------------------------------------------------
  720. ;When the user chooses to insert a BUTTON this menu will be activated
  721. ;====================================================================
  722. #insertbutton off
  723. ...
  724. menu @PWEditor {
  725. sclick: {
  726. /set %PWEditor.xstartloc $mouse.x
  727. /set %PWEditor.ystartloc $mouse.y
  728. /set %pwe.temptxt $$?="Enter Caption for this button."
  729. /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
  730.  
  731. /set %PWEditor.butwidth $calc(9 * %pwe.txtnum + 5)
  732. /set %PWEditor.butheight 21
  733. /countobjects
  734. inc %pwe.totalbuttons
  735. /write " $+ %pwe.openfile $+ $+ " Button $+ %pwe.totalbuttons $+ -Shadow: drawrect -fd @PWEditor 14 1 $calc(%PWEditor.xstartloc + 2) $calc(%PWEditor.ystartloc + 2) %PWEditor.butwidth %PWEditor.butheight
  736. /write " $+ %pwe.openfile $+ $+ " Button $+ %pwe.totalbuttons $+ -BG: drawrect -fd @PWEditor 15 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.butwidth %PWEditor.butheight
  737. /write " $+ %pwe.openfile $+ $+ " Button $+ %pwe.totalbuttons $+ -Overlay: drawrect -d @PWEditor %FGsel.color %BGsel.color %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.butwidth %PWEditor.butheight
  738. /set %PWEditor.textlocx $calc(%PWEditor.xstartloc + 6)
  739. /set %PWEditor.textlocy $calc(%PWEditor.ystartloc + 3)
  740. /set %PWEditor.Line2y $calc(%PWEditor.ystartloc + %PWEditor.butheight - 3)
  741. /set %PWEditor.Line1y $calc(%PWEditor.ystartloc + 1)
  742. /write " $+ %pwe.openfile $+ $+ " Button $+ %pwe.totalbuttons $+ -Text: drawtext -hb @PWEditor %FGsel.color 15 %PWEditor.textlocx %PWEditor.textlocy %pwe.temptxt
  743. /write " $+ %pwe.openfile $+ $+ " Button $+ %pwe.totalbuttons $+ -Top: drawreplace @PWEditor 15 0 %PWEditor.xstartloc %PWEditor.Line1y %PWEditor.butwidth 2
  744. /write " $+ %pwe.openfile $+ $+ " Button $+ %pwe.totalbuttons $+ -Bottom: drawreplace @PWEditor 15 14 %PWEditor.xstartloc %PWEditor.Line2y %PWEditor.butwidth 2
  745. ;%PWEditor.butwidth 2
  746. /did -i pweditor 33 1 Button successfully inserted...
  747. /unset %PWEditor.butwidth
  748. /unset %PWEditor.butheight
  749. /unset %PWEditor.xstartloc
  750. /unset %PWEditor.ystartloc
  751. /.disable #insertbutton
  752. /createproject
  753.  
  754. }
  755. }
  756.  
  757. ...
  758. #insertbutton end
  759. ;--------------------------------------------------------------------
  760. ;When the user chooses to insert a TextBox this menu will be activated
  761. ;====================================================================
  762. #inserttextbox off
  763. ...
  764. menu @PWEditor {
  765. sclick: {
  766. /set %PWEditor.xstartloc $mouse.x
  767. /set %PWEditor.ystartloc $mouse.y
  768. /set %pwe.temptxt $$?="Enter starting text for this textbox."
  769. /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
  770. /set %PWEditor.butwidth $calc(9 * %pwe.txtnum + 5)
  771. /set %PWEditor.butheight 21
  772. /countobjects
  773. inc %pwe.totaltxtbox
  774. /write " $+ %pwe.openfile $+ $+ " TextBox $+ %pwe.totaltxtbox $+ -Shadow: drawrect -fd @PWEditor 14 1 $calc(%PWEditor.xstartloc + 2) $calc(%PWEditor.ystartloc + 2) %PWEditor.butwidth %PWEditor.butheight
  775. /write " $+ %pwe.openfile $+ $+ " TextBox $+ %pwe.totaltxtbox $+ -BG: drawrect -fd @PWEditor %BGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.butwidth %PWEditor.butheight
  776. /write " $+ %pwe.openfile $+ $+ " TextBox $+ %pwe.totaltxtbox $+ -Overlay: drawrect -d @PWEditor %FGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.butwidth %PWEditor.butheight
  777. /set %PWEditor.textlocx $calc(%PWEditor.xstartloc + 6)
  778. /set %PWEditor.textlocy $calc(%PWEditor.ystartloc + 3)
  779. /set %PWEditor.Line2y $calc(%PWEditor.ystartloc + %PWEditor.butheight - 2)
  780. /set %PWEditor.Line1y $calc(%PWEditor.ystartloc + 2)
  781. /write " $+ %pwe.openfile $+ $+ " Textbox $+ %pwe.totaltxtbox $+ -Text: drawtext -hb @PWEditor %FGsel.color %BGsel.color %PWEditor.textlocx %PWEditor.textlocy %pwe.temptxt
  782. /write " $+ %pwe.openfile $+ $+ " Textbox $+ %pwe.totaltxtbox $+ -Top: drawreplace @PWEditor 15 0 %PWEditor.xstartloc %PWEditor.Line1y %PWEditor.butwidth 1
  783. /write " $+ %pwe.openfile $+ $+ " Textbox $+ %pwe.totaltxtbox $+ -Bottom: drawreplace @PWEditor 15 14 %PWEditor.xstartloc %PWEditor.Line2y %PWEditor.butwidth 2
  784. ;%PWEditor.butwidth 2
  785. /did -i pweditor 33 1 TextBox successfully inserted...
  786. /unset %PWEditor.butwidth
  787. /unset %PWEditor.butheight
  788. /unset %PWEditor.xstartloc
  789. /unset %PWEditor.ystartloc
  790. /.disable #inserttextbox
  791. /createproject
  792. }
  793. }
  794. ...
  795. #inserttextbox end
  796. ;--------------------------------------------------------------------
  797. ;When the user chooses to insert a GroupBox this menu will be activated
  798. ;====================================================================
  799. #insertgroupbox off
  800. ...
  801. menu @PWEditor {
  802. sclick: {
  803. /set %PWEditor.xstartloc $mouse.x
  804. /set %PWEditor.ystartloc $mouse.y
  805. /set %pwe.temptxt $$?="Enter caption for this groupbox."
  806. /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
  807. /set %PWEditor.boxwidth $calc(9 * %pwe.txtnum + 15)
  808. /set %PWEditor.boxhight 60
  809. /countobjects
  810. inc %pwe.totalgroupbox
  811. /write " $+ %pwe.openfile $+ $+ " GroupBox $+ %pwe.totalgroupbox $+ -Shadow: drawrect -fd @PWEditor 14 1 $calc(%PWEditor.xstartloc + 2) $calc(%PWEditor.ystartloc + 2) %PWEditor.boxwidth %PWEditor.boxhight
  812. /write " $+ %pwe.openfile $+ $+ " GroupBox $+ %pwe.totalgroupbox $+ -BG: drawrect -fd @PWEditor %BGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.boxwidth %PWEditor.boxhight
  813. /write " $+ %pwe.openfile $+ $+ " GroupBox $+ %pwe.totalgroupbox $+ -Overlay: drawrect -d @PWEditor %FGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.boxwidth %PWEditor.boxhight
  814. /set %PWEditor.textlocx $calc(%PWEditor.xstartloc + 6)
  815. /set %PWEditor.textlocy $calc(%PWEditor.ystartloc - 8)
  816. /set %PWEditor.Line2y $calc(%PWEditor.ystartloc + %PWEditor.boxhight - 2)
  817. /set %PWEditor.Line1y $calc(%PWEditor.ystartloc + 2)
  818. /write " $+ %pwe.openfile $+ $+ " Groupbox $+ %pwe.totalgroupbox $+ -Text: drawtext -hb @PWEditor %FGsel.color %BGsel.color %PWEditor.textlocx %PWEditor.textlocy %pwe.temptxt
  819. /write " $+ %pwe.openfile $+ $+ " Groupbox $+ %pwe.totalgroupbox $+ -Top: drawreplace @PWEditor 15 0 %PWEditor.xstartloc %PWEditor.Line1y %PWEditor.boxwidth 1
  820. /write " $+ %pwe.openfile $+ $+ " Groupbox $+ %pwe.totalgroupbox $+ -Bottom: drawreplace @PWEditor 15 14 %PWEditor.xstartloc %PWEditor.Line2y %PWEditor.boxwidth 2
  821. ;%PWEditor.butwidth 2
  822. /did -i pweditor 33 1 GroupBox successfully inserted...
  823. /unset %PWEditor.boxwidth
  824. /unset %PWEditor.boxhight
  825. /unset %PWEditor.xstartloc
  826. /unset %PWEditor.ystartloc
  827. /.disable #insertgroupbox
  828. /createproject
  829. }
  830. }
  831. ...
  832. #insertgroupbox end
  833. ;--------------------------------------------------------------------
  834. ;When the user chooses to insert a CheckBox this menu will be activated
  835. ;====================================================================
  836. #insertcheckbox on
  837. ...
  838. menu @PWEditor {
  839. sclick: {
  840. /set %PWEditor.xstartloc $mouse.x
  841. /set %PWEditor.ystartloc $mouse.y
  842. /set %pwe.temptxt $$?="Enter starting value for this check box. Eg. " $+ $chr(34) $+"1" $+ $chr(34) $+"
  843. /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
  844. /set %PWEditor.checkwidth 15
  845. /set %PWEditor.checkheight 15
  846. /countobjects
  847. inc %pwe.totalcheckbox
  848. /write " $+ %pwe.openfile $+ $+ " CheckBox $+ %pwe.totalcheckbox $+ -Shadow: drawrect -f @PWEditor 14 1 $calc(%PWEditor.xstartloc + 2) $calc(%PWEditor.ystartloc + 2) %PWEditor.checkwidth %PWEditor.checkheight
  849. /write " $+ %pwe.openfile $+ $+ " CheckBox $+ %pwe.totalcheckbox $+ -BG: drawrect -f @PWEditor %BGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.checkwidth %PWEditor.checkheight
  850. /write " $+ %pwe.openfile $+ $+ " CheckBox $+ %pwe.totalcheckbox $+ -Overlay: drawrect @PWEditor %FGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.checkwidth %PWEditor.checkheight
  851. /set %pwe.innerwidth $calc(%PWEditor.checkwidth - 3)
  852. /set %pwe.innerheight $calc(%PWEditor.checkheight - 3)
  853. /set %pwe.innerx $calc(%PWEditor.xstartloc + 2)
  854. /set %pwe.innery $calc(%PWEditor.ystartloc + 2)
  855. /write " $+ %pwe.openfile $+ $+ " CheckBox $+ %pwe.totalcheckbox $+ -Overlay: drawrect @PWEditor 15 1 %pwe.innerx %pwe.innery %pwe.innerwidth %pwe.innerheight
  856. /set %PWEditor.checklocx $calc(%PWEditor.xstartloc + 6)
  857. /set %PWEditor.checklocy $calc(%PWEditor.ystartloc + 3)
  858. /set %PWEditor.Line2y $calc(%PWEditor.ystartloc + %PWEditor.checkheight - 2)
  859. /set %PWEditor.Line1y $calc(%PWEditor.ystartloc + 2)
  860. ;/write " $+ %pwe.openfile $+ $+ " Checkbox $+ %pwe.totalcheckbox $+ -Text: drawtext -hb @PWEditor %FGsel.color %BGsel.color %PWEditor.checklocx %PWEditor.checklocy %pwe.temptxt
  861. /write " $+ %pwe.openfile $+ $+ " Check $+ %pwe.totalcheckbox $+ -Top: drawreplace @PWEditor 15 0 %PWEditor.xstartloc %PWEditor.Line1y %PWEditor.checkwidth 1
  862. /write " $+ %pwe.openfile $+ $+ " Check $+ %pwe.totalcheckbox $+ -Bottom: drawreplace @PWEditor 15 15 %PWEditor.xstartloc %PWEditor.Line2y %PWEditor.checkwidth 2
  863. ;%PWEditor.checkwidth 2
  864. /did -i pweditor 33 1 CheckBox successfully inserted...
  865. /unset %PWEditor.checkwidth
  866. /unset %PWEditor.checkhight
  867. /unset %PWEditor.xstartloc
  868. /unset %PWEditor.ystartloc
  869. /.disable #insertcheckbox
  870. /createproject
  871. }
  872. }
  873. ...
  874. #insertcheckbox end
  875. ;--------------------------------------------------------------------
  876. ;When the user chooses to insert a CheckBox this menu will be activated
  877. ;====================================================================
  878. #insertradio off
  879. ...
  880. menu @PWEditor {
  881. sclick: {
  882. /set %PWEditor.xstartloc $mouse.x
  883. /set %PWEditor.ystartloc $mouse.y
  884. /set %pwe.temptxt $$?="Enter starting value for this check box. Eg. " $+ $chr(34) $+"1" $+ $chr(34) $+"
  885. /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
  886. /set %PWEditor.checkwidth 15
  887. /set %PWEditor.checkheight 15
  888. /countobjects
  889. inc %pwe.totalcheckbox
  890. /write " $+ %pwe.openfile $+ $+ " RadioBox $+ %pwe.totalcheckbox $+ -Shadow: drawrect -fd @PWEditor 14 1 $calc(%PWEditor.xstartloc + 2) $calc(%PWEditor.ystartloc + 2) %PWEditor.checkwidth %PWEditor.checkheight
  891. /write " $+ %pwe.openfile $+ $+ " Radiobox $+ %pwe.totalcheckbox $+ -BG: drawrect -fd @PWEditor %BGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.checkwidth %PWEditor.checkheight
  892. /write " $+ %pwe.openfile $+ $+ " RadioBox $+ %pwe.totalcheckbox $+ -Overlay: drawrect -d @PWEditor %FGsel.color 2 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.checkwidth %PWEditor.checkheight
  893. /set %pwe.innerwidth $calc(%PWEditor.checkwidth - 2)
  894. /set %pwe.innerheight $calc(%PWEditor.checkheight - 2)
  895. /set %pwe.innerx $calc(%PWEditor.xstartloc + 2)
  896. /set %pwe.innery $calc(%PWEditor.ystartloc + 2)
  897. /write " $+ %pwe.openfile $+ $+ " RadioBox $+ %pwe.totalcheckbox $+ -Overlay: drawrect -d @PWEditor 15 2 %pwe.innerx %pwe.innery %pwe.innerwidth %pwe.innerheight
  898. /set %PWEditor.checklocx $calc(%PWEditor.xstartloc + 6)
  899. /set %PWEditor.checklocy $calc(%PWEditor.ystartloc + 3)
  900. /set %PWEditor.Line2y $calc(%PWEditor.ystartloc + %PWEditor.checkheight - 2)
  901. /set %PWEditor.Line1y $calc(%PWEditor.ystartloc + 2)
  902. ;/write " $+ %pwe.openfile $+ $+ " Radiobox $+ %pwe.totalcheckbox $+ -Text: drawtext -hb @PWEditor %FGsel.color %BGsel.color %PWEditor.checklocx %PWEditor.checklocy %pwe.temptxt
  903. /write " $+ %pwe.openfile $+ $+ " Radio $+ %pwe.totalcheckbox $+ -Top: drawreplace @PWEditor 15 0 %PWEditor.xstartloc %PWEditor.Line1y %PWEditor.checkwidth 1
  904. /write " $+ %pwe.openfile $+ $+ " Radio $+ %pwe.totalcheckbox $+ -Bottom: drawreplace @PWEditor 15 14 %PWEditor.xstartloc %PWEditor.Line2y %PWEditor.checkwidth 2
  905. ;%PWEditor.checkwidth 2
  906. /did -i pweditor 33 1 CheckBox successfully inserted...
  907. /unset %PWEditor.checkwidth
  908. /unset %PWEditor.checkhight
  909. /unset %PWEditor.xstartloc
  910. /unset %PWEditor.ystartloc
  911. /.disable #insertcheckbox
  912. /createproject
  913. }
  914. }
  915. ...
  916. #insertradio end
  917. ;--------------------------------------------------------------------
  918. ;Alias's Basicly Explain them Self
  919. ;====================================================================
  920. alias f3 {
  921. /dialog -mav PWEditor PWEditor
  922. }
  923. alias countobjects {
  924. /set %pwe.countobj 0
  925. /set %pwe.totalbuttons 0
  926. /set %pwe.totalstattext 0
  927. /set %pwe.totaldnytext 0
  928. /set %pwe.totaltxtbox 0
  929. /set %pwe.totalimage 0
  930. /set %pwe.totalgroupbox 0
  931. /set %pwe.totalcheckbox 0
  932. /set %pwe.totallink 0
  933. while (%pwe.countobj < $lines( $+ %pwe.openfile $+ )) {
  934. inc %pwe.countobj
  935. if (( $+ BG isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) && (Button isin $read( $+ %pwe.openfile $+ ,%pwe.countobj))) {
  936. inc %pwe.totalbuttons
  937. }
  938. if (StaticText isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  939. inc %pwe.totalstattext
  940. }
  941. if (DynamicText isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  942. inc %pwe.totaldyntext
  943. }
  944. if ((BG isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) && (TextBox isin $read( $+ %pwe.openfile $+ ,%pwe.countobj))) {
  945. inc %pwe.totaltxtbox
  946. }
  947. if (Image $+ %pwe.countobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  948. inc %pwe.totalimage
  949. }
  950. if ((BG isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) && (GroupBox isin $read( $+ %pwe.openfile $+ ,%pwe.countobj))) {
  951. inc %pwe.totalgroupbox
  952. }
  953. if ((BG isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) && (CheckBox isin $read( $+ %pwe.openfile $+ ,%pwe.countobj))) {
  954. inc %pwe.totalcheckbox
  955. }
  956. if (Link isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  957. inc %pwe.totallink
  958. }
  959. }
  960. }
  961. alias checkforduplicateeventthenpopulate {
  962. /set %pwe.dupnum 0
  963. /did -r pwe_eventeditor 2
  964. :nextline
  965. while (%pwe.dupnum < $lines( $+ %pwe.openeventfile $+ )) {
  966. inc %pwe.dupnum
  967.  
  968. if (Window events for: isin $read( $+ %pwe.openeventfile $+ ,%pwe.dupnum)) {
  969. goto skipaline
  970. }
  971. if (alias $did(pwe_eventeditor,5).seltext $+ - $+ $did(pwe_eventeditor,6).seltext isin $read( $+ %pwe.openeventfile $+ ,%pwe.dupnum)) {
  972. /did -a pwe_eventeditor 2 $read( $+ %pwe.openeventfile $+ ,%pwe.dupnum) $+ $crlf
  973. }
  974. else {
  975. if (( $+ $did(pwe_eventeditor,5).seltext $+ - $+ $did(pwe_eventeditor,6).seltext $+ Code: isin $read( $+ %pwe.openeventfile $+ ,%pwe.dupnum)) && ($did(pwe_eventeditor,5).text isin $read( $+ %pwe.openeventfile $+ ,%pwe.dupnum))) {
  976. /did -a pwe_eventeditor 2 $remove($read( $+ %pwe.openeventfile $+ ,%pwe.dupnum),$did(pwe_eventeditor,5).text $+ -Code:) $+ $crlf
  977. }
  978. else {
  979. if ((Endof isin $read( $+ %pwe.openeventfile $+ ,%pwe.dupnum)) && ($did(pwe_eventeditor,5).text isin $read( $+ %pwe.openeventfile $+ ,%pwe.dupnum))) {
  980. /did -a pwe_eventeditor 2 Endof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text
  981. goto done
  982. }
  983. ;/did -a pwe_eventeditor 2 $remove($read( $+ %pwe.openeventfile $+ ,%pwe.dupnum),$did(pwe_eventeditor,5).text $+ - $+ $did(pwe_eventeditor,6).text $+ Code:) $+ $crlf
  984.  
  985.  
  986. }
  987. }
  988. :skipaline
  989. }
  990. :done
  991. halt
  992. }
  993. alias txtobjectcheck {
  994. if (%pwe.txtobject == Dynamic) { /.enable #insertdyntext }
  995. else { /.enable #inserttext }
  996. }
  997. alias createproject {
  998. /set %pwe.winlines 0
  999. /window -c @PWEditor
  1000. :loop
  1001. while (%pwe.winlines < $lines( $+ %pwe.openfile $+ )) {
  1002. if ($read( $+ %pwe.openfile $+ ,%pwe.winlines) != #This window was Created in PWEditor v1.0 ) { inc %pwe.winlines | goto loop }
  1003. elseif ($read( $+ %pwe.openfile $+ ,%pwe.winlines) == #This window was Created in PWEditor v1.0) { goto next2 }
  1004. else { goto next2 }
  1005. }
  1006. :next2
  1007. inc %pwe.winlines
  1008. ;/echo -s 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),2-,32)
  1009. if ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Open) {
  1010. $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),2-,32)
  1011. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  1012. else { goto next2 }
  1013. }
  1014. elseif ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Fill) {
  1015. $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),2-,32)
  1016. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  1017. else { goto next2 }
  1018. }
  1019. else {
  1020. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { goto fillObjectBrowser }
  1021. else {
  1022. if ((URL isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Link isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1023. goto next2
  1024. }
  1025. else {
  1026. $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),2-,32)
  1027. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { goto fillObjectBrowser }
  1028. else { goto next2 }
  1029. }
  1030. }
  1031. }
  1032. :fillObjectBrowser
  1033. /did -r pweditor 59
  1034. /set %pwe.winlines 0
  1035. :loop2
  1036. ;/echo -s got to loop2
  1037. while (%pwe.winlines < $lines( $+ %pwe.openfile $+ $+ )) {
  1038. ;/echo -s In loop2
  1039. ;/echo -s 1 $read( $+ %pwe.openfile $+ ,%pwe.winlines)
  1040.  
  1041. if ($read( $+ %pwe.openfile $+ ,%pwe.winlines) != #This window was Created in PWEditor v1.0 ) { inc %pwe.winlines | goto loop2 }
  1042. elseif ($read( $+ %pwe.openfile $+ ,%pwe.winlines) == #This window was Created in PWEditor v1.0) { goto next3 }
  1043. else { goto next3 }
  1044. :next3
  1045. inc %pwe.winlines
  1046. ;/echo -s 1 $read( $+ %pwe.openfile $+ ,%pwe.winlines)
  1047. if ($gettok($read(%pwe.openfile $+ ,%pwe.winlines),1,58) == Open) {
  1048. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  1049. else { goto next3 }
  1050. }
  1051. elseif ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Fill) {
  1052. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  1053. else { goto next3 }
  1054. }
  1055. else {
  1056. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Button isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1057. /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  1058. goto done
  1059. }
  1060. if ((Area isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Image isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1061.  
  1062. /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58))
  1063. goto done
  1064. }
  1065. if ((Text isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (StaticText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1066.  
  1067.  
  1068. /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile,%pwe.winlines),1,32),$chr(58),-Text)
  1069. goto done
  1070. }
  1071. if ((Text isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (DynamicText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1072. /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-Text)
  1073. goto done
  1074. }
  1075. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (TextBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1076.  
  1077. /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  1078. goto done
  1079. }
  1080. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (GroupBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1081.  
  1082. /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  1083. goto done
  1084. }
  1085. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (CheckBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1086.  
  1087. /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  1088. goto done
  1089. }
  1090. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Link isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1091.  
  1092. /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  1093. goto done
  1094. }
  1095. :done
  1096. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { goto complete }
  1097. else { goto next3 }
  1098. }
  1099. }
  1100. :complete
  1101. halt
  1102. }
  1103.  
  1104. alias insertobject {
  1105. if ($window(@pweditor,0)) { goto next }
  1106. else { /did -i pweditor 33 1 Unable to insert %pweditor.insertobject $+ . Create a new project then try again. | halt }
  1107. :next
  1108. /.disable #insertimage
  1109. /.disable #insertbutton
  1110. /.disable #inserttext
  1111. /.disable #insertdyntext
  1112. /.disable #inserttextbox
  1113. /.disable #insertlink
  1114. if (%pweditor.insertobject == Image) {
  1115. /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
  1116. /.enable #insertimage
  1117. }
  1118. if (%pweditor.insertobject == Button) {
  1119. /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
  1120. /.enable #insertbutton
  1121. }
  1122. if (%pweditor.insertobject == Text) {
  1123. /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
  1124. /dialog -mav pwe_txtobject pwe_txtobject
  1125.  
  1126. }
  1127. if (%pweditor.insertobject == TextBox) {
  1128. /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
  1129. /.enable #inserttextbox
  1130. }
  1131. if (%pweditor.insertobject == Selection) {
  1132. /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
  1133. }
  1134. if (%pweditor.insertobject == Erase) {
  1135. /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
  1136. }
  1137. if (%pweditor.insertobject == List Box) {
  1138. /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
  1139. }
  1140. if (%pweditor.insertobject == CheckBox) {
  1141. /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
  1142. /.enable #insertcheckbox
  1143. }
  1144. if (%pweditor.insertobject == Drop Menu) {
  1145. /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
  1146. }
  1147. if (%pweditor.insertobject == Link) {
  1148. /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
  1149. /.enable #insertlink
  1150. }
  1151. if (%pweditor.insertobject == GroupBox) {
  1152. /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
  1153. /.enable #insertgroupbox
  1154. }
  1155. }
  1156. alias refresh {
  1157. /dialog -x PWEditor
  1158. /dialog -mav pweditor pweditor
  1159. }
  1160. alias pwe.objectnum {
  1161.  
  1162. /set %pwe.countobj 0
  1163. /set %pwe.totalbuttons 0
  1164. /set %pwe.totalstattext 0
  1165. /set %pwe.totaldnytext 0
  1166. /set %pwe.totaltxtbox 0
  1167. /set %pwe.totalimage 0
  1168. /set %pwe.totalgroupbox 0
  1169. /set %pwe.totalcheckbox 0
  1170. /set %pwe.totallink 0
  1171. /set %pwe.currentobj 0
  1172. while (%pwe.countobj < $lines( $+ %pwe.openfile $+ )) {
  1173. ;/echo -s Button $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)
  1174. if (%pwe.countobj == $lines( $+ %pwe.openfile $+ )) {
  1175. goto done
  1176. }
  1177.  
  1178. if (Button isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  1179. inc %pwe.totalbuttons
  1180. return %pwe.totalbuttons
  1181. }
  1182. if (StaticText $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  1183. inc %pwe.totalstattext
  1184. /set %pwe.obnum %pwe.totalstattext
  1185. return %pwe.totalstattext
  1186. }
  1187. if (DynamicText $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  1188. inc %pwe.totaldyntext
  1189. /set %pwe.obnum %pwe.totaldyntext
  1190. return %pwe.totaldnytext
  1191. }
  1192. if (TextBox $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  1193. inc %pwe.totaltxtbox
  1194. /set %pwe.obnum %pwe.totaltxtbox
  1195. return %pwe.totaltxtbox
  1196. }
  1197. if (Image $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  1198. inc %pwe.totalimage
  1199. /set %pwe.obnum %pwe.totalimage
  1200. return %pwe.totalimage
  1201. }
  1202. if (GroupBox $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  1203. inc %pwe.totalgroupbox
  1204. /set %pwe.obnum %pwe.totalgroupbox
  1205. return %pwe.totalgroupbox
  1206. }
  1207. if (CheckBox $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  1208. inc %pwe.totalcheckbox
  1209. /set %pwe.obnum %pwe.totalcheckbox
  1210. return %pwe.totalcheckbox
  1211. }
  1212. if (Link $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  1213. inc %pwe.totallink
  1214. /set %pwe.obnum %pwe.totallink
  1215. return %pwe.totallink
  1216. }
  1217. }
  1218. :done
  1219. halt
  1220. }
  1221.  
  1222. alias wirteobjectchange {
  1223. /set %pwe.objnum 1
  1224. /set %pwe.currentobj 0
  1225. /countobjects
  1226. while (%pwe.objnum < $lines(%pwe.openfile $+ )) {
  1227. if (Fill isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
  1228. /set %pwe.currentobj 0
  1229. }
  1230. if ($did(pweditor,56).state == 1) {
  1231. /set %pwe.editswitch -d
  1232. }
  1233. else {
  1234. /set %pwe.editswitch -
  1235. }
  1236. inc %pwe.currentobj
  1237.  
  1238. ;============Edit Object
  1239. ;/echo -s Checking Object
  1240. if (($did(pweditor,27).text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum)) && (Shadow isin $read( $+ %pwe.openfile $+ ,%pwe.objnum))) {
  1241. /write -dl $+ %pwe.objnum " $+ %pwe.openfile $+ $+ "
  1242. /write -il $+ %pwe.objnum " $+ %pwe.openfile $+ $+ " $did(pweditor,27).text $+ -Shadow: drawrect %pwe.editswitch $+ f @PWEditor 14 2 $calc($did(pweditor,25).text + 2) $calc($did(pweditor,35).text + 2) $did(pweditor,12).text $did(pweditor,4).text
  1243. goto editBG
  1244. }
  1245. :editBG
  1246. inc %pwe.currentobj
  1247. if (($did(pweditor,27).text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum)) && (BG isin $read( $+ %pwe.openfile $+ ,%pwe.objnum))) {
  1248. /write -dl $+ %pwe.objnum " $+ %pwe.openfile $+ $+ "
  1249.  
  1250. if (Button isin $did(pweditor,27).text) {
  1251. /write -il $+ %pwe.objnum " $+ %pwe.openfile $+ $+ " $did(pweditor,27).text $+ -BG: drawrect %pwe.editswitch $+ f @PWEditor 15 %FGsel.color $did(pweditor,25).text $did(pweditor,35).text $did(pweditor,12).text $did(pweditor,4).text
  1252. }
  1253. else {
  1254. /write -il $+ %pwe.objnum " $+ %pwe.openfile $+ $+ " $did(pweditor,27).text $+ -BG: drawrect %pwe.editswitch $+ f @PWEditor %BGsel.color %FGsel.color $did(pweditor,25).text $did(pweditor,35).text $did(pweditor,12).text $did(pweditor,4).text
  1255.  
  1256. }
  1257.  
  1258. goto editOverlay
  1259. }
  1260. :editOverlay
  1261. inc %pwe.currentobj
  1262. if (($did(pweditor,27).text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum)) && (Overlay isin $read( $+ %pwe.openfile $+ ,%pwe.objnum))) {
  1263. /write -dl $+ %pwe.objnum " $+ %pwe.openfile $+ $+ "
  1264. /write -il $+ %pwe.objnum " $+ %pwe.openfile $+ $+ " $did(pweditor,27).text $+ -Overlay: drawrect %pwe.editswitch @PWEditor %FGsel.color %BGsel.color $did(pweditor,25).text $did(pweditor,35).text $did(pweditor,12).text $did(pweditor,4).text
  1265.  
  1266. goto editText
  1267. }
  1268. :editText
  1269. inc %pwe.currentobj
  1270. if (($did(pweditor,27).text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum)) && (-Text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum))) {
  1271. /write -dl $+ %pwe.objnum " $+ %pwe.openfile $+ $+ "
  1272. /set %pwe.newtextloc $calc($did(pweditor,25).text / 4)
  1273. /set %pwe.newtxtX $calc($did(pweditor,25).text + %pwe.newtextloc)
  1274. if (Button isin $did(pweditor,27).text) {
  1275. /write -il $+ %pwe.objnum " $+ %pwe.openfile $+ $+ " $did(pweditor,27).text $+ -Text: drawtext -hb @PWEditor %FGsel.color 15 $calc($did(pweditor,25).text + 6) $calc($did(pweditor,35).text + 3) $did(pweditor,32).text
  1276. }
  1277. elseif (GroupBox isin $did(pweditor,27).text) {
  1278. /write -il $+ %pwe.objnum " $+ %pwe.openfile $+ $+ " $did(pweditor,27).text $+ -Text: drawtext -hb @PWEditor %FGsel.color %BGsel.color $calc($did(pweditor,25).text + 6) $calc($did(pweditor,35).text - 8) $did(pweditor,32).text
  1279. }
  1280. else {
  1281. /write -il $+ %pwe.objnum " $+ %pwe.openfile $+ $+ " $did(pweditor,27).text $+ -Text: drawtext -hb @PWEditor %FGsel.color %BGsel.color $calc($did(pweditor,25).text + 6) $calc($did(pweditor,35).text + 3) $did(pweditor,32).text
  1282. }
  1283. goto topline
  1284. }
  1285. :topline
  1286. inc %pwe.currentobj
  1287. /set %pwe.newlinex $did(pweditor,25).text
  1288. /set %pwe.newliney $did(pweditor,35).text
  1289. /set %pwe.newbuttonwidth $did(pweditor,12).text
  1290. /set %pwe.newbuttonheight $did(pweditor,4).text
  1291. /set %PWEditor.Line2y $calc(%pwe.newliney + %pwe.newbuttonheight - 3)
  1292. /set %PWEditor.Line1y $calc(%pwe.newliney + 1)
  1293. /set %pwe.newnewlineX $calc(%pwe.newlinex + %pwe.newbuttonheight - 3)
  1294.  
  1295.  
  1296. if (($did(pweditor,27).text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum)) && (-Top isin $read( $+ %pwe.openfile $+ ,%pwe.objnum))) {
  1297. if (Button isin $did(pweditor,27).text) {
  1298. /write -dl $+ %pwe.objnum " $+ %pwe.openfile $+ $+ "
  1299. /write -il $+ %pwe.objnum " $+ %pwe.openfile $+ $+ " $did(pweditor,27).text $+ -Top: drawreplace @PWEditor 15 0 %pwe.newlineX %PWEditor.Line1y %pwe.newbuttonwidth 2
  1300. goto bottom
  1301. }
  1302.  
  1303. }
  1304.  
  1305. :bottom
  1306. if (($did(pweditor,27).text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum)) && (-Bottom isin $read( $+ %pwe.openfile $+ ,%pwe.objnum))) {
  1307. if (Button isin $did(pweditor,27).text) {
  1308. /write -dl $+ %pwe.objnum " $+ %pwe.openfile $+ $+ "
  1309. /write -il $+ %pwe.objnum " $+ %pwe.openfile $+ $+ " $did(pweditor,27).text $+ -Bottom: drawreplace @PWEditor 15 14 %pwe.newlineX %PWEditor.Line2y %pwe.newbuttonwidth 2
  1310.  
  1311. }
  1312. }
  1313.  
  1314. :nextline
  1315. inc %pwe.objnum
  1316. }
  1317. :done
  1318.  
  1319. /createproject
  1320. /did -o pweditor 33 1 Done modifying $did(pweditor,27).text $+ .
  1321.  
  1322. }
  1323. ;--------------------------------------------------------------------
  1324. ;Whenever a button is clicked, a menu is selected, or data is changed
  1325. ;in a dialog these events will be activated.
  1326. ;====================================================================
  1327. on 1:dialog:pwe_txtobject:sclick:1: {
  1328. /set %pwe.txtobject Dynamic
  1329. /txtobjectcheck
  1330. /unset %pwe.txtobject
  1331. /dialog -x pwe_txtobject
  1332. }
  1333. on 1:dialog:pwe_txtobject:sclick:2: {
  1334. /set %pwe.txtobject Static
  1335. /txtobjectcheck
  1336. /unset %pwe.txtobject
  1337. /dialog -x pwe_txtobject
  1338. }
  1339.  
  1340. on 1:dialog:pweditor:sclick:38: {
  1341. /did -o pweditor 33 1 Modifying $did(pweditor,27).text please wait.
  1342. /wirteobjectchange
  1343. }
  1344.  
  1345. ;--------------------------------------------------------------------
  1346. ;Whenever a button is clicked in the main dialog, a menu is selected, or data is changed
  1347. ;in a dialog these events will be activated.
  1348. ;====================================================================
  1349. on 1:dialog:pwe_eventeditor:sclick:4: {
  1350. /dialog -x pwe_eventeditor
  1351. }
  1352. on 1:dialog:pweditor:sclick:60: {
  1353.  
  1354. if ($?!=("Are you sure you want to remove " $+ $did(pweditor,59).seltext $+ " from your project?") == $true) {
  1355. /set %pwe.winlines 0
  1356. while (%pwe.winlines < $lines( $+ %pwe.openfile $+ )) {
  1357. if ($did(pweditor,59).seltext isin $read( $+ %pwe.openfile $+ ,%pwe.winlines)) {
  1358. /write -dl $+ %pwe.winlines " $+ %pwe.openfile $+ -pw.ini $+ "
  1359. }
  1360. inc %pwe.winlines
  1361. }
  1362. }
  1363. /createproject
  1364. }
  1365. on 1:dialog:pweditor:dclick:59: {
  1366. /set %PWEditor.xstartloc $did(Pweditor,10)
  1367. /set %PWEditor.ystartloc $did(Pweditor,17)
  1368. /set %pwe.winlines 0
  1369.  
  1370. :loop
  1371. /did -i pweditor 33 1 Gathering %pweditor.insertobject information please wait...
  1372. while (%pwe.winlines < $lines( $+ %pwe.openfile $+ )) {
  1373. if ($read( $+ %pwe.openfile $+ ,%pwe.winlines) != #This window was Created in PWEditor v1.0 ) { inc %pwe.winlines | goto loop }
  1374. elseif ($read( $+ %pwe.openfile $+ ,%pwe.winlines) == #This window was Created in PWEditor v1.0) { goto next2 }
  1375. else { goto next2 }
  1376. :next2
  1377. inc %pwe.winlines
  1378. if ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Open) {
  1379. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  1380. else { goto next2 }
  1381. }
  1382. elseif ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Fill) {
  1383. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  1384. else { goto next2 }
  1385. }
  1386. else {
  1387. ;/echo -s $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)
  1388. if (Image isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  1389. /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58))
  1390. /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9-,32)
  1391. /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  1392.  
  1393. /did -i PWEditor 12 1 $gettok($read( $+ %pweditor.sir $+ Documents\ $+ %pweditor.tempwindowname $+ -pw.ini,%pwe.winlines),7,32)
  1394. /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  1395. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  1396. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  1397. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  1398. goto done
  1399. }
  1400. if (StaticText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  1401. /did -i PWEditor 27 1 $remove( $+ $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58)),-Text))
  1402. /did -i PWEditor 32 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),11-,32), $+ $chr(58) $+ )
  1403. /did -r PWEditor 9
  1404. /did -r PWEditor 11
  1405. /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  1406. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  1407. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  1408. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  1409. goto done
  1410. }
  1411. if (DynamicText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  1412.  
  1413. /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32), $+ $chr(58) $+ )
  1414. /did -i PWEditor 32 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),12-,32), $+ $chr(58) $+ )
  1415. /did -r PWEditor 9
  1416. /did -r PWEditor 11
  1417. /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  1418. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  1419. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),11,32)
  1420. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),12,32)
  1421. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  1422. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  1423. goto done
  1424. }
  1425. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && ( $+ $did(pweditor,59).seltext isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1426. ;/echo -s found gather box
  1427. /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  1428. /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  1429. /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  1430. /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  1431. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  1432. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  1433. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  1434. /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),9-,32),32)
  1435. goto done
  1436. }
  1437. if (Link isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
  1438.  
  1439. /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58) ,BG)
  1440. /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  1441. /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
  1442. /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  1443. /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
  1444. /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
  1445. /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
  1446. /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),9-,32),32)
  1447. goto done
  1448. }
  1449. :done
  1450. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { /did -o pweditor 33 1 Done Gathering %pweditor.insertobject information. | halt }
  1451. else { goto next2 }
  1452. }
  1453. }
  1454. }
  1455.  
  1456.  
  1457.  
  1458.  
  1459. on 1:dialog:pwe_eventeditor:sclick:6: {
  1460. /set %pwe.winlines 0
  1461. :loop
  1462. /countobjects
  1463. /did -r pwe_eventeditor 2
  1464. while (%pwe.winlines < $lines( $+ %pwe.openeventfile $+ )) {
  1465. inc %pwe.winlines
  1466. if (%pwe.winlines == $lines( $+ %pwe.openeventfile $+ )) {
  1467. if ($did(pwe_eventeditor,2).lines == 0) {
  1468. ;/echo -s no lines
  1469. /write " $+ %pwe.openeventfile $+ $+ " /alias $did(pwe_eventeditor,5).text $+ - $+ $did(pwe_eventeditor,6).text Startof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
  1470. /write " $+ %pwe.openeventfile $+ $+ " $did(pwe_eventeditor,5).text $+ -Code: Enter you code between these tags $+ $crlf
  1471. /write " $+ %pwe.openeventfile $+ $+ " Endof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
  1472.  
  1473. /reloadcurrentevent
  1474. ;/echo -s healdef1
  1475. halt
  1476. goto done
  1477. }
  1478. else {
  1479. ;/did -r pwe_eventeditor 2
  1480. ;/echo -s checking duplicates.....
  1481. /checkforduplicateeventthenpopulate
  1482. /gathereventscript
  1483. if ($did(pwe_eventeditor,2).lines == 0) {
  1484. /write " $+ %pwe.openeventfile $+ $+ " /alias $did(pwe_eventeditor,5).text $+ - $+ $did(pwe_eventeditor,6).text Startof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
  1485. /write " $+ %pwe.openeventfile $+ $+ " $did(pwe_eventeditor,5).text $+ -Code: Enter you code between these tags $+ $crlf
  1486. /write " $+ %pwe.openeventfile $+ $+ " Endof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
  1487.  
  1488. }
  1489. ;/echo -s healdef2
  1490. halt
  1491. goto done
  1492. }
  1493. }
  1494. else {
  1495. if ($did(pwe_eventeditor,2).lines == 0) {
  1496. /write " $+ %pwe.openeventfile $+ $+ " /alias $did(pwe_eventeditor,5).text $+ - $+ $did(pwe_eventeditor,6).text Startof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
  1497. /write " $+ %pwe.openeventfile $+ $+ " $did(pwe_eventeditor,5).text $+ -Code: Enter you code between these tags $+ $crlf
  1498. /write " $+ %pwe.openeventfile $+ $+ " Endof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
  1499.  
  1500. haltdef
  1501. }
  1502. ;/echo -s checking duplicates.....
  1503. /checkforduplicateeventthenpopulate
  1504. ;/gathereventscript
  1505.  
  1506. ;/echo -s healdef3
  1507.  
  1508. }
  1509. }
  1510. :done
  1511. }
  1512. alias gathereventscript {
  1513. if ($len($did(pwe_eventeditor,2)text) == 0) {
  1514. /did -a pwe_eventeditor 2 /alias $did(pwe_eventeditor,5).text $+ - $+ $did(pwe_eventeditor,6).text Startof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
  1515. /did -a pwe_eventeditor 2 $did(pwe_eventeditor,5).text $+ -Code: Enter you code between these tags $+ $crlf
  1516. /did -a pwe_eventeditor 2 Endof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
  1517.  
  1518. /write " $+ %pwe.openeventfile $+ $+ " /alias $did(pwe_eventeditor,5).text $+ - $+ $did(pwe_eventeditor,6).text Startof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
  1519. /write " $+ %pwe.openeventfile $+ $+ " $did(pwe_eventeditor,5).text $+ -Code: Enter you code between these tags $+ $crlf
  1520. /write " $+ %pwe.openeventfile $+ $+ " Endof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
  1521.  
  1522. }
  1523. ;/echo -s Gahter Window Object Event.
  1524. }
  1525. on 1:dialog:pwe_eventeditor:init:0: {
  1526. /set %pwe.winlines 0
  1527. :loop
  1528. while (%pwe.winlines < $lines( $+ %pwe.openfile $+ $+ )) {
  1529. ;;/echo -s 1 $read( $+ %pwe.openfile $+ ,%pwe.winlines)
  1530.  
  1531. if ($read( $+ %pwe.openfile $+ ,%pwe.winlines) != #This window was Created in PWEditor v1.0 ) { inc %pwe.winlines | goto loop }
  1532. elseif ($read( $+ %pwe.openfile $+ ,%pwe.winlines) == #This window was Created in PWEditor v1.0) { goto next2 }
  1533. else { goto next2 }
  1534. :next2
  1535. inc %pwe.winlines
  1536. ;;/echo -s 1 $read( $+ %pwe.openfile $+ ,%pwe.winlines)
  1537. if ($gettok($read(%pwe.openfile $+ ,%pwe.winlines),1,58) == Open) {
  1538. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  1539. else { goto next2 }
  1540. }
  1541. elseif ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Fill) {
  1542. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
  1543. else { goto next2 }
  1544. }
  1545. else {
  1546. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Button isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1547. /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  1548. goto done
  1549. }
  1550. if ((Area isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Image isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1551.  
  1552. /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58))
  1553. goto done
  1554. }
  1555. if ((Text isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (StaticText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1556.  
  1557.  
  1558. /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile,%pwe.winlines),1,32),$chr(58),-Text)
  1559. goto done
  1560. }
  1561. if ((Text isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (DynamicText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1562. /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-Text)
  1563. goto done
  1564. }
  1565. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (TextBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1566.  
  1567. /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  1568. goto done
  1569. }
  1570. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (GroupBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1571.  
  1572. /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  1573. goto done
  1574. }
  1575. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (CheckBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1576.  
  1577. /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  1578. goto done
  1579. }
  1580. if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Link isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
  1581.  
  1582. /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
  1583. goto done
  1584. }
  1585. :done
  1586. if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { goto complete }
  1587. else { goto next2 }
  1588. }
  1589. }
  1590. :complete
  1591. /did -a pwe_eventeditor 6 OnPress
  1592. /did -a pwe_eventeditor 6 OnRelease
  1593. /did -a pwe_eventeditor 6 OnClick
  1594. /did -a pwe_eventeditor 6 OnDoubleClick
  1595. /did -a pwe_eventeditor 6 OnOver
  1596. }
  1597. on 1:dialog:pweditor:close:0: {
  1598. /window -c @PWEditor
  1599. /window -c @Toolbar
  1600. /set %pwe.toolbar 0
  1601. unset %pwe.*
  1602. unset %Pweditor.*
  1603. /.disable #notask
  1604. }
  1605. on 1:dialog:pweditor:menu:8: {
  1606. if (%pwe.toolbar = 1) { /did -o pweditor 8 Show Toolbar | /window -c @ToolBar | /set %pwe.toolbar 0 }
  1607. else { /did -o pweditor 8 Hide Toolbar
  1608. /window -apk0 +l @ToolBar 0 0 89 349
  1609. /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ "
  1610. /set %pwe.toolbar 1
  1611. }
  1612. }
  1613. on 1:dialog:pwe_proman:sclick:7: {
  1614. /set %pwe.browsedir $sdir(%pweditor.scriptdir $+ Documents\)
  1615. /did -o pwe_proman 6 1 %pwe.browsedir
  1616. /set %pwe.filenum 1
  1617. /did -r pwe_proman 1
  1618. while ($nopath($findfile( $+ %pwe.browsedir $+ ,*-pw.ini,%pwe.filenum))) {
  1619. if (Events isin $nopath($findfile( $+ %pwe.browsedir $+ ,*-pw.ini,%pwe.filenum))) { goto skipline }
  1620. /did -a pwe_proman 1 $nopath($findfile( $+ %pwe.browsedir $+ ,*-pw.ini,%pwe.filenum))
  1621. :skipline
  1622. inc %pwe.filenum
  1623. }
  1624. }
  1625. on 1:dialog:pwe_proman:sclick:2: {
  1626. /set %pwe.openeventfile $did(pwe_proman,6).text $+ $replace($did(pwe_proman,1).seltext,-pw.ini,-Events-pw.ini)
  1627. if ($isfile(%pwe.openeventfile) == true) {
  1628. if ($?!=("Are you sure you want to open this file. You will loose your if you continue.") == $true) {
  1629. /set %pwe.openfile $did(pwe_proman,6).text $+ $did(pwe_proman,1).seltext
  1630. /echo -a 1
  1631. }
  1632. else {
  1633. /set %pwe.openfile $did(pwe_proman,6).text $+ $did(pwe_proman,1).seltext
  1634. /echo -a 2
  1635. }
  1636. }
  1637. else {
  1638. /set %pwe.openfile $did(pwe_proman,6).text $+ $did(pwe_proman,1).seltext
  1639.  
  1640. /echo -a 3
  1641. }
  1642.  
  1643.  
  1644.  
  1645. /dialog -x pwe_proman
  1646. /set %Pweditor.width $gettok($read( $+ %pwe.openfile $+ ,2),2,32)
  1647. ;/echo -s %Pweditor.width
  1648. /set %Pweditor.height $gettok($read( $+ %pwe.openfile $+ ,2),4,32)
  1649. ;/echo -s %Pweditor.height
  1650. /set %Pweditor.winx $gettok($read( $+ %pwe.openfile $+ ,3),3,32)
  1651. /set %Pweditor.winy $gettok($read( $+ %pwe.openfile $+ ,3),6,32)
  1652. /set %pweditor.tempwindowname $gettok($read( $+ %pwe.openfile $+ ,1),3,32)
  1653. /createproject
  1654. }
  1655.  
  1656.  
  1657.  
  1658. on 1:dialog:pwe_proman:init:0: {
  1659. /did -a pwe_proman 6 %pweditor.scriptdir $+ Documents\
  1660. /set %pwe.filenum 1
  1661. /.did -r pwe_proman 1
  1662. while ($nopath($findfile( $+ %pweditor.scriptdir $+ Documents\ $+ ,*-pw.ini,%pwe.filenum))) {
  1663. if (Events isin $nopath($findfile( $+ %pweditor.scriptdir $+ Documents\ $+ ,*-pw.ini,%pwe.filenum))) { goto skipline }
  1664. /.did -a pwe_proman 1 $nopath($findfile( $+ %pweditor.scriptdir $+ Documents\ $+ ,*-pw.ini,%pwe.filenum))
  1665. :skipline
  1666. inc %pwe.filenum
  1667. }
  1668.  
  1669. }
  1670. on 1:dialog:pwe_proman:sclick:3: {
  1671. /set %pwe.browsedir $did(pwe_proman,6).text
  1672. if ($?!=("Are you sure you want to delete this file. It will be removed from your HD.") == $true) {
  1673. /.remove -b " $+ %pwe.browsedir $+ $did(pwe_proman,1).seltext $+ "
  1674. /.remove -b " $+ $replace( $+ %pwe.browsedir $+ $did(pwe_proman,1).seltext $+ ,-pw.ini,-Events-pw.ini) $+ "
  1675. /set %pwe.filenum 1
  1676. /did -r pwe_proman 1
  1677. while ($nopath($findfile( $+ %pwe.browsedir $+ ,*-pw.ini,%pwe.filenum))) {
  1678. if (Events isin $nopath($findfile( $+ %pwe.browsedir $+ ,*-pw.ini,%pwe.filenum))) { goto skipline }
  1679. /did -a pwe_proman 1 $nopath($findfile( $+ %pwe.browsedir $+ ,*-pw.ini,%pwe.filenum))
  1680. :skipline
  1681. inc %pwe.filenum
  1682. }
  1683. }
  1684. }
  1685. on 1:dialog:pweditor:menu:81: {
  1686. /dialog -mav pwe_proman pwe_proman
  1687. }
  1688. on 1:dialog:pweditor:menu:1: {
  1689. if ($window(@pweditor,0)) { goto next }
  1690. else { /did -i pweditor 33 1 Unable edit window events . Create a new project then try again. | halt }
  1691. :next
  1692. /dialog -mav pwe_eventeditor pwe_eventeditor
  1693. }
  1694. on 1:dialog:pwe_proman:sclick:5: {
  1695. /dialog -mav pwe_newfile pwe_newfile
  1696. }
  1697. on 1:dialog:pweditor:menu:87: {
  1698. /window -c @PWEditor
  1699. /window -c @Toolbar
  1700. /set %pwe.toolbar 0
  1701. /.disable #notask
  1702. /dialog -x pweditor
  1703. }
  1704. on 1:dialog:pweditor:init:0: {
  1705. /set %pweditor.scriptdir $scriptdir
  1706. ;/set %pweditor.removefromdir $remove( $+ %pweditor.scriptdir $+ ,$chr(48))
  1707. /.disable #inserttext
  1708. /.disable #insertbutton
  1709. /.disable #insertimage
  1710. /.disable #insertgroupbox
  1711. /.disable #insertlink
  1712. /.disable #insertdyntext
  1713. /.disable #buttonend
  1714. /.disable #buttonhight
  1715. /.enable #notask
  1716. }
  1717. on 1:dialog:pweditor:sclick:*: {
  1718. if ($did == 48) { /dialog -mav BG-color_swatches BG-color_swatches }
  1719. if ($did == 47) { /dialog -mav FG-color_swatches FG-color_swatches }
  1720. if ($did == 54) {
  1721. /set %pwe.lyrnum 0
  1722. while (%pwe.lyrnum < $lines( $+ %pwe.openfile,%pwe.lyrnum)) {
  1723. inc %pwe.lyrnum
  1724. }
  1725. }
  1726. if ($did == 55) {
  1727.  
  1728. }
  1729. }
  1730.  
  1731. on 1:dialog:pwe_newfile:sclick:*: {
  1732. if ($did == 5) {
  1733. if ($window(@pweditor,0)) { unset %pwe.* | unset %PWEditor.* | /window -c @pweditor }
  1734. /set %Pweditor.width $did(pwe_newfile,30)
  1735. /set %Pweditor.height $did(pwe_newfile,31)
  1736. /set %Pweditor.winx $did(pwe_newfile,28)
  1737. /set %Pweditor.winy $did(pwe_newfile,29)
  1738. /set %pweditor.tempwindowname $did(pwe_newfile,26).text
  1739. /set %pwe.openfile %pweditor.scriptdir $+ Documents\ $+ %pweditor.tempwindowname $+ -pw.ini
  1740. /set %pwe.openeventfile %pweditor.scriptdir $+ Documents\ $+ %pweditor.tempwindowname $+ -Events-pw.ini
  1741. /write " $+ %pwe.openeventfile $+ " Window events for: %pweditor.tempwindowname
  1742. /write " $+ %pwe.openfile $+ $+ " Window Name: %pweditor.tempwindowname
  1743. /write " $+ %pwe.openfile $+ $+ " Width: %Pweditor.width Height: %Pweditor.width
  1744. /write " $+ %pwe.openfile $+ $+ " X Position: %Pweditor.winx - Y Position: %Pweditor.winy
  1745. /write " $+ %pwe.openfile $+ $+ " FG color: %FGsel.color
  1746. /write " $+ %pwe.openfile $+ $+ " BG color: %BGsel.color
  1747. /write " $+ %pwe.openfile $+ $+ " #This window was Created in PWEditor v1.0
  1748. /write " $+ %pwe.openfile $+ $+ " Open: /.window -abBrg2ik0prwz +et @PWEditor %Pweditor.winx %Pweditor.winy %Pweditor.width %Pweditor.height
  1749. /write " $+ %pwe.openfile $+ $+ " Fill: /.drawfill -hs @PWEditor %BGsel.color %FGsel.color 0 1 %Pweditor.width %Pweditor.height
  1750. /dialog -x pwe_newfile
  1751. /dialog -x pwe_proman
  1752. /createproject
  1753. }
  1754. if ($did == 66) { /dialog -mav FG-color_swatches FG-color_swatches }
  1755. if ($did == 70) { /dialog -mav BG-color_swatches BG-color_swatches }
  1756. }
  1757. on 1:dialog:FG-color_swatches:sclick:*: {
  1758. if (($did < 1) || ($did > 16)) { return }
  1759. else { goto next }
  1760. :next
  1761. if ($did == 1) { /set %FGsel.color 1 }
  1762. if ($did == 2) { /set %FGsel.color 2 }
  1763. if ($did == 3) { /set %FGsel.color 3 }
  1764. if ($did == 4) { /set %FGsel.color 4 }
  1765. if ($did == 5) { /set %FGsel.color 5 }
  1766. if ($did == 6) { /set %FGsel.color 6 }
  1767. if ($did == 7) { /set %FGsel.color 7 }
  1768. if ($did == 8) { /set %FGsel.color 8 }
  1769. if ($did == 9) { /set %FGsel.color 9 }
  1770. if ($did == 10) { /set %FGsel.color 10 }
  1771. if ($did == 11) { /set %FGsel.color 11 }
  1772. if ($did == 12) { /set %FGsel.color 12 }
  1773. if ($did == 13) { /set %FGsel.color 13 }
  1774. if ($did == 14) { /set %FGsel.color 14 }
  1775. if ($did == 15) { /set %FGsel.color 15 }
  1776. if ($did == 16) { /set %FGsel.color 0 }
  1777. if (%FGsel.color == $chr(48)) {
  1778. /set %selected.FGtemp $remove( $+ %pweditor.scriptdir $+ ,$did(FG-color_swatches,16),0)
  1779. /set %selected.FG " $+ $deltok( $+ $remove( $+ $did(FG-color_swatches,16) $+ , $+ $chr(48) $+ ) $+ ,0,32) $+ "
  1780. }
  1781. else {
  1782. /set %selected.FGtemp $remove( $+ %pweditor.scriptdir $+ ,$did(FG-color_swatches,%FGsel.color),0)
  1783. /set %selected.FG " $+ $deltok( $+ $remove( $+ $did(FG-color_swatches,%FGsel.color) $+ , $+ $chr(48) $+ ) $+ ,0,32) $+ "
  1784. }
  1785. if (($dialog(pweditor).active == $true) || (PWE - Picture Window Editor v1.0 isin $dialog(pweditor).title)) { /did -g pweditor 47 %selected.FG }
  1786. if ((New PWE Window isin $dialog(pwe_newfile).title) || ($dialog(pwe_newfile).active == $true)) { /did -g pwe_newfile 66 %selected.FG }
  1787. /dialog -x FG-color_swatches
  1788. }
  1789. on 1:dialog:BG-color_swatches:sclick:*: {
  1790. if (($did < 1) || ($did > 16)) { return }
  1791. else { goto next }
  1792. :next
  1793. if ($did == 1) { /set %BGsel.color 1 }
  1794. if ($did == 2) { /set %BGsel.color 2 }
  1795. if ($did == 3) { /set %BGsel.color 3 }
  1796. if ($did == 4) { /set %BGsel.color 4 }
  1797. if ($did == 5) { /set %BGsel.color 5 }
  1798. if ($did == 6) { /set %BGsel.color 6 }
  1799. if ($did == 7) { /set %BGsel.color 7 }
  1800. if ($did == 8) { /set %BGsel.color 8 }
  1801. if ($did == 9) { /set %BGsel.color 9 }
  1802. if ($did == 10) { /set %BGsel.color 10 }
  1803. if ($did == 11) { /set %BGsel.color 11 }
  1804. if ($did == 12) { /set %BGsel.color 12 }
  1805. if ($did == 13) { /set %BGsel.color 13 }
  1806. if ($did == 14) { /set %BGsel.color 14 }
  1807. if ($did == 15) { /set %BGsel.color 15 }
  1808. if ($did == 16) { /set %BGsel.color 0 }
  1809. if (%BGsel.color == $chr(48)) {
  1810. /set %selected.BGtemp $did(BG-color_swatches,16)
  1811. /set %selected.BG " $+ $deltok( $+ $remove( $+ $did(BG-color_swatches,16) $+ , $+ $chr(48) $+ ) $+ ,0,32) $+ "
  1812. }
  1813. else {
  1814. /set %selected.BGtemp $did(BG-color_swatches,%BGsel.color)
  1815. /set %selected.BG " $+ $deltok( $+ $remove( $+ $did(BG-color_swatches,%BGsel.color) $+ , $+ $chr(48) $+ ) $+ ,0,32) $+ "
  1816. ;/set %selected.BG " $+ $remove( $+ $chr(48) $+ ,$did(BG-color_swatches,%BGsel.color),0) "
  1817. }
  1818. if ((PWE - Picture Window Editor v1.0 isin $dialog(pweditor).title) || ($dialog(pweditor).active == $true)) { /did -g pweditor 48 %selected.BG }
  1819. if ((New PWE Window isin $dialog(pwe_newfile).title) || ($dialog(pwe_newfile).active == $true)) { /did -g pwe_newfile 70 %selected.BG }
  1820. /dialog -x BG-color_swatches
  1821. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement