home *** CD-ROM | disk | FTP | other *** search
/ Software USA 4 #8 / Software USA Volume 4.08.iso / mac / LifeStyles / ComicBase / ComicBase 3 Demo / ComicBase 3 Demo.rsrc / LENS_150_Export Price List < prev    next >
Encoding:
Text File  |  1999-08-16  |  11.7 KB  |  180 lines

  1. ItemType: WIND
  2. Rect: 287,243,737,525
  3. Style: Dialog
  4. HasTitleBar: TRUE
  5. HasZoomBox: FALSE
  6. Name: Export Price List
  7. WhiteColor: -8739,-8739,-8739
  8. Script: --on windowEvent  wdID,wdName,objNo,objName,objValue¬¬Global gExportFields, gAvailableExportFields, gExportOnlyIssuesInStock¬global gWindowPositions, gYears, serialNum, gExportInReportFormat¬global gIncludeExportFieldTitles¬¬---------------------¬-- This is window #8¬---------------------¬¬if objValue="Open" then ¬  -- Restore old window position¬  put OldWindowPosition(8) into windowRect¬  if windowRect = empty then centerWindow wdName¬  else wsSet wdID,"0","Rect",windowRect¬  ¬  ¬  -- Match up the actual years to the period fields¬  set the itemDelimiter to " " -- Option space¬  repeat with x = 1 to the number of lines of gYears¬    put line x of gYears into yearToMatch¬    ¬    put false into foundIt¬    repeat with listIndex = 1 to the number of lines of gExportFields¬      -- look in the Exportfields list¬      if item 1 of line listIndex of gExportFields = "Value-Year " & x then¬        delete item 2 of line listIndex of gExportFields¬        put " (" & yearToMatch & ")" after line listIndex of gExportFields¬        put true into foundIt¬      end if¬    end repeat¬    ¬    if not foundIt then¬      repeat with listIndex = 1 to the number of lines of gAvailableExportFields¬        if item 1 of line listIndex of gAvailableExportFields = "Value-Year " & x then¬          delete item 2 of line listIndex of gAvailableExportFields¬          put " (" & yearToMatch & ")" after line listIndex of gAvailableExportFields¬        end if¬      end repeat¬    end if¬  end repeat¬  ¬  ¬  wsSet wdID,"7","Name", "Move >>"¬  wsSet wdID,"ExportOrder","Text", gExportFields¬  wsSet wdID,"AvailableForExport","Text", gAvailableExportFields¬  if gAvailableExportFields ≠ empty then¬    wsSet wdID,"AvailableForExport","Selection", "1"¬    wsSet wdID,"7","Disabled", "False"¬  else¬    wsSet wdID,"AvailableForExport","Selection", "0"¬    wsSet wdID,"7","Disabled", "True"¬  end if¬  wsSet wdID,"Export","Disabled",((gExportFields = empty) or (serialNum = empty))¬else if objValue="Close" then ¬  -- save the window position¬  put "8" & tab & wdName & tab & wsGet(wdID,"0","Rect") into line 8 of gWindowPositions¬  ¬end if¬¬--end windowEvent
  9. Params: i3_SelectionText¬i5_SelectionText¬i14_SelectionText¬i15_Hilite¬i16_Hilite¬i18_Hilite¬i19_Hilite
  10. Result: i3_TextOfSelection¬i5_TextOfSelection¬i14_TextOfSelection¬i15_Hilite¬i16_Hilite
  11.  
  12. ItemType: LIST
  13. Rect: 11,27,157,209
  14. TextFont: Geneva
  15. TextSize: 9
  16. Name: AvailableForExport
  17. Logic: Drag
  18. DoubleClickItem: 7
  19. Text: Comic Title¬Issue Number¬Quantity in Stock¬Condition¬Cost¬Cover Price¬Value-Year 1 (1993)¬Value-Year 2 (1994)¬Value-Year 3 (1996)¬Value-Year 4 (1997)¬Selling Price¬Notes¬Storylines¬Writer¬Artist
  20. Balloon: These are all the ComicBase fields available to be exported. Select one of these fields, then click the “Move” button to add the field to the list of fields you’d like to export.
  21. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬get wsGet(wdID,"AvailableForExport","TextOfSelection")¬if it ≠ empty then¬  wsSet wdID,"7","Name", "Move >>"¬  wsSet wdID,"7","Disabled", "FALSE"¬else¬  wsSet wdID,"7","Disabled", "true"¬end if¬--end mouseUp
  22.  
  23. ItemType: LIST
  24. Rect: 296,27,442,209
  25. TextFont: Geneva
  26. TextSize: 9
  27. Name: ExportOrder
  28. Logic: Drag
  29. DoubleClickItem: 7
  30. Text: 
  31. Balloon: This is a list of all the fields that will be exported.
  32. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬get wsGet(wdID,"ExportOrder","SelectionText")¬if it ≠ empty then¬  if it ≠ "< Blank Field >" then¬    wsSet wdID,"7","Name", "<< Move"¬  else¬    wsSet wdID,"7","Name", "Remove"¬  end if¬  ¬  wsSet wdID,"7","Disabled", "False"¬end if¬¬--end mouseUp
  33.  
  34. ItemType: POP
  35. Rect: 102,223,175,236
  36. TextFont: Geneva
  37. TextSize: 9
  38. Name: ItemSeparator
  39. Text: Tab¬Space¬Return¬-¬Other…
  40. TitleItem: 4
  41. Balloon: This is the character that will be used to separate different fields of a given issue. Most programs use “Tab” to separate fields.
  42. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬if objValue = "Other…" then¬  get windowScript("Other Separator")¬  if it <> empty then¬    put mapCharsToCharNames (NumToChar(line 2 of it)) into temp¬    wsSet "Export Price List","ItemSeparator","selectionText",temp¬  else¬    wsSet "Export Price List","ItemSeparator","SelectionText", "Tab"¬  end if¬end if¬--end mouseUp
  43.  
  44. ItemType: LBL
  45. Rect: 11,222,102,234
  46. TextFont: Geneva
  47. TextSize: 9
  48. TextStyle: Bold
  49. WhiteColor: -8739,-8739,-8739
  50. Text: Item Separator:
  51.  
  52. ItemType: POP
  53. Rect: 368,223,441,236
  54. TextFont: Geneva
  55. TextSize: 9
  56. Name: RecordSeparator
  57. Text: Tab¬Space¬Return¬-¬Other…
  58. TitleItem: 6
  59. Balloon: This is the character that will be used to mark the end of a given issue (record) in the export file. Most programs use “Return” to mark the end of a record.
  60. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬if objValue = "Other…" then¬  get windowScript("Other Separator")¬  if word 1 of it <> empty then¬    put mapCharsToCharNames (NumToChar(line 2 of it)) into temp¬    wsSet "Export Price List","RecordSeparator","selectionText",temp¬  else¬    wsSet "Export Price List","RecordSeparator","SelectionText", "Return"¬  end if¬end if¬--end mouseUp
  61.  
  62. ItemType: LBL
  63. Rect: 264,222,368,234
  64. TextFont: Geneva
  65. TextSize: 9
  66. TextStyle: Bold
  67. WhiteColor: -8739,-8739,-8739
  68. Text: Record Separator:
  69.  
  70. ItemType: PUSH
  71. Rect: 173,31,277,51
  72. AutoSize: FALSE
  73. Name: Move >>
  74. DefaultItem: TRUE
  75. Balloon: If the name of this button is “Move >>” Clicking here to add the selected field to the list of fields to be exported.¬¬If the name is “<< Move”, clicking here will remove that field from the list of fields to be exported.
  76. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬global serialNum¬¬if objName = "Move >>" then¬  put wsGet(wdID,"AvailableForExport","Text") into origListText¬  put wsGet(wdID,"AvailableForExport","Selection") into ExportSelectLine¬  put line ExportSelectLine of origListText into theSelectedItem¬  if theSelectedItem ≠ empty then¬    put wsGet(wdID,"ExportOrder","Text") into ExportList¬    delete line (ExportSelectLine) of origListText¬    wsSet wdID,"AvailableForExport","Text",origListText¬    ¬    if ExportList = empty then¬      wsSet wdID,"ExportOrder","Text", (theSelectedItem)¬    else¬      wsSet wdID,"ExportOrder","Text", (ExportList & return & theSelectedItem)¬    end if¬    ¬    if (line ExportSelectLine of origListText <> "")  then¬      wsSet wdID, "AvailableForExport","Selection",ExportSelectLine¬    else -- No selection left (at end of list, etc.)¬      if ExportSelectLine > 1  then¬        wsSet wdID, "AvailableForExport","Selection",ExportSelectLine - 1¬      else -- nothing left in list¬        wsSet wdID, 7,"Disabled",True¬      end if¬    end if¬    ¬    if serialNum <> empty then wsSet wdID,"Export","Disabled", "False"¬  end if¬  ¬else -- Move back to original list¬  put wsGet(wdID,"ExportOrder","Selection") into theSelectedLine¬  put wsGet(wdID,"ExportOrder","Text") into ExportList¬  put line theSelectedLine of ExportList into theSelectedItem¬  ¬  if theSelectedItem ≠ empty then¬    put wsGet(wdID,"AvailableForExport","Text") into origListText¬    delete line (theSelectedLine) of ExportList¬    wsSet wdID,"ExportOrder","Text", ExportList¬    if theSelectedItem <> "< Blank Field >" then¬      put the number of lines of origListText into numAvailLines¬      if numAvailLines > 0 then¬        put return & theSelectedItem after origListText¬      else¬        put theSelectedItem after origListText ¬      end if¬      wsSet wdID,"AvailableForExport","Text",origListText¬    end if  ¬    ¬    if word 1 of line theSelectedLine of ExportList <> "" then¬      wsSet wdID, "ExportOrder","Selection",theSelectedLine¬    else¬      if theSelectedLine > 1 then ¬        wsSet wdID, "ExportOrder","Selection",theSelectedLine - 1¬      else -- nothing left in list¬        wsSet wdID, 7,"Disabled",True¬      end if¬    end if¬  end if¬  ¬  wsSet wdID,"Export","Disabled", ((ExportList = empty) or (serialNum = empty))¬end if¬--end mouseUp¬¬¬¬¬¬¬¬¬¬¬¬
  77.  
  78. ItemType: PUSH
  79. Rect: 174,189,278,209
  80. AutoSize: FALSE
  81. Name: Cancel
  82. CancelItem: TRUE
  83. AutoClose: TRUE
  84. Balloon: Click here to cancel exporting.
  85.  
  86. ItemType: PUSH
  87. Rect: 174,163,278,183
  88. AutoSize: FALSE
  89. Disabled: TRUE
  90. Name: Export
  91. AutoClose: TRUE
  92. Balloon: Click here to begin exporting the selected fields.
  93. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬Global gExportFields, gAvailableExportFields¬¬put wsGet(wdID,"ExportOrder","Text") into gExportFields¬put wsGet(wdID,"AvailableForExport","Text") into gAvailableExportFields¬--end mouseUp
  94.  
  95. ItemType: PUSH
  96. Rect: 174,63,278,83
  97. Name: Add Blank >>
  98. Balloon: Click here to add a blank field to the list of fields to be exported. 
  99. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬global serialNum¬¬put "< Blank Field >" into theSelectedItem¬put wsGet(wdID,"ExportOrder","Text") into ExportList¬¬if ExportList = empty then  put (theSelectedItem) into ExportList¬else  put return & theSelectedItem after ExportList¬¬wsSet wdID,"ExportOrder","Text", (ExportList)¬get "AvailableForExport_Selection:0" & return¬if serialNum <> empty then put "OK_Disabled:False" & return after it¬Wsset wdID,0,"Properties",it¬--end mouseUp
  100.  
  101. ItemType: LBL
  102. Rect: 38,14,129,26
  103. TextFont: Geneva
  104. TextSize: 9
  105. TextStyle: Bold
  106. WhiteColor: -8739,-8739,-8739
  107. Text: Available Fields
  108.  
  109. ItemType: LBL
  110. Rect: 319,14,395,26
  111. TextFont: Geneva
  112. TextSize: 9
  113. TextStyle: Bold
  114. WhiteColor: -8739,-8739,-8739
  115. Text: Export Fields
  116.  
  117. ItemType: LBL
  118. Rect: 11,242,49,254
  119. TextFont: Geneva
  120. TextSize: 9
  121. TextStyle: Bold
  122. WhiteColor: -8739,-8739,-8739
  123. Text: Style:
  124.  
  125. ItemType: POP
  126. Rect: 49,243,228,256
  127. TextFont: Geneva
  128. TextSize: 9
  129. Name: OutputStylePop
  130. Text: Spreadsheet-Database Records¬Formatted Report
  131. TitleItem: 13
  132. Balloon: This is the style in which the exported price list will be formatted. Report Format lists shows the title name only once per title;  Spreadhsheet-Database format lists the title name on each line.
  133. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬if objValue = "Other…" then¬  get windowScript("Other Separator")¬  if it <> empty then¬    put mapCharsToCharNames (NumToChar(line 2 of it)) into temp¬    wsSet "Export Price List","ItemSeparator","selectionText",temp¬  else¬    wsSet "Export Price List","ItemSeparator","SelectionText", "Tab"¬  end if¬end if¬--end mouseUp
  134.  
  135. ItemType: CHK
  136. Rect: 263,243,408,255
  137. TextFont: Geneva
  138. TextSize: 9
  139. WhiteColor: -8739,-8739,-8739
  140. Name: Export only issues in stock
  141. Balloon: Check this box if you want the export file to only include records for the issues you own at least one of. If the box is unchecked, all records will be listed.
  142.  
  143. ItemType: CHK
  144. Rect: 263,260,368,272
  145. TextFont: Geneva
  146. TextSize: 9
  147. WhiteColor: -8739,-8739,-8739
  148. Name: Include field titles
  149. Balloon: Check this box if you want precede the data being exported with the title of each export field.
  150.  
  151. ItemType: LBL
  152. Rect: 11,261,92,273
  153. TextFont: Geneva
  154. TextSize: 9
  155. TextStyle: Bold
  156. WhiteColor: -8739,-8739,-8739
  157. Text: Export Titles:
  158.  
  159. ItemType: RAD
  160. Rect: 89,261,126,273
  161. TextFont: Geneva
  162. TextSize: 9
  163. WhiteColor: -8739,-8739,-8739
  164. Name: All
  165. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬global gTitlesToExportType¬¬put "All" into gTitlesToExportType¬--end mouseUp
  166.  
  167. ItemType: RAD
  168. Rect: 129,261,228,273
  169. TextFont: Geneva
  170. TextSize: 9
  171. WhiteColor: -8739,-8739,-8739
  172. Name: Selected Titles…
  173. Script: --on mouseUp  wdID,wdName,objNo,objName,objValue¬global selectedTitlesIndex¬global gTitlesToExportType¬¬set cursor to watch¬put objName into gTitlesToExportType¬get windowScript("Select Titles","Export which titles?")¬if it <> empty then¬  put xlate(selectedTitleNums,comma,return) & return into selectedTitlesIndex¬end if¬¬wsSet "Export Price List","Export","Disabled",(selectedTitlesIndex = empty)¬--end mouseUp
  174.  
  175. ItemType: LBL
  176. Rect: 163,145,292,157
  177. TextFont: Geneva
  178. TextSize: 9
  179. BlackColor: 13107,13107,-1
  180. Text: Demo Version: Can’t Export