home *** CD-ROM | disk | FTP | other *** search
/ Wacky Windows Stuff... / WACKY.iso / toolbook / tbksort.tbk (.txt) < prev    next >
Asymetrix ToolBook File  |  1990-11-09  |  16KB  |  127 lines

  1. `D|D|%
  2. `D|D|%
  3. System
  4. System
  5. enterBook
  6. enterBook
  7. reader
  8. sizeToPage
  9. destination
  10. tbksort.dll
  11. sortList
  12. sortText
  13. TBKSORT.DLL Function Reference
  14. linkDLL "tbksort.dll"
  15. STRING sortList(
  16. Text(
  17. listtotextline(
  18. textlinetolist(
  19. "func#" 
  20. "Function" && 
  21. "desc,ret,par,ex"
  22. " && 
  23. rf > 0
  24. enterBook
  25. enterPage
  26. enterBook
  27. reader
  28. sizeToPage
  29. tbksort.dll
  30. sortList
  31. sortText
  32. listtotextline
  33. textlinetolist
  34. enterPage
  35. func#
  36. Function
  37. desc,ret,par,ex
  38. recordfield
  39. rectangle
  40. scrolling
  41. STRING sortList(STRING)
  42. This function sorts the list contained in the single string parameter.  The sort is case-sensitive so that A is sorted before a.  Numbers are sorted as text so that a 10 will always be sorted before a 2.
  43. The sorted list is returned.  Where possible (e.g. system variables), the original copy of the list is sorted.
  44. The single parameter is the comma-separated list to be sorted.
  45. 001,200,212,3,003,9,332,abc,ABC,def,DEF,b,a,A,B,2,100,103,534,454,399,332,abc,ABC,def,DEF,b,a,A,B,2,100000
  46. --This example sorts the list in source field.
  47. linkDLL "tbksort.dll"
  48.     STRING sortList(STRING)
  49. end linkDLL
  50. put sortList(text of recordField "source") \
  51.     into text of recordField "destination"ource") \
  52.     into text of recordField "destination"
  53. 001,200,212,3,003,9,332,abc,ABC,def,DEF,b,a,A,B,2,100BILL
  54. STRING listToTextline(STRING)
  55. This function converts a comma-separated list to a CRLF-separated string.
  56. The converted string with each item separated by a CRLF is returned., the original copy of the list is converted.
  57. The single parameter is the comma-separated list to be converted.
  58. --This converts the list in the source field to its CRLF-separated
  59. --equivalent.
  60. linkDLL "tbksort.dll"
  61.     STRING listToTextLine(STRING)
  62. end linkDLL
  63. put listToTextline(text of recordField "source") \
  64.     into text of recordField "destination"cordField "par"))))recordField "par")ordField "par")of recordField "par") \
  65.      text of recordField "par"
  66. Amanda,Xavier,John,Joe,Mary,Barbara,Collin
  67. source
  68. destination
  69. buttonUp
  70. buttonUp
  71. Execute Script
  72. "destination"
  73. buttonUp
  74. buttonUp
  75. destination
  76. Clear Destination
  77. buttonUp
  78. buttonUp
  79. Copy Script to Clipboard
  80. proto
  81. Prototype
  82. Description
  83. Return Value
  84. Parameters
  85. Example
  86. buttonUp
  87. buttonUp
  88. buttonUp
  89. buttonUp
  90. Source
  91. Destination
  92. func#
  93. Function 4 of 4
  94. FindWindow
  95. STRING sortText(STRING)))))))))
  96. This function sorts the textlines of the single parameter.  The sort is case-sensitive so that A is sorted before a.  Numbers are sorted as text so that a 10 will always be sorted before a 2.minimized.
  97. This sorted string is returned.  Where possible (e.g. system variables), the original parameter is sorted.nd.
  98. The single parameter is the string to be sorted.  The textlines of the string are separated with CRLFs.
  99. CCCCCCCCCCCCCCCd the FindWindow function will look for any window with the specified caption (see next parameter).  The second parameter is the caption of the window you are looking for.  For example, "Must Have DLL Function Calls" is the caption of this ToolBook main window.  "Program Manager" is the caption of the Program Manager window.
  100. --This example sorts the textlines of the source field.
  101. linkDLL "tbksort.dll"
  102.     STRING sortText(STRING)
  103. end linkDLL
  104. put sortText(text of recordField "source") into \
  105.     text of recordField "destination"tination"
  106. nd if
  107. get ShowWindow(hWnd, 7)  --Minimize ExcelWindow(hWnd, 7)  --Minimize ExcelwWindow(hWnd, 7)  --Minimize ExcelpUptonUppnUpnUpnUpnUpnUpnUpnUpnUp
  108. Collin
  109. Amanda
  110. Barbara
  111. FindWindow
  112. STRING textlineToList(STRING)
  113. This function converts a CRLF-separated string to a comma-separated list.alent.t.RLF-.
  114. A comma-separated list is returned.  Where possible (e.g. system variables) the original copy of the list is converted.d.ed........
  115. The single parameter is the string containing textlines to be converted.
  116. --This converts the list in the source field to its CRLF-separated
  117. --equivalent.
  118. linkDLL "tbksort.dll"
  119.     STRING listToTextLine(STRING)
  120. end linkDLL
  121. put textlineToList(text of recordField "source") \
  122.     into text of recordField "destination"
  123. Amanda
  124. Xavier
  125. Barbara
  126. Collinn
  127.