Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; PWE - Picture Window Editor v1.0 by: 3nter
- ;
- ;
- ;
- ; Below this line this line is the Main dialog
- dialog pwe_eventeditor {
- title "Window Event Editor"
- size -1 -1 360 234
- option dbu
- box "Window event(s) code", 1, 2 14 356 202
- edit "", 2, 4 22 352 190, multi return autohs autovs hsbar vsbar
- button "Save Changes", 3, 260 220 47 12
- button "Close", 4, 310 220 47 12
- combo 5, 50 2 152 50, size drop
- combo 6, 246 2 110 50, size drop
- text "Normal mirc scripting applies in this editor.", 7, 4 220 103 8
- text "Object Browser:", 8, 8 4 41 8
- text "Window Events:", 9, 204 4 41 8
- }
- dialog pwe_txtobject {
- title "Choose One"
- size -1 -1 102 48
- option dbu
- button "Dynamic Text", 1, 54 20 45 26
- button "Static Text", 2, 2 20 45 26
- text "Select the type of text object that you want to create.", 3, 2 2 95 14
- }
- dialog pwe_proman {
- title "Manager your projects"
- size -1 -1 166 120
- option dbu
- list 1, 5 20 106 96, size vsbar
- button "Delete", 3, 115 48 43 12
- box "", 4, 2 2 162 118
- button "New project", 5, 116 8 43 12
- button "Open selected", 2, 116 25 43 12
- edit "", 6, 6 8 90 10, read autohs
- button "...", 7, 98 8 13 10, flat
- }
- dialog PWEditor {
- title "PWE - Picture Window Editor v1.0"
- size -1 -1 136 226
- option dbu
- edit "", 33, 2 215 127 10, read autohs
- link "?", 34, 130 216 4 8
- tab "Properties", 18, 2 109 130 103
- text "Caption:", 31, 11 127 23 8, tab 18
- edit "", 32, 35 125 92 10, tab 18 autohs
- box "Selected Item", 26, 69 170 59 36, tab 18
- box "X-Y", 6, 69 139 59 29, tab 18
- box "W-H", 5, 8 138 59 30, tab 18
- box "Options", 42, 8 170 59 36, tab 18
- text "y", 16, 110 158 5 8, tab 18
- edit "", 17, 100 147 24 10, tab 18 read center
- edit "", 10, 74 147 24 10, tab 18 read center
- text "x", 15, 85 158 5 8, tab 18
- text "Width", 20, 16 158 17 8, tab 18
- edit "", 11, 39 147 24 10, tab 18 read center
- text "Hight", 21, 44 158 15 8, tab 18
- check "Disable", 43, 11 179 28 10, tab 18
- check "Flat", 45, 44 179 20 10, tab 18
- check "Hide", 44, 11 192 24 10, tab 18
- text "Name:", 30, 72 180 17 8, tab 18
- edit "", 27, 93 179 32 10, tab 18 read autohs
- edit "", 29, 106 192 18 10, tab 18 read
- check "Lock ID", 28, 72 192 28 10, tab 18
- edit "", 9, 12 147 24 10, tab 18 read center
- tab "Modify", 2
- box "W-H", 3, 6 126 59 30, tab 2
- edit "", 4, 37 133 24 10, tab 2 center
- text "Hight", 22, 42 144 15 8, tab 2
- text "Width", 19, 13 144 17 8, tab 2
- edit "", 12, 9 133 24 10, tab 2 center
- box "X-Y", 23, 6 158 59 31, tab 2
- edit "", 25, 10 167 24 10, tab 2 center
- edit "", 35, 37 167 24 10, tab 2 center
- text "y", 37, 47 178 5 8, tab 2
- text "x", 36, 19 179 5 8, tab 2
- box "Object Edges", 51, 84 126 44 30, tab 2
- radio "Rounded", 56, 88 134 36 10, tab 2
- radio "Square", 57, 88 144 36 10, tab 2
- button "Apply Changes", 38, 86 198 43 12, tab 2
- combo 52, 6 35 99 18, size edit drop
- box "Layer", 53, 2 27 132 22
- button "+", 54, 110 37 9 8
- button "-", 55, 120 37 9 8
- box "Color Swatches", 46, 19 2 96 22
- icon 47, 89 10 14 8, " $+ %pweditor.scriptdir $+ images\colorswatch-white.bmp", 0, border
- text "FG", 49, 72 11 9 8
- icon 48, 45 10 14 8, " $+ %pweditor.scriptdir $+ images\colorswatch-black.bmp", 0, border
- text "BG", 50, 28 11 9 8
- box "Object Browser", 58, 2 49 132 56
- list 59, 6 58 84 44, size
- button "Remove", 60, 96 87 31 12
- box "Show Objects", 39, 92 54 40 30
- check "Layer Only", 40, 94 63 36 8
- check "All", 41, 94 74 26 8
- menu "File", 80
- item "Project Manager", 81, 80
- item break, 88, 80
- item "Save", 83, 80
- item "Save As", 89, 80
- item break, 84, 80
- item "Export project to .mrc file", 85, 80
- item break, 86, 80
- item "Exit", 87, 80
- menu "View", 7
- item "Toolbar", 8, 7
- item break, 13, 7
- item "ScreenShot *.bmp", 14, 7
- menu "Window Event Editor", 24
- item "Show", 1, 24
- }
- ; When Creating a new picture window this Dialog will appear
- dialog PWE_newfile {
- title "New PWE Window"
- size -1 -1 144 84
- option dbu
- text "Window Name:", 25, 14 9 37 8
- text "Size:", 27, 16 25 13 8
- edit "100", 28, 39 23 16 10, limit 3
- edit "100", 29, 64 23 16 10, limit 3
- edit "500", 30, 90 23 16 10, limit 3
- edit "400", 31, 114 23 16 10, limit 3
- edit "Untitled", 26, 52 7 78 10
- text "X", 1, 34 25 5 8
- text "Y", 2, 59 25 5 8
- text "W", 3, 84 25 5 8
- text "H", 4, 109 25 5 8
- button "Create New Project", 5, 16 66 59 12
- button "Cancel", 6, 80 66 49 12, cancel
- box "", 22, 4 35 136 24
- icon 66, 111 41 15 15, " $+ [ %pweditor.scriptdir $+ [ images\colorswatch-black.bmp" ] $+ ]
- icon 70, 44 41 15 15, " $+ %pweditor.scriptdir $+ images\colorswatch-darkblue.bmp"
- text "Background", 71, 11 45 29 8
- text "Foreground", 72, 77 45 29 8
- }
- ;These 2 dialog's are the Color Swatchs
- dialog FG-color_swatches {
- title "Select a Foreground Color"
- size -1 -1 144 123
- option dbu
- box "Color Swatches", 17, 4 3 136 42
- icon 1, 9 11 11 11, "images\colorswatch-black.bmp", 0, noborder
- icon 2, 25 11 11 11, "images\colorswatch-darkblue.bmp", 0, noborder
- icon 3, 41 11 11 11, "images\colorswatch-green.bmp", 0, noborder
- icon 4, 57 11 11 11, "images\colorswatch-red.bmp", 0, noborder
- icon 5, 73 11 11 11, "images\colorswatch-darkred.bmp", 0, noborder
- icon 6, 89 11 11 11, "images\colorswatch-purple.bmp", 0, noborder
- icon 7, 105 11 11 11, "images\colorswatch-orange.bmp", 0, noborder
- icon 8, 121 11 11 11, "images\colorswatch-yellow.bmp", 0, noborder
- icon 9, 9 27 11 11, "images\colorswatch-limegreen.bmp", 0, noborder
- icon 10, 25 27 11 11, "images\colorswatch-teal.bmp", 0, noborder
- icon 11, 41 27 11 11, "images\colorswatch-lightblue.bmp", 0, noborder
- icon 12, 57 27 11 11, "images\colorswatch-blue.bmp", 0, noborder
- icon 14, 89 27 11 11, "images\colorswatch-grey.bmp", 0, noborder
- icon 15, 105 27 11 11, "images\colorswatch-lightgrey.bmp", 0, noborder
- icon 13, 73 27 11 11, "images\colorswatch-pink.bmp", 0, noborder
- icon 16, 121 27 11 11, "images\colorswatch-white.bmp", 0, border
- scroll "", 18, 34 68 66 8, horizontal bottom
- text "Red", 19, 13 69 12 8
- text "Green", 20, 13 80 15 8
- text "Blue", 21, 13 90 11 8
- scroll "", 23, 33 90 67 8, horizontal bottom
- scroll "", 24, 34 79 66 8, horizontal bottom
- edit "", 25, 107 69 21 9, autohs
- edit "", 26, 107 79 21 9, autohs
- edit "", 27, 107 89 21 9, autohs
- box "RGB Color Picker", 28, 4 48 136 71
- check "Enable RGB color picker", 29, 14 55 70 9
- button "Apply", 30, 53 102 37 12
- }
- dialog BG-color_swatches {
- title "Select a Background Color"
- size -1 -1 144 123
- option dbu
- box "Color Swatches", 17, 4 3 136 42
- icon 1, 9 11 9 9, "images\colorswatch-black.bmp", 0, noborder
- icon 2, 25 11 9 9, "images\colorswatch-darkblue.bmp", 0, noborder
- icon 3, 41 11 9 9, "images\colorswatch-green.bmp", 0, noborder
- icon 4, 57 11 9 9, "images\colorswatch-red.bmp", 0, noborder
- icon 5, 73 11 9 9, "images\colorswatch-darkred.bmp", 0, noborder
- icon 6, 89 11 9 9, "images\colorswatch-purple.bmp", 0, noborder
- icon 7, 105 11 9 9, "images\colorswatch-orange.bmp", 0, noborder
- icon 8, 121 11 9 9, "images\colorswatch-yellow.bmp", 0, noborder
- icon 9, 9 27 9 9, "images\colorswatch-limegreen.bmp", 0, noborder
- icon 10, 25 27 9 9, "images\colorswatch-teal.bmp", 0, noborder
- icon 11, 41 27 9 9, "images\colorswatch-lightblue.bmp", 0, noborder
- icon 12, 57 27 9 9, "images\colorswatch-blue.bmp, 0, noborder
- icon 14, 89 27 9 9, "images\colorswatch-grey.bmp", 0, noborder
- icon 15, 105 27 9 9, "images\colorswatch-lightgrey.bmp", 0, noborder
- icon 13, 73 27 9 9, "images\colorswatch-pink.bmp", 0, noborder
- icon 16, 121 27 9 9, "images\colorswatch-white.bmp", 0, border
- scroll "", 18, 34 68 66 8, horizontal bottom
- text "Red", 19, 13 69 12 8
- text "Green", 20, 13 80 15 8
- text "Blue", 21, 13 90 11 8
- scroll "", 23, 33 90 67 8, horizontal bottom
- scroll "", 24, 34 79 66 8, horizontal bottom
- edit "", 25, 107 69 21 9, autohs
- edit "", 26, 107 79 21 9, autohs
- edit "", 27, 107 89 21 9, autohs
- box "RGB Color Picker", 28, 4 48 136 71
- check "Enable RGB color picker", 29, 14 56 70 9
- button "Apply", 30, 53 102 37 12
- }
- ;This is where the Code starts Do not change and information past
- ;this line unless you have been given permission by Reg. Finley
- menu status,channel {
- PWEditor-\=-
- .Open:/dialog -mav PWEditor PWEditor
- }
- ;--------------------------------------------
- ;When the mouse move these are its proerties
- ;============================================
- menu @PWEditor {
- mouse: { /did -i pweditor 10 1 $mouse.x | /did -i pweditor 17 1 $mouse.y
- ;/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) $+ )
- ;if ($inrect($mouse.x,$mouse.y,0,0, $+ %Pweditor.width $+ , $+ %Pweditor.length $+ ) == $true) {
- ; /echo -s in rectangle
- ; /did -i pweditor 10 1 $mouse.x
- ; /did -i pweditor 17 1 $mouse.y
- ;}
- }
- }
- ;--------------------------------------------------------------------
- ;When the user Selects a object to inset this Menu draws the
- ;selcected Item.
- ;====================================================================
- #notask on
- ...
- menu @PWEditor {
- sclick: {
- /set %pwe.winlines 0
- :loop
- while (%pwe.winlines < $lines( $+ %pwe.openfile $+ )) {
- if ($read( $+ %pwe.openfile $+ ,%pwe.winlines) != #This window was Created in PWEditor v1.0 ) { inc %pwe.winlines | goto loop }
- elseif ($read( $+ %pwe.openfile $+ ,%pwe.winlines) == #This window was Created in PWEditor v1.0) { goto next2 }
- else { goto next2 }
- :next2
- inc %pwe.winlines
- if ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Open) {
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next2 }
- }
- elseif ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Fill) {
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next2 }
- }
- else {
- if (Button isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) {
- 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) {
- ;/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)
- ;/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
- ;/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
- ;/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
- ;/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
- ;/enable #buttonresize
- goto done
- }
- }
- if (Image isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- 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) {
- goto done
- }
- }
- if (StaticText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- 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) {
- goto done
- }
- }
- if (DynamicText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- 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) {
- goto done
- }
- }
- if (TextBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- 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) {
- goto done
- }
- }
- if (GroupBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- 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) {
- goto done
- }
- }
- if (CheckBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- 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) {
- goto done
- }
- }
- if (Link isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- 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) {
- goto done
- }
- }
- :done
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next2 }
- }
- }
- }
- }
- ;--------------------------------------------------------------------
- ;When the Use Clicks anywhere inside the picture window
- ;This menu the proporties of the object that the user select
- ;in the picture window.
- ;====================================================================
- menu @PWEditor {
- sclick: {
- /set %PWEditor.xstartloc $did(Pweditor,10)
- /set %PWEditor.ystartloc $did(Pweditor,17)
- /set %pwe.winlines 0
- :loop
- /did -i pweditor 33 1 Gathering %pweditor.insertobject information please wait...
- while (%pwe.winlines < $lines( $+ %pwe.openfile $+ )) {
- if ($read( $+ %pwe.openfile $+ ,%pwe.winlines) != #This window was Created in PWEditor v1.0 ) { inc %pwe.winlines | goto loop }
- elseif ($read( $+ %pwe.openfile $+ ,%pwe.winlines) == #This window was Created in PWEditor v1.0) { goto next2 }
- else { goto next2 }
- :next2
- inc %pwe.winlines
- if ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Open) {
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next2 }
- }
- elseif ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Fill) {
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next2 }
- }
- else {
- ;/echo -s $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)
- /set %pwe.backgroundstring -BG
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Button isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- ;Button $+ %pwe.winlines $+ -BG
- 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) {
- /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),9-,32),32)
- goto done
- }
- }
- if (Image isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- 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) {
- /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58))
- /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9-,32)
- /did -i PWEditor 9 1 $gettok($read( $+ %pweditor.scriptd
- /did -i PWEditor 12 1 $gettok($read( $+ %pweditor.sir $+ Documents\ $+ %pweditor.tempwindowname $+ -pw.ini,%pwe.winlines),7,32)
- /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- goto done
- }
- }
- if (StaticText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- 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) {
- /did -i PWEditor 27 1 $remove $+ $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58))
- /did -i PWEditor 32 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),11-,32),$chr(58),-Text)
- /did -r PWEditor 9
- /did -r PWEditor 11
- /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- goto done
- }
- }
- if (DynamicText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- 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) {
- /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58))
- /did -i PWEditor 32 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),12-,32),$chr(58),-Text)
- /did -r PWEditor 9
- /did -r PWEditor 11
- /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),11,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),12,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- goto done
- }
- }
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (TextBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- 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) {
- /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- ;/did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),8-,32),32)
- /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),8-,32),32)
- goto done
- }
- }
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (GroupBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- ; /echo -s found gather box
- 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) {
- /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),9-,32),32)
- goto done
- }
- }
- if (CheckBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- 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) {
- /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),BG)
- /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),9-,32),32)
- goto done
- }
- }
- if (Link isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- 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) {
- /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),BG)
- /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),9-,32),32)
- goto done
- }
- }
- :done
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { /did -o pweditor 33 1 Done Gathering %pweditor.insertobject information. | halt }
- else { goto next2 }
- }
- }
- }
- }
- ...
- #notask end
- alias refreshtoolbar {
- /clear -u @toolbar
- /window -apk0 +l @ToolBar 0 0 89 349
- /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ "
- }
- ; if ($did == 58) { /set %pweditor.insertobject Image | /insertobject }
- ; if ($did == 59) { /set %pweditor.insertobject Button | /insertobject }
- ; if ($did == 60) { /set %pweditor.insertobject Text | /insertobject }
- ; if ($did == 7) { /set %pweditor.insertobject Selection | /insertobject }
- ; if ($did == 8) { /set %pweditor.insertobject Erase | /insertobject }
- ; if ($did == 39) { /set %pweditor.insertobject List Box | /insertobject }
- ; if ($did == 22) { /set %pweditor.insertobject Check Box | /insertobject }
- ; if ($did == 23) { /set %pweditor.insertobject Drop Menu | /insertobject }
- ; if ($did == 24) { /set %pweditor.insertobject Link | /insertobject }
- ; if ($did == 41) { /set %pweditor.insertobject Box | /insertobject }
- menu @Toolbar {
- sclick: {
- 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 }
- else {
- 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 }
- else {
- 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 }
- else {
- 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 }
- else {
- 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 }
- else {
- if ($inrect($mouse.x,$mouse.y,0,197,30,30) == $true) { /drawrect -d @ToolBar 4 1 5 197 34 34 | halt }
- else {
- if ($inrect($mouse.x,$mouse.y,42,5,30,30) == $true) { /drawrect -d @ToolBar 4 1 42 5 34 34 | halt }
- else {
- 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 }
- else {
- if ($inrect($mouse.x,$mouse.y,42,85,30,30) == $true) { /drawrect -d @ToolBar 4 1 42 85 34 34 | halt }
- else {
- if ($inrect($mouse.x,$mouse.y,42,120,30,30) == $true) { /drawrect -d @ToolBar 4 1 42 120 34 34 | halt }
- else {
- 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 }
- else {
- if ($inrect($mouse.x,$mouse.y,42,197,30,30) == $true) { /drawrect -d @ToolBar 4 1 42 197 34 34 | halt }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- mouse: {
- if ($inrect($mouse.x,$mouse.y,0,0,89,349) == $true) {
- 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 }
- else {
- 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 }
- else {
- 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 }
- else {
- 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 }
- else {
- 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 }
- else {
- 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 }
- else {
- 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 }
- else {
- 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 }
- else {
- 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 }
- else {
- 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 }
- else {
- 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 }
- else {
- 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 }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- ;--------------------------------------------------------------------
- ;When the user Selects a object and wants to resize a button this
- ;menu will be activated.
- ;====================================================================
- #buttonresize off
- ...
- menu @PWEditor {
- sclick: {
- 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) {
- /echo -s working
- }
- }
- }
- ...
- #buttonresize end
- ;--------------------------------------------------------------------
- ;When the user chooses to insert a IMAGE this menu will be activated
- ;====================================================================
- #insertimage off
- ...
- menu @PWEditor {
- sclick: {
- /set %pweditor.imagelocation $sfile(" $+ $+ %pweditor.scriptdir $+ $+ ",Locate the image you wish to insert.,Select)
- if ($exists(" $+ %pweditor.imagelocation $+ ") != $false) { goto next1 }
- else { /did -i pweditor 33 1 The file you are trying to load dose not exist. | /.disable #insertimage | halt }
- :next1
- if ($gettok(%pweditor.imagelocation, $+ $numtok( $+ %pweditor.imagelocation $+ ,46) $+ ,46) == bmp) { goto next2 }
- elseif ($gettok(%pweditor.imagelocation, $+ $numtok( $+ %pweditor.imagelocation $+ ,46) $+ ,46) == jpg) { goto next2 }
- 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 }
- :next2
- /set %PWEditor.ximagloc $mouse.x
- /set %PWEditor.yimagloc $mouse.y
- if ($inrect( $+ %PWEditor.ximagloc $+ , $+ %PWEditor.yimagloc $+ ,0,0, $+ %Pweditor.width $+ , $+ %Pweditor.length $+ ) == $true) {
- /set %PWEditor.imagwidth $pic(%pweditor.imagelocation).width
- /set %PWEditor.imagheight $pic(%pweditor.imagelocation).height
- /did -i pweditor 17 1 %PWEditor.ximagloc
- /did -i pweditor 10 1 %PWEditor.yimagloc
- /did -i pweditor 9 1 %PWEditor.imagwidth
- /did -i pweditor 11 1 %PWEditor.imagheight
- }
- /countobjects
- inc %pwe.totalimage
- /write " $+ %pwe.openfile $+ $+ " Image $+ %pwe.totalimage $+ : drawpic -hs @PWEditor %PWEditor.ximagloc %PWEditor.yimagloc %PWEditor.imagwidth %PWEditor.imagheight " $+ %pweditor.imagelocation $+ "
- /did -i pweditor 33 1 Image Inserted successfully...
- /unset %PWEditor.ximagloc
- /unset %PWEditor.yimagloc
- /unset %pweditor.imagelocation
- /unset %PWEditor.imagwidth
- /unset %PWEditor.imagheight
- /createproject
- /.disable #insertimage
- }
- }
- ...
- #insertimage end
- ;--------------------------------------------------------------------
- ;When the user chooses to insert a Link this menu will be activated
- ;====================================================================
- #insertlink off
- ...
- menu @PWEditor {
- sclick: {
- /set %PWEditor.xtxtloc $mouse.x
- /set %PWEditor.ytxtloc $mouse.y
- if (%pwe.temptext == $chr(32)) { /did -i pweditor 33 1 Unable to insert text. | /.disable #inserttext | halt }
- else { /set %pwe.temptext $$?="Enter the text you wish to insert here." }
- /set %pweditor.tempurl $$?="Enter the url for this link."
- /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
- /set %PWEditor.linkwidth $calc(10 * %pwe.txtnum + 5)
- /set %PWEditor.linkheight 21
- /set %PWEditor.Line2y $calc(%PWEditor.ytxtloc + 16)
- /countobjects
- inc %pwe.totallink
- ;%PWEditor.linkwidth + %pwe.blanktokens
- /set %pwe.widthx $calc(%PWEditor.xtxtloc + %PWEditor.linkwidth)
- ;/echo -s $calc(%PWEditor.xtxtloc + %PWEditor.linkwidth)
- ;/echo -s %PWEditor.xtxtloc %PWEditor.linkwidth
- /set %pwe.widthy $calc(%PWEditor.ytxtloc + 16 \ 4.5)
- ;/echo -s %pwe.widthx %pwe.widthy
- /write " $+ %pwe.openfile $+ $+ " Link $+ %pwe.totallink $+ -BG : drawrect -f @PWEditor %BGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.linkwidth %PWEditor.linkheight
- /write " $+ %pwe.openfile $+ $+ " Link $+ %pwe.totallink $+ -Text: drawtext -hb @PWEditor %FGsel.color %BGsel.color %PWEditor.xtxtloc %PWEditor.ytxtloc %pwe.temptext
- /write " $+ %pwe.openfile $+ $+ " Link $+ %pwe.totallink $+ -Line: drawline -i @PWEditor %FGsel.color 2 %PWEditor.xtxtloc %PWEditor.Line2y %pwe.widthx %pwe.widthy
- ;/echo -s drawline -i @PWEditor %FGsel.color 2 %PWEditor.xtxtloc %PWEditor.Line2y %PWEditor.widthx %PWEditor.widthy
- /write " $+ %pwe.openfile $+ $+ " Link $+ %pwe.totallink $+ -URL: %pweditor.tempurl
- /did -i pweditor 33 1 Link Inserted successfully...
- /unset %PWEditor.xtxtloc
- /unset %PWEditor.ytxtloc
- /unset %pweditor.temptext
- /.disable #insertlink
- /createproject
- /unset %PWEditor.xtxtloc
- /unset %PWEditor.ytxtloc
- }
- }
- ...
- #insertlink end
- ;--------------------------------------------------------------------
- ;When the user chooses to insert a TEXT this menu will be activated
- ;====================================================================
- #inserttext off
- ...
- menu @PWEditor {
- sclick: {
- /set %PWEditor.xtxtloc $mouse.x
- /set %PWEditor.ytxtloc $mouse.y
- ;/set %PWEditor.xtxtloc $did(Pweditor,10)
- ;/set %PWEditor.ytxtloc $did(Pweditor,17)
- if (%pweditor.temptext == $chr(32)) { /did -i pweditor 33 1 Unable to insert text. | /.disable #inserttext | halt }
- else { /set %pweditor.temptext $$?="Enter the text you wish to insert here." }
- /countobjects
- /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
- inc %pwe.totalstattext
- /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
- /did -i pweditor 33 1 Text Inserted successfully...
- /createproject
- /.disable #inserttext
- /unset %PWEditor.xtxtloc
- /unset %PWEditor.ytxtloc
- /unset %pweditor.temptext
- ;/unset %PWEditor.xtxtloc
- ;/unset %PWEditor.ytxtloc
- }
- }
- ...
- #inserttext end
- ;--------------------------------------------------------------------
- ;When the user chooses to insert a DynamicTEXT this menu will be activated
- ;====================================================================
- #insertdyntext off
- ...
- menu @PWEditor {
- sclick: {
- /set %PWEditor.xtxtloc $mouse.x
- /set %PWEditor.ytxtloc $mouse.y
- ;/set %PWEditor.xtxtloc $did(Pweditor,10)
- ;/set %PWEditor.ytxtloc $did(Pweditor,17)
- if (%pweditor.temptext == $chr(32)) { /did -i pweditor 33 1 Unable to insert text. | /.disable #inserttext | halt }
- else { /set %pweditor.temptext $$?="Enter the text you wish to insert here." }
- /countobjects
- /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
- inc %pwe.totaldyntext
- /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
- /did -i pweditor 33 1 Dynamic text inserted successfully...
- /createproject
- /.disable #insertdyntext
- /unset %PWEditor.xtxtloc
- /unset %PWEditor.ytxtloc
- /unset %pweditor.temptext
- ;/unset %PWEditor.xtxtloc
- ;/unset %PWEditor.ytxtloc
- }
- }
- ...
- #insertdyntext end
- ;--------------------------------------------------------------------
- ;When the user chooses to insert a BUTTON this menu will be activated
- ;====================================================================
- #insertbutton off
- ...
- menu @PWEditor {
- sclick: {
- /set %PWEditor.xstartloc $mouse.x
- /set %PWEditor.ystartloc $mouse.y
- /set %pwe.temptxt $$?="Enter Caption for this button."
- /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
- /set %PWEditor.butwidth $calc(9 * %pwe.txtnum + 5)
- /set %PWEditor.butheight 21
- /countobjects
- inc %pwe.totalbuttons
- /write " $+ %pwe.openfile $+ $+ " Button $+ %pwe.totalbuttons $+ -Shadow: drawrect -fd @PWEditor 14 1 $calc(%PWEditor.xstartloc + 2) $calc(%PWEditor.ystartloc + 2) %PWEditor.butwidth %PWEditor.butheight
- /write " $+ %pwe.openfile $+ $+ " Button $+ %pwe.totalbuttons $+ -BG: drawrect -fd @PWEditor 15 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.butwidth %PWEditor.butheight
- /write " $+ %pwe.openfile $+ $+ " Button $+ %pwe.totalbuttons $+ -Overlay: drawrect -d @PWEditor %FGsel.color %BGsel.color %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.butwidth %PWEditor.butheight
- /set %PWEditor.textlocx $calc(%PWEditor.xstartloc + 6)
- /set %PWEditor.textlocy $calc(%PWEditor.ystartloc + 3)
- /set %PWEditor.Line2y $calc(%PWEditor.ystartloc + %PWEditor.butheight - 3)
- /set %PWEditor.Line1y $calc(%PWEditor.ystartloc + 1)
- /write " $+ %pwe.openfile $+ $+ " Button $+ %pwe.totalbuttons $+ -Text: drawtext -hb @PWEditor %FGsel.color 15 %PWEditor.textlocx %PWEditor.textlocy %pwe.temptxt
- /write " $+ %pwe.openfile $+ $+ " Button $+ %pwe.totalbuttons $+ -Top: drawreplace @PWEditor 15 0 %PWEditor.xstartloc %PWEditor.Line1y %PWEditor.butwidth 2
- /write " $+ %pwe.openfile $+ $+ " Button $+ %pwe.totalbuttons $+ -Bottom: drawreplace @PWEditor 15 14 %PWEditor.xstartloc %PWEditor.Line2y %PWEditor.butwidth 2
- ;%PWEditor.butwidth 2
- /did -i pweditor 33 1 Button successfully inserted...
- /unset %PWEditor.butwidth
- /unset %PWEditor.butheight
- /unset %PWEditor.xstartloc
- /unset %PWEditor.ystartloc
- /.disable #insertbutton
- /createproject
- }
- }
- ...
- #insertbutton end
- ;--------------------------------------------------------------------
- ;When the user chooses to insert a TextBox this menu will be activated
- ;====================================================================
- #inserttextbox off
- ...
- menu @PWEditor {
- sclick: {
- /set %PWEditor.xstartloc $mouse.x
- /set %PWEditor.ystartloc $mouse.y
- /set %pwe.temptxt $$?="Enter starting text for this textbox."
- /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
- /set %PWEditor.butwidth $calc(9 * %pwe.txtnum + 5)
- /set %PWEditor.butheight 21
- /countobjects
- inc %pwe.totaltxtbox
- /write " $+ %pwe.openfile $+ $+ " TextBox $+ %pwe.totaltxtbox $+ -Shadow: drawrect -fd @PWEditor 14 1 $calc(%PWEditor.xstartloc + 2) $calc(%PWEditor.ystartloc + 2) %PWEditor.butwidth %PWEditor.butheight
- /write " $+ %pwe.openfile $+ $+ " TextBox $+ %pwe.totaltxtbox $+ -BG: drawrect -fd @PWEditor %BGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.butwidth %PWEditor.butheight
- /write " $+ %pwe.openfile $+ $+ " TextBox $+ %pwe.totaltxtbox $+ -Overlay: drawrect -d @PWEditor %FGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.butwidth %PWEditor.butheight
- /set %PWEditor.textlocx $calc(%PWEditor.xstartloc + 6)
- /set %PWEditor.textlocy $calc(%PWEditor.ystartloc + 3)
- /set %PWEditor.Line2y $calc(%PWEditor.ystartloc + %PWEditor.butheight - 2)
- /set %PWEditor.Line1y $calc(%PWEditor.ystartloc + 2)
- /write " $+ %pwe.openfile $+ $+ " Textbox $+ %pwe.totaltxtbox $+ -Text: drawtext -hb @PWEditor %FGsel.color %BGsel.color %PWEditor.textlocx %PWEditor.textlocy %pwe.temptxt
- /write " $+ %pwe.openfile $+ $+ " Textbox $+ %pwe.totaltxtbox $+ -Top: drawreplace @PWEditor 15 0 %PWEditor.xstartloc %PWEditor.Line1y %PWEditor.butwidth 1
- /write " $+ %pwe.openfile $+ $+ " Textbox $+ %pwe.totaltxtbox $+ -Bottom: drawreplace @PWEditor 15 14 %PWEditor.xstartloc %PWEditor.Line2y %PWEditor.butwidth 2
- ;%PWEditor.butwidth 2
- /did -i pweditor 33 1 TextBox successfully inserted...
- /unset %PWEditor.butwidth
- /unset %PWEditor.butheight
- /unset %PWEditor.xstartloc
- /unset %PWEditor.ystartloc
- /.disable #inserttextbox
- /createproject
- }
- }
- ...
- #inserttextbox end
- ;--------------------------------------------------------------------
- ;When the user chooses to insert a GroupBox this menu will be activated
- ;====================================================================
- #insertgroupbox off
- ...
- menu @PWEditor {
- sclick: {
- /set %PWEditor.xstartloc $mouse.x
- /set %PWEditor.ystartloc $mouse.y
- /set %pwe.temptxt $$?="Enter caption for this groupbox."
- /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
- /set %PWEditor.boxwidth $calc(9 * %pwe.txtnum + 15)
- /set %PWEditor.boxhight 60
- /countobjects
- inc %pwe.totalgroupbox
- /write " $+ %pwe.openfile $+ $+ " GroupBox $+ %pwe.totalgroupbox $+ -Shadow: drawrect -fd @PWEditor 14 1 $calc(%PWEditor.xstartloc + 2) $calc(%PWEditor.ystartloc + 2) %PWEditor.boxwidth %PWEditor.boxhight
- /write " $+ %pwe.openfile $+ $+ " GroupBox $+ %pwe.totalgroupbox $+ -BG: drawrect -fd @PWEditor %BGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.boxwidth %PWEditor.boxhight
- /write " $+ %pwe.openfile $+ $+ " GroupBox $+ %pwe.totalgroupbox $+ -Overlay: drawrect -d @PWEditor %FGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.boxwidth %PWEditor.boxhight
- /set %PWEditor.textlocx $calc(%PWEditor.xstartloc + 6)
- /set %PWEditor.textlocy $calc(%PWEditor.ystartloc - 8)
- /set %PWEditor.Line2y $calc(%PWEditor.ystartloc + %PWEditor.boxhight - 2)
- /set %PWEditor.Line1y $calc(%PWEditor.ystartloc + 2)
- /write " $+ %pwe.openfile $+ $+ " Groupbox $+ %pwe.totalgroupbox $+ -Text: drawtext -hb @PWEditor %FGsel.color %BGsel.color %PWEditor.textlocx %PWEditor.textlocy %pwe.temptxt
- /write " $+ %pwe.openfile $+ $+ " Groupbox $+ %pwe.totalgroupbox $+ -Top: drawreplace @PWEditor 15 0 %PWEditor.xstartloc %PWEditor.Line1y %PWEditor.boxwidth 1
- /write " $+ %pwe.openfile $+ $+ " Groupbox $+ %pwe.totalgroupbox $+ -Bottom: drawreplace @PWEditor 15 14 %PWEditor.xstartloc %PWEditor.Line2y %PWEditor.boxwidth 2
- ;%PWEditor.butwidth 2
- /did -i pweditor 33 1 GroupBox successfully inserted...
- /unset %PWEditor.boxwidth
- /unset %PWEditor.boxhight
- /unset %PWEditor.xstartloc
- /unset %PWEditor.ystartloc
- /.disable #insertgroupbox
- /createproject
- }
- }
- ...
- #insertgroupbox end
- ;--------------------------------------------------------------------
- ;When the user chooses to insert a CheckBox this menu will be activated
- ;====================================================================
- #insertcheckbox on
- ...
- menu @PWEditor {
- sclick: {
- /set %PWEditor.xstartloc $mouse.x
- /set %PWEditor.ystartloc $mouse.y
- /set %pwe.temptxt $$?="Enter starting value for this check box. Eg. " $+ $chr(34) $+"1" $+ $chr(34) $+"
- /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
- /set %PWEditor.checkwidth 15
- /set %PWEditor.checkheight 15
- /countobjects
- inc %pwe.totalcheckbox
- /write " $+ %pwe.openfile $+ $+ " CheckBox $+ %pwe.totalcheckbox $+ -Shadow: drawrect -f @PWEditor 14 1 $calc(%PWEditor.xstartloc + 2) $calc(%PWEditor.ystartloc + 2) %PWEditor.checkwidth %PWEditor.checkheight
- /write " $+ %pwe.openfile $+ $+ " CheckBox $+ %pwe.totalcheckbox $+ -BG: drawrect -f @PWEditor %BGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.checkwidth %PWEditor.checkheight
- /write " $+ %pwe.openfile $+ $+ " CheckBox $+ %pwe.totalcheckbox $+ -Overlay: drawrect @PWEditor %FGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.checkwidth %PWEditor.checkheight
- /set %pwe.innerwidth $calc(%PWEditor.checkwidth - 3)
- /set %pwe.innerheight $calc(%PWEditor.checkheight - 3)
- /set %pwe.innerx $calc(%PWEditor.xstartloc + 2)
- /set %pwe.innery $calc(%PWEditor.ystartloc + 2)
- /write " $+ %pwe.openfile $+ $+ " CheckBox $+ %pwe.totalcheckbox $+ -Overlay: drawrect @PWEditor 15 1 %pwe.innerx %pwe.innery %pwe.innerwidth %pwe.innerheight
- /set %PWEditor.checklocx $calc(%PWEditor.xstartloc + 6)
- /set %PWEditor.checklocy $calc(%PWEditor.ystartloc + 3)
- /set %PWEditor.Line2y $calc(%PWEditor.ystartloc + %PWEditor.checkheight - 2)
- /set %PWEditor.Line1y $calc(%PWEditor.ystartloc + 2)
- ;/write " $+ %pwe.openfile $+ $+ " Checkbox $+ %pwe.totalcheckbox $+ -Text: drawtext -hb @PWEditor %FGsel.color %BGsel.color %PWEditor.checklocx %PWEditor.checklocy %pwe.temptxt
- /write " $+ %pwe.openfile $+ $+ " Check $+ %pwe.totalcheckbox $+ -Top: drawreplace @PWEditor 15 0 %PWEditor.xstartloc %PWEditor.Line1y %PWEditor.checkwidth 1
- /write " $+ %pwe.openfile $+ $+ " Check $+ %pwe.totalcheckbox $+ -Bottom: drawreplace @PWEditor 15 15 %PWEditor.xstartloc %PWEditor.Line2y %PWEditor.checkwidth 2
- ;%PWEditor.checkwidth 2
- /did -i pweditor 33 1 CheckBox successfully inserted...
- /unset %PWEditor.checkwidth
- /unset %PWEditor.checkhight
- /unset %PWEditor.xstartloc
- /unset %PWEditor.ystartloc
- /.disable #insertcheckbox
- /createproject
- }
- }
- ...
- #insertcheckbox end
- ;--------------------------------------------------------------------
- ;When the user chooses to insert a CheckBox this menu will be activated
- ;====================================================================
- #insertradio off
- ...
- menu @PWEditor {
- sclick: {
- /set %PWEditor.xstartloc $mouse.x
- /set %PWEditor.ystartloc $mouse.y
- /set %pwe.temptxt $$?="Enter starting value for this check box. Eg. " $+ $chr(34) $+"1" $+ $chr(34) $+"
- /set %pwe.txtnum $width(%pwe.temptxt,arial,1)
- /set %PWEditor.checkwidth 15
- /set %PWEditor.checkheight 15
- /countobjects
- inc %pwe.totalcheckbox
- /write " $+ %pwe.openfile $+ $+ " RadioBox $+ %pwe.totalcheckbox $+ -Shadow: drawrect -fd @PWEditor 14 1 $calc(%PWEditor.xstartloc + 2) $calc(%PWEditor.ystartloc + 2) %PWEditor.checkwidth %PWEditor.checkheight
- /write " $+ %pwe.openfile $+ $+ " Radiobox $+ %pwe.totalcheckbox $+ -BG: drawrect -fd @PWEditor %BGsel.color 1 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.checkwidth %PWEditor.checkheight
- /write " $+ %pwe.openfile $+ $+ " RadioBox $+ %pwe.totalcheckbox $+ -Overlay: drawrect -d @PWEditor %FGsel.color 2 %PWEditor.xstartloc %PWEditor.ystartloc %PWEditor.checkwidth %PWEditor.checkheight
- /set %pwe.innerwidth $calc(%PWEditor.checkwidth - 2)
- /set %pwe.innerheight $calc(%PWEditor.checkheight - 2)
- /set %pwe.innerx $calc(%PWEditor.xstartloc + 2)
- /set %pwe.innery $calc(%PWEditor.ystartloc + 2)
- /write " $+ %pwe.openfile $+ $+ " RadioBox $+ %pwe.totalcheckbox $+ -Overlay: drawrect -d @PWEditor 15 2 %pwe.innerx %pwe.innery %pwe.innerwidth %pwe.innerheight
- /set %PWEditor.checklocx $calc(%PWEditor.xstartloc + 6)
- /set %PWEditor.checklocy $calc(%PWEditor.ystartloc + 3)
- /set %PWEditor.Line2y $calc(%PWEditor.ystartloc + %PWEditor.checkheight - 2)
- /set %PWEditor.Line1y $calc(%PWEditor.ystartloc + 2)
- ;/write " $+ %pwe.openfile $+ $+ " Radiobox $+ %pwe.totalcheckbox $+ -Text: drawtext -hb @PWEditor %FGsel.color %BGsel.color %PWEditor.checklocx %PWEditor.checklocy %pwe.temptxt
- /write " $+ %pwe.openfile $+ $+ " Radio $+ %pwe.totalcheckbox $+ -Top: drawreplace @PWEditor 15 0 %PWEditor.xstartloc %PWEditor.Line1y %PWEditor.checkwidth 1
- /write " $+ %pwe.openfile $+ $+ " Radio $+ %pwe.totalcheckbox $+ -Bottom: drawreplace @PWEditor 15 14 %PWEditor.xstartloc %PWEditor.Line2y %PWEditor.checkwidth 2
- ;%PWEditor.checkwidth 2
- /did -i pweditor 33 1 CheckBox successfully inserted...
- /unset %PWEditor.checkwidth
- /unset %PWEditor.checkhight
- /unset %PWEditor.xstartloc
- /unset %PWEditor.ystartloc
- /.disable #insertcheckbox
- /createproject
- }
- }
- ...
- #insertradio end
- ;--------------------------------------------------------------------
- ;Alias's Basicly Explain them Self
- ;====================================================================
- alias f3 {
- /dialog -mav PWEditor PWEditor
- }
- alias countobjects {
- /set %pwe.countobj 0
- /set %pwe.totalbuttons 0
- /set %pwe.totalstattext 0
- /set %pwe.totaldnytext 0
- /set %pwe.totaltxtbox 0
- /set %pwe.totalimage 0
- /set %pwe.totalgroupbox 0
- /set %pwe.totalcheckbox 0
- /set %pwe.totallink 0
- while (%pwe.countobj < $lines( $+ %pwe.openfile $+ )) {
- inc %pwe.countobj
- if (( $+ BG isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) && (Button isin $read( $+ %pwe.openfile $+ ,%pwe.countobj))) {
- inc %pwe.totalbuttons
- }
- if (StaticText isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- inc %pwe.totalstattext
- }
- if (DynamicText isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- inc %pwe.totaldyntext
- }
- if ((BG isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) && (TextBox isin $read( $+ %pwe.openfile $+ ,%pwe.countobj))) {
- inc %pwe.totaltxtbox
- }
- if (Image $+ %pwe.countobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- inc %pwe.totalimage
- }
- if ((BG isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) && (GroupBox isin $read( $+ %pwe.openfile $+ ,%pwe.countobj))) {
- inc %pwe.totalgroupbox
- }
- if ((BG isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) && (CheckBox isin $read( $+ %pwe.openfile $+ ,%pwe.countobj))) {
- inc %pwe.totalcheckbox
- }
- if (Link isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- inc %pwe.totallink
- }
- }
- }
- alias checkforduplicateeventthenpopulate {
- /set %pwe.dupnum 0
- /did -r pwe_eventeditor 2
- :nextline
- while (%pwe.dupnum < $lines( $+ %pwe.openeventfile $+ )) {
- inc %pwe.dupnum
- if (Window events for: isin $read( $+ %pwe.openeventfile $+ ,%pwe.dupnum)) {
- goto skipaline
- }
- if (alias $did(pwe_eventeditor,5).seltext $+ - $+ $did(pwe_eventeditor,6).seltext isin $read( $+ %pwe.openeventfile $+ ,%pwe.dupnum)) {
- /did -a pwe_eventeditor 2 $read( $+ %pwe.openeventfile $+ ,%pwe.dupnum) $+ $crlf
- }
- else {
- 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))) {
- /did -a pwe_eventeditor 2 $remove($read( $+ %pwe.openeventfile $+ ,%pwe.dupnum),$did(pwe_eventeditor,5).text $+ -Code:) $+ $crlf
- }
- else {
- if ((Endof isin $read( $+ %pwe.openeventfile $+ ,%pwe.dupnum)) && ($did(pwe_eventeditor,5).text isin $read( $+ %pwe.openeventfile $+ ,%pwe.dupnum))) {
- /did -a pwe_eventeditor 2 Endof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text
- goto done
- }
- ;/did -a pwe_eventeditor 2 $remove($read( $+ %pwe.openeventfile $+ ,%pwe.dupnum),$did(pwe_eventeditor,5).text $+ - $+ $did(pwe_eventeditor,6).text $+ Code:) $+ $crlf
- }
- }
- :skipaline
- }
- :done
- halt
- }
- alias txtobjectcheck {
- if (%pwe.txtobject == Dynamic) { /.enable #insertdyntext }
- else { /.enable #inserttext }
- }
- alias createproject {
- /set %pwe.winlines 0
- /window -c @PWEditor
- :loop
- while (%pwe.winlines < $lines( $+ %pwe.openfile $+ )) {
- if ($read( $+ %pwe.openfile $+ ,%pwe.winlines) != #This window was Created in PWEditor v1.0 ) { inc %pwe.winlines | goto loop }
- elseif ($read( $+ %pwe.openfile $+ ,%pwe.winlines) == #This window was Created in PWEditor v1.0) { goto next2 }
- else { goto next2 }
- }
- :next2
- inc %pwe.winlines
- ;/echo -s 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),2-,32)
- if ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Open) {
- $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),2-,32)
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next2 }
- }
- elseif ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Fill) {
- $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),2-,32)
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next2 }
- }
- else {
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { goto fillObjectBrowser }
- else {
- if ((URL isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Link isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- goto next2
- }
- else {
- $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),2-,32)
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { goto fillObjectBrowser }
- else { goto next2 }
- }
- }
- }
- :fillObjectBrowser
- /did -r pweditor 59
- /set %pwe.winlines 0
- :loop2
- ;/echo -s got to loop2
- while (%pwe.winlines < $lines( $+ %pwe.openfile $+ $+ )) {
- ;/echo -s In loop2
- ;/echo -s 1 $read( $+ %pwe.openfile $+ ,%pwe.winlines)
- if ($read( $+ %pwe.openfile $+ ,%pwe.winlines) != #This window was Created in PWEditor v1.0 ) { inc %pwe.winlines | goto loop2 }
- elseif ($read( $+ %pwe.openfile $+ ,%pwe.winlines) == #This window was Created in PWEditor v1.0) { goto next3 }
- else { goto next3 }
- :next3
- inc %pwe.winlines
- ;/echo -s 1 $read( $+ %pwe.openfile $+ ,%pwe.winlines)
- if ($gettok($read(%pwe.openfile $+ ,%pwe.winlines),1,58) == Open) {
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next3 }
- }
- elseif ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Fill) {
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next3 }
- }
- else {
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Button isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- goto done
- }
- if ((Area isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Image isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58))
- goto done
- }
- if ((Text isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (StaticText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile,%pwe.winlines),1,32),$chr(58),-Text)
- goto done
- }
- if ((Text isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (DynamicText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-Text)
- goto done
- }
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (TextBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- goto done
- }
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (GroupBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- goto done
- }
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (CheckBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- goto done
- }
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Link isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pweditor 59 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- goto done
- }
- :done
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { goto complete }
- else { goto next3 }
- }
- }
- :complete
- halt
- }
- alias insertobject {
- if ($window(@pweditor,0)) { goto next }
- else { /did -i pweditor 33 1 Unable to insert %pweditor.insertobject $+ . Create a new project then try again. | halt }
- :next
- /.disable #insertimage
- /.disable #insertbutton
- /.disable #inserttext
- /.disable #insertdyntext
- /.disable #inserttextbox
- /.disable #insertlink
- if (%pweditor.insertobject == Image) {
- /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
- /.enable #insertimage
- }
- if (%pweditor.insertobject == Button) {
- /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
- /.enable #insertbutton
- }
- if (%pweditor.insertobject == Text) {
- /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
- /dialog -mav pwe_txtobject pwe_txtobject
- }
- if (%pweditor.insertobject == TextBox) {
- /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
- /.enable #inserttextbox
- }
- if (%pweditor.insertobject == Selection) {
- /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
- }
- if (%pweditor.insertobject == Erase) {
- /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
- }
- if (%pweditor.insertobject == List Box) {
- /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
- }
- if (%pweditor.insertobject == CheckBox) {
- /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
- /.enable #insertcheckbox
- }
- if (%pweditor.insertobject == Drop Menu) {
- /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
- }
- if (%pweditor.insertobject == Link) {
- /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
- /.enable #insertlink
- }
- if (%pweditor.insertobject == GroupBox) {
- /did -i pweditor 33 1 Select a starting point for this %pweditor.insertobject $+ .
- /.enable #insertgroupbox
- }
- }
- alias refresh {
- /dialog -x PWEditor
- /dialog -mav pweditor pweditor
- }
- alias pwe.objectnum {
- /set %pwe.countobj 0
- /set %pwe.totalbuttons 0
- /set %pwe.totalstattext 0
- /set %pwe.totaldnytext 0
- /set %pwe.totaltxtbox 0
- /set %pwe.totalimage 0
- /set %pwe.totalgroupbox 0
- /set %pwe.totalcheckbox 0
- /set %pwe.totallink 0
- /set %pwe.currentobj 0
- while (%pwe.countobj < $lines( $+ %pwe.openfile $+ )) {
- ;/echo -s Button $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)
- if (%pwe.countobj == $lines( $+ %pwe.openfile $+ )) {
- goto done
- }
- if (Button isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- inc %pwe.totalbuttons
- return %pwe.totalbuttons
- }
- if (StaticText $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- inc %pwe.totalstattext
- /set %pwe.obnum %pwe.totalstattext
- return %pwe.totalstattext
- }
- if (DynamicText $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- inc %pwe.totaldyntext
- /set %pwe.obnum %pwe.totaldyntext
- return %pwe.totaldnytext
- }
- if (TextBox $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- inc %pwe.totaltxtbox
- /set %pwe.obnum %pwe.totaltxtbox
- return %pwe.totaltxtbox
- }
- if (Image $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- inc %pwe.totalimage
- /set %pwe.obnum %pwe.totalimage
- return %pwe.totalimage
- }
- if (GroupBox $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- inc %pwe.totalgroupbox
- /set %pwe.obnum %pwe.totalgroupbox
- return %pwe.totalgroupbox
- }
- if (CheckBox $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- inc %pwe.totalcheckbox
- /set %pwe.obnum %pwe.totalcheckbox
- return %pwe.totalcheckbox
- }
- if (Link $+ %pwe.currentobj isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- inc %pwe.totallink
- /set %pwe.obnum %pwe.totallink
- return %pwe.totallink
- }
- }
- :done
- halt
- }
- alias wirteobjectchange {
- /set %pwe.objnum 1
- /set %pwe.currentobj 0
- /countobjects
- while (%pwe.objnum < $lines(%pwe.openfile $+ )) {
- if (Fill isin $read( $+ %pwe.openfile $+ ,%pwe.countobj)) {
- /set %pwe.currentobj 0
- }
- if ($did(pweditor,56).state == 1) {
- /set %pwe.editswitch -d
- }
- else {
- /set %pwe.editswitch -
- }
- inc %pwe.currentobj
- ;============Edit Object
- ;/echo -s Checking Object
- if (($did(pweditor,27).text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum)) && (Shadow isin $read( $+ %pwe.openfile $+ ,%pwe.objnum))) {
- /write -dl $+ %pwe.objnum " $+ %pwe.openfile $+ $+ "
- /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
- goto editBG
- }
- :editBG
- inc %pwe.currentobj
- if (($did(pweditor,27).text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum)) && (BG isin $read( $+ %pwe.openfile $+ ,%pwe.objnum))) {
- /write -dl $+ %pwe.objnum " $+ %pwe.openfile $+ $+ "
- if (Button isin $did(pweditor,27).text) {
- /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
- }
- else {
- /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
- }
- goto editOverlay
- }
- :editOverlay
- inc %pwe.currentobj
- if (($did(pweditor,27).text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum)) && (Overlay isin $read( $+ %pwe.openfile $+ ,%pwe.objnum))) {
- /write -dl $+ %pwe.objnum " $+ %pwe.openfile $+ $+ "
- /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
- goto editText
- }
- :editText
- inc %pwe.currentobj
- if (($did(pweditor,27).text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum)) && (-Text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum))) {
- /write -dl $+ %pwe.objnum " $+ %pwe.openfile $+ $+ "
- /set %pwe.newtextloc $calc($did(pweditor,25).text / 4)
- /set %pwe.newtxtX $calc($did(pweditor,25).text + %pwe.newtextloc)
- if (Button isin $did(pweditor,27).text) {
- /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
- }
- elseif (GroupBox isin $did(pweditor,27).text) {
- /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
- }
- else {
- /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
- }
- goto topline
- }
- :topline
- inc %pwe.currentobj
- /set %pwe.newlinex $did(pweditor,25).text
- /set %pwe.newliney $did(pweditor,35).text
- /set %pwe.newbuttonwidth $did(pweditor,12).text
- /set %pwe.newbuttonheight $did(pweditor,4).text
- /set %PWEditor.Line2y $calc(%pwe.newliney + %pwe.newbuttonheight - 3)
- /set %PWEditor.Line1y $calc(%pwe.newliney + 1)
- /set %pwe.newnewlineX $calc(%pwe.newlinex + %pwe.newbuttonheight - 3)
- if (($did(pweditor,27).text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum)) && (-Top isin $read( $+ %pwe.openfile $+ ,%pwe.objnum))) {
- if (Button isin $did(pweditor,27).text) {
- /write -dl $+ %pwe.objnum " $+ %pwe.openfile $+ $+ "
- /write -il $+ %pwe.objnum " $+ %pwe.openfile $+ $+ " $did(pweditor,27).text $+ -Top: drawreplace @PWEditor 15 0 %pwe.newlineX %PWEditor.Line1y %pwe.newbuttonwidth 2
- goto bottom
- }
- }
- :bottom
- if (($did(pweditor,27).text isin $read( $+ %pwe.openfile $+ ,%pwe.objnum)) && (-Bottom isin $read( $+ %pwe.openfile $+ ,%pwe.objnum))) {
- if (Button isin $did(pweditor,27).text) {
- /write -dl $+ %pwe.objnum " $+ %pwe.openfile $+ $+ "
- /write -il $+ %pwe.objnum " $+ %pwe.openfile $+ $+ " $did(pweditor,27).text $+ -Bottom: drawreplace @PWEditor 15 14 %pwe.newlineX %PWEditor.Line2y %pwe.newbuttonwidth 2
- }
- }
- :nextline
- inc %pwe.objnum
- }
- :done
- /createproject
- /did -o pweditor 33 1 Done modifying $did(pweditor,27).text $+ .
- }
- ;--------------------------------------------------------------------
- ;Whenever a button is clicked, a menu is selected, or data is changed
- ;in a dialog these events will be activated.
- ;====================================================================
- on 1:dialog:pwe_txtobject:sclick:1: {
- /set %pwe.txtobject Dynamic
- /txtobjectcheck
- /unset %pwe.txtobject
- /dialog -x pwe_txtobject
- }
- on 1:dialog:pwe_txtobject:sclick:2: {
- /set %pwe.txtobject Static
- /txtobjectcheck
- /unset %pwe.txtobject
- /dialog -x pwe_txtobject
- }
- on 1:dialog:pweditor:sclick:38: {
- /did -o pweditor 33 1 Modifying $did(pweditor,27).text please wait.
- /wirteobjectchange
- }
- ;--------------------------------------------------------------------
- ;Whenever a button is clicked in the main dialog, a menu is selected, or data is changed
- ;in a dialog these events will be activated.
- ;====================================================================
- on 1:dialog:pwe_eventeditor:sclick:4: {
- /dialog -x pwe_eventeditor
- }
- on 1:dialog:pweditor:sclick:60: {
- if ($?!=("Are you sure you want to remove " $+ $did(pweditor,59).seltext $+ " from your project?") == $true) {
- /set %pwe.winlines 0
- while (%pwe.winlines < $lines( $+ %pwe.openfile $+ )) {
- if ($did(pweditor,59).seltext isin $read( $+ %pwe.openfile $+ ,%pwe.winlines)) {
- /write -dl $+ %pwe.winlines " $+ %pwe.openfile $+ -pw.ini $+ "
- }
- inc %pwe.winlines
- }
- }
- /createproject
- }
- on 1:dialog:pweditor:dclick:59: {
- /set %PWEditor.xstartloc $did(Pweditor,10)
- /set %PWEditor.ystartloc $did(Pweditor,17)
- /set %pwe.winlines 0
- :loop
- /did -i pweditor 33 1 Gathering %pweditor.insertobject information please wait...
- while (%pwe.winlines < $lines( $+ %pwe.openfile $+ )) {
- if ($read( $+ %pwe.openfile $+ ,%pwe.winlines) != #This window was Created in PWEditor v1.0 ) { inc %pwe.winlines | goto loop }
- elseif ($read( $+ %pwe.openfile $+ ,%pwe.winlines) == #This window was Created in PWEditor v1.0) { goto next2 }
- else { goto next2 }
- :next2
- inc %pwe.winlines
- if ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Open) {
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next2 }
- }
- elseif ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Fill) {
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next2 }
- }
- else {
- ;/echo -s $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)
- if (Image isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58))
- /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9-,32)
- /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 12 1 $gettok($read( $+ %pweditor.sir $+ Documents\ $+ %pweditor.tempwindowname $+ -pw.ini,%pwe.winlines),7,32)
- /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- goto done
- }
- if (StaticText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- /did -i PWEditor 27 1 $remove( $+ $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58)),-Text))
- /did -i PWEditor 32 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),11-,32), $+ $chr(58) $+ )
- /did -r PWEditor 9
- /did -r PWEditor 11
- /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- goto done
- }
- if (DynamicText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32), $+ $chr(58) $+ )
- /did -i PWEditor 32 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),12-,32), $+ $chr(58) $+ )
- /did -r PWEditor 9
- /did -r PWEditor 11
- /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),11,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),12,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- goto done
- }
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && ( $+ $did(pweditor,59).seltext isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- ;/echo -s found gather box
- /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),9-,32),32)
- goto done
- }
- if (Link isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32)) {
- /did -i PWEditor 27 1 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58) ,BG)
- /did -i PWEditor 9 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 12 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),9,32)
- /did -i PWEditor 11 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 4 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),10,32)
- /did -i PWEditor 25 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),7,32)
- /did -i PWEditor 35 1 $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),8,32)
- /did -i PWEditor 32 1 $gettok($read( $+ %pwe.openfile $+ , $+ $calc( %pwe.winlines + 2 )),9-,32),32)
- goto done
- }
- :done
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { /did -o pweditor 33 1 Done Gathering %pweditor.insertobject information. | halt }
- else { goto next2 }
- }
- }
- }
- on 1:dialog:pwe_eventeditor:sclick:6: {
- /set %pwe.winlines 0
- :loop
- /countobjects
- /did -r pwe_eventeditor 2
- while (%pwe.winlines < $lines( $+ %pwe.openeventfile $+ )) {
- inc %pwe.winlines
- if (%pwe.winlines == $lines( $+ %pwe.openeventfile $+ )) {
- if ($did(pwe_eventeditor,2).lines == 0) {
- ;/echo -s no lines
- /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
- /write " $+ %pwe.openeventfile $+ $+ " $did(pwe_eventeditor,5).text $+ -Code: Enter you code between these tags $+ $crlf
- /write " $+ %pwe.openeventfile $+ $+ " Endof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
- /reloadcurrentevent
- ;/echo -s healdef1
- halt
- goto done
- }
- else {
- ;/did -r pwe_eventeditor 2
- ;/echo -s checking duplicates.....
- /checkforduplicateeventthenpopulate
- /gathereventscript
- if ($did(pwe_eventeditor,2).lines == 0) {
- /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
- /write " $+ %pwe.openeventfile $+ $+ " $did(pwe_eventeditor,5).text $+ -Code: Enter you code between these tags $+ $crlf
- /write " $+ %pwe.openeventfile $+ $+ " Endof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
- }
- ;/echo -s healdef2
- halt
- goto done
- }
- }
- else {
- if ($did(pwe_eventeditor,2).lines == 0) {
- /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
- /write " $+ %pwe.openeventfile $+ $+ " $did(pwe_eventeditor,5).text $+ -Code: Enter you code between these tags $+ $crlf
- /write " $+ %pwe.openeventfile $+ $+ " Endof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
- haltdef
- }
- ;/echo -s checking duplicates.....
- /checkforduplicateeventthenpopulate
- ;/gathereventscript
- ;/echo -s healdef3
- }
- }
- :done
- }
- alias gathereventscript {
- if ($len($did(pwe_eventeditor,2)text) == 0) {
- /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
- /did -a pwe_eventeditor 2 $did(pwe_eventeditor,5).text $+ -Code: Enter you code between these tags $+ $crlf
- /did -a pwe_eventeditor 2 Endof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
- /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
- /write " $+ %pwe.openeventfile $+ $+ " $did(pwe_eventeditor,5).text $+ -Code: Enter you code between these tags $+ $crlf
- /write " $+ %pwe.openeventfile $+ $+ " Endof $+ $did(pwe_eventeditor,5).text $+ $did(pwe_eventeditor,6).text $+ $crlf
- }
- ;/echo -s Gahter Window Object Event.
- }
- on 1:dialog:pwe_eventeditor:init:0: {
- /set %pwe.winlines 0
- :loop
- while (%pwe.winlines < $lines( $+ %pwe.openfile $+ $+ )) {
- ;;/echo -s 1 $read( $+ %pwe.openfile $+ ,%pwe.winlines)
- if ($read( $+ %pwe.openfile $+ ,%pwe.winlines) != #This window was Created in PWEditor v1.0 ) { inc %pwe.winlines | goto loop }
- elseif ($read( $+ %pwe.openfile $+ ,%pwe.winlines) == #This window was Created in PWEditor v1.0) { goto next2 }
- else { goto next2 }
- :next2
- inc %pwe.winlines
- ;;/echo -s 1 $read( $+ %pwe.openfile $+ ,%pwe.winlines)
- if ($gettok($read(%pwe.openfile $+ ,%pwe.winlines),1,58) == Open) {
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next2 }
- }
- elseif ($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,58) == Fill) {
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { halt }
- else { goto next2 }
- }
- else {
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Button isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- goto done
- }
- if ((Area isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Image isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58))
- goto done
- }
- if ((Text isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (StaticText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile,%pwe.winlines),1,32),$chr(58),-Text)
- goto done
- }
- if ((Text isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (DynamicText isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-Text)
- goto done
- }
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (TextBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- goto done
- }
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (GroupBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- goto done
- }
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (CheckBox isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- goto done
- }
- if ((BG isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58)) && (Link isin $gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1-,58))) {
- /did -a pwe_eventeditor 5 $remove($gettok($read( $+ %pwe.openfile $+ ,%pwe.winlines),1,32),$chr(58),-BG)
- goto done
- }
- :done
- if (%pwe.winlines == $lines( $+ %pwe.openfile $+ )) { goto complete }
- else { goto next2 }
- }
- }
- :complete
- /did -a pwe_eventeditor 6 OnPress
- /did -a pwe_eventeditor 6 OnRelease
- /did -a pwe_eventeditor 6 OnClick
- /did -a pwe_eventeditor 6 OnDoubleClick
- /did -a pwe_eventeditor 6 OnOver
- }
- on 1:dialog:pweditor:close:0: {
- /window -c @PWEditor
- /window -c @Toolbar
- /set %pwe.toolbar 0
- unset %pwe.*
- unset %Pweditor.*
- /.disable #notask
- }
- on 1:dialog:pweditor:menu:8: {
- if (%pwe.toolbar = 1) { /did -o pweditor 8 Show Toolbar | /window -c @ToolBar | /set %pwe.toolbar 0 }
- else { /did -o pweditor 8 Hide Toolbar
- /window -apk0 +l @ToolBar 0 0 89 349
- /drawpic -s @ToolBar 0 0 80 320 " $+ $scriptdirimages\Pwe_toolBar.bmp $+ "
- /set %pwe.toolbar 1
- }
- }
- on 1:dialog:pwe_proman:sclick:7: {
- /set %pwe.browsedir $sdir(%pweditor.scriptdir $+ Documents\)
- /did -o pwe_proman 6 1 %pwe.browsedir
- /set %pwe.filenum 1
- /did -r pwe_proman 1
- while ($nopath($findfile( $+ %pwe.browsedir $+ ,*-pw.ini,%pwe.filenum))) {
- if (Events isin $nopath($findfile( $+ %pwe.browsedir $+ ,*-pw.ini,%pwe.filenum))) { goto skipline }
- /did -a pwe_proman 1 $nopath($findfile( $+ %pwe.browsedir $+ ,*-pw.ini,%pwe.filenum))
- :skipline
- inc %pwe.filenum
- }
- }
- on 1:dialog:pwe_proman:sclick:2: {
- /set %pwe.openeventfile $did(pwe_proman,6).text $+ $replace($did(pwe_proman,1).seltext,-pw.ini,-Events-pw.ini)
- if ($isfile(%pwe.openeventfile) == true) {
- if ($?!=("Are you sure you want to open this file. You will loose your if you continue.") == $true) {
- /set %pwe.openfile $did(pwe_proman,6).text $+ $did(pwe_proman,1).seltext
- /echo -a 1
- }
- else {
- /set %pwe.openfile $did(pwe_proman,6).text $+ $did(pwe_proman,1).seltext
- /echo -a 2
- }
- }
- else {
- /set %pwe.openfile $did(pwe_proman,6).text $+ $did(pwe_proman,1).seltext
- /echo -a 3
- }
- /dialog -x pwe_proman
- /set %Pweditor.width $gettok($read( $+ %pwe.openfile $+ ,2),2,32)
- ;/echo -s %Pweditor.width
- /set %Pweditor.height $gettok($read( $+ %pwe.openfile $+ ,2),4,32)
- ;/echo -s %Pweditor.height
- /set %Pweditor.winx $gettok($read( $+ %pwe.openfile $+ ,3),3,32)
- /set %Pweditor.winy $gettok($read( $+ %pwe.openfile $+ ,3),6,32)
- /set %pweditor.tempwindowname $gettok($read( $+ %pwe.openfile $+ ,1),3,32)
- /createproject
- }
- on 1:dialog:pwe_proman:init:0: {
- /did -a pwe_proman 6 %pweditor.scriptdir $+ Documents\
- /set %pwe.filenum 1
- /.did -r pwe_proman 1
- while ($nopath($findfile( $+ %pweditor.scriptdir $+ Documents\ $+ ,*-pw.ini,%pwe.filenum))) {
- if (Events isin $nopath($findfile( $+ %pweditor.scriptdir $+ Documents\ $+ ,*-pw.ini,%pwe.filenum))) { goto skipline }
- /.did -a pwe_proman 1 $nopath($findfile( $+ %pweditor.scriptdir $+ Documents\ $+ ,*-pw.ini,%pwe.filenum))
- :skipline
- inc %pwe.filenum
- }
- }
- on 1:dialog:pwe_proman:sclick:3: {
- /set %pwe.browsedir $did(pwe_proman,6).text
- if ($?!=("Are you sure you want to delete this file. It will be removed from your HD.") == $true) {
- /.remove -b " $+ %pwe.browsedir $+ $did(pwe_proman,1).seltext $+ "
- /.remove -b " $+ $replace( $+ %pwe.browsedir $+ $did(pwe_proman,1).seltext $+ ,-pw.ini,-Events-pw.ini) $+ "
- /set %pwe.filenum 1
- /did -r pwe_proman 1
- while ($nopath($findfile( $+ %pwe.browsedir $+ ,*-pw.ini,%pwe.filenum))) {
- if (Events isin $nopath($findfile( $+ %pwe.browsedir $+ ,*-pw.ini,%pwe.filenum))) { goto skipline }
- /did -a pwe_proman 1 $nopath($findfile( $+ %pwe.browsedir $+ ,*-pw.ini,%pwe.filenum))
- :skipline
- inc %pwe.filenum
- }
- }
- }
- on 1:dialog:pweditor:menu:81: {
- /dialog -mav pwe_proman pwe_proman
- }
- on 1:dialog:pweditor:menu:1: {
- if ($window(@pweditor,0)) { goto next }
- else { /did -i pweditor 33 1 Unable edit window events . Create a new project then try again. | halt }
- :next
- /dialog -mav pwe_eventeditor pwe_eventeditor
- }
- on 1:dialog:pwe_proman:sclick:5: {
- /dialog -mav pwe_newfile pwe_newfile
- }
- on 1:dialog:pweditor:menu:87: {
- /window -c @PWEditor
- /window -c @Toolbar
- /set %pwe.toolbar 0
- /.disable #notask
- /dialog -x pweditor
- }
- on 1:dialog:pweditor:init:0: {
- /set %pweditor.scriptdir $scriptdir
- ;/set %pweditor.removefromdir $remove( $+ %pweditor.scriptdir $+ ,$chr(48))
- /.disable #inserttext
- /.disable #insertbutton
- /.disable #insertimage
- /.disable #insertgroupbox
- /.disable #insertlink
- /.disable #insertdyntext
- /.disable #buttonend
- /.disable #buttonhight
- /.enable #notask
- }
- on 1:dialog:pweditor:sclick:*: {
- if ($did == 48) { /dialog -mav BG-color_swatches BG-color_swatches }
- if ($did == 47) { /dialog -mav FG-color_swatches FG-color_swatches }
- if ($did == 54) {
- /set %pwe.lyrnum 0
- while (%pwe.lyrnum < $lines( $+ %pwe.openfile,%pwe.lyrnum)) {
- inc %pwe.lyrnum
- }
- }
- if ($did == 55) {
- }
- }
- on 1:dialog:pwe_newfile:sclick:*: {
- if ($did == 5) {
- if ($window(@pweditor,0)) { unset %pwe.* | unset %PWEditor.* | /window -c @pweditor }
- /set %Pweditor.width $did(pwe_newfile,30)
- /set %Pweditor.height $did(pwe_newfile,31)
- /set %Pweditor.winx $did(pwe_newfile,28)
- /set %Pweditor.winy $did(pwe_newfile,29)
- /set %pweditor.tempwindowname $did(pwe_newfile,26).text
- /set %pwe.openfile %pweditor.scriptdir $+ Documents\ $+ %pweditor.tempwindowname $+ -pw.ini
- /set %pwe.openeventfile %pweditor.scriptdir $+ Documents\ $+ %pweditor.tempwindowname $+ -Events-pw.ini
- /write " $+ %pwe.openeventfile $+ " Window events for: %pweditor.tempwindowname
- /write " $+ %pwe.openfile $+ $+ " Window Name: %pweditor.tempwindowname
- /write " $+ %pwe.openfile $+ $+ " Width: %Pweditor.width Height: %Pweditor.width
- /write " $+ %pwe.openfile $+ $+ " X Position: %Pweditor.winx - Y Position: %Pweditor.winy
- /write " $+ %pwe.openfile $+ $+ " FG color: %FGsel.color
- /write " $+ %pwe.openfile $+ $+ " BG color: %BGsel.color
- /write " $+ %pwe.openfile $+ $+ " #This window was Created in PWEditor v1.0
- /write " $+ %pwe.openfile $+ $+ " Open: /.window -abBrg2ik0prwz +et @PWEditor %Pweditor.winx %Pweditor.winy %Pweditor.width %Pweditor.height
- /write " $+ %pwe.openfile $+ $+ " Fill: /.drawfill -hs @PWEditor %BGsel.color %FGsel.color 0 1 %Pweditor.width %Pweditor.height
- /dialog -x pwe_newfile
- /dialog -x pwe_proman
- /createproject
- }
- if ($did == 66) { /dialog -mav FG-color_swatches FG-color_swatches }
- if ($did == 70) { /dialog -mav BG-color_swatches BG-color_swatches }
- }
- on 1:dialog:FG-color_swatches:sclick:*: {
- if (($did < 1) || ($did > 16)) { return }
- else { goto next }
- :next
- if ($did == 1) { /set %FGsel.color 1 }
- if ($did == 2) { /set %FGsel.color 2 }
- if ($did == 3) { /set %FGsel.color 3 }
- if ($did == 4) { /set %FGsel.color 4 }
- if ($did == 5) { /set %FGsel.color 5 }
- if ($did == 6) { /set %FGsel.color 6 }
- if ($did == 7) { /set %FGsel.color 7 }
- if ($did == 8) { /set %FGsel.color 8 }
- if ($did == 9) { /set %FGsel.color 9 }
- if ($did == 10) { /set %FGsel.color 10 }
- if ($did == 11) { /set %FGsel.color 11 }
- if ($did == 12) { /set %FGsel.color 12 }
- if ($did == 13) { /set %FGsel.color 13 }
- if ($did == 14) { /set %FGsel.color 14 }
- if ($did == 15) { /set %FGsel.color 15 }
- if ($did == 16) { /set %FGsel.color 0 }
- if (%FGsel.color == $chr(48)) {
- /set %selected.FGtemp $remove( $+ %pweditor.scriptdir $+ ,$did(FG-color_swatches,16),0)
- /set %selected.FG " $+ $deltok( $+ $remove( $+ $did(FG-color_swatches,16) $+ , $+ $chr(48) $+ ) $+ ,0,32) $+ "
- }
- else {
- /set %selected.FGtemp $remove( $+ %pweditor.scriptdir $+ ,$did(FG-color_swatches,%FGsel.color),0)
- /set %selected.FG " $+ $deltok( $+ $remove( $+ $did(FG-color_swatches,%FGsel.color) $+ , $+ $chr(48) $+ ) $+ ,0,32) $+ "
- }
- if (($dialog(pweditor).active == $true) || (PWE - Picture Window Editor v1.0 isin $dialog(pweditor).title)) { /did -g pweditor 47 %selected.FG }
- if ((New PWE Window isin $dialog(pwe_newfile).title) || ($dialog(pwe_newfile).active == $true)) { /did -g pwe_newfile 66 %selected.FG }
- /dialog -x FG-color_swatches
- }
- on 1:dialog:BG-color_swatches:sclick:*: {
- if (($did < 1) || ($did > 16)) { return }
- else { goto next }
- :next
- if ($did == 1) { /set %BGsel.color 1 }
- if ($did == 2) { /set %BGsel.color 2 }
- if ($did == 3) { /set %BGsel.color 3 }
- if ($did == 4) { /set %BGsel.color 4 }
- if ($did == 5) { /set %BGsel.color 5 }
- if ($did == 6) { /set %BGsel.color 6 }
- if ($did == 7) { /set %BGsel.color 7 }
- if ($did == 8) { /set %BGsel.color 8 }
- if ($did == 9) { /set %BGsel.color 9 }
- if ($did == 10) { /set %BGsel.color 10 }
- if ($did == 11) { /set %BGsel.color 11 }
- if ($did == 12) { /set %BGsel.color 12 }
- if ($did == 13) { /set %BGsel.color 13 }
- if ($did == 14) { /set %BGsel.color 14 }
- if ($did == 15) { /set %BGsel.color 15 }
- if ($did == 16) { /set %BGsel.color 0 }
- if (%BGsel.color == $chr(48)) {
- /set %selected.BGtemp $did(BG-color_swatches,16)
- /set %selected.BG " $+ $deltok( $+ $remove( $+ $did(BG-color_swatches,16) $+ , $+ $chr(48) $+ ) $+ ,0,32) $+ "
- }
- else {
- /set %selected.BGtemp $did(BG-color_swatches,%BGsel.color)
- /set %selected.BG " $+ $deltok( $+ $remove( $+ $did(BG-color_swatches,%BGsel.color) $+ , $+ $chr(48) $+ ) $+ ,0,32) $+ "
- ;/set %selected.BG " $+ $remove( $+ $chr(48) $+ ,$did(BG-color_swatches,%BGsel.color),0) "
- }
- if ((PWE - Picture Window Editor v1.0 isin $dialog(pweditor).title) || ($dialog(pweditor).active == $true)) { /did -g pweditor 48 %selected.BG }
- if ((New PWE Window isin $dialog(pwe_newfile).title) || ($dialog(pwe_newfile).active == $true)) { /did -g pwe_newfile 70 %selected.BG }
- /dialog -x BG-color_swatches
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement