home *** CD-ROM | disk | FTP | other *** search
/ Fischer's Erotic Encyclopedia / Eros.mdf / CSECTION / 00058_Utilities.ls < prev    next >
Encoding:
Text File  |  1996-11-11  |  4.5 KB  |  150 lines

  1. on CharCodeLister
  2.   set n to the castNum of sprite 15
  3.   if n = 21 then
  4.     set n to the castNum of sprite 17
  5.   end if
  6.   repeat with X = 1 to the number of chars in field n
  7.     put "Char " & X & " = " & char X of field n & "  (" & charToNum(char X of field n) & ")"
  8.   end repeat
  9. end
  10.  
  11. on TabCleaner
  12.   repeat with n = 101 to 990
  13.     repeat with X = 1 to the number of chars in field n
  14.       if charToNum(char X of field n) = 9 then
  15.         put "  " into char X of field n
  16.       end if
  17.     end repeat
  18.   end repeat
  19. end
  20.  
  21. on dashCleaner
  22.   repeat with n = 101 to 990
  23.     repeat with X = 1 to the number of chars in field n
  24.       if charToNum(char X of field n) = 209 then
  25.         put "-" into char X of field n
  26.       end if
  27.     end repeat
  28.   end repeat
  29. end
  30.  
  31. on textAdjustUtil
  32.   repeat with X = 1 to 9
  33.     set the textSize of field X to 9
  34.     set the foreColor of field X to 255
  35.   end repeat
  36. end
  37.  
  38. on makeTextScript
  39.   repeat with X = 101 to 109
  40.     set the scriptText of cast X to the text of cast 30
  41.   end repeat
  42. end
  43.  
  44. on LinkTest
  45.   put word the mouseWord of field the mouseCast
  46.   put the foreColor of word the mouseWord of field the mouseCast
  47. end
  48.  
  49. on puppetOff
  50.   repeat with X = 3 to 8
  51.     puppetSprite(X, 0)
  52.   end repeat
  53. end
  54.  
  55. on fofo
  56.   if line 1 of field 102 = line 1 of field 103 then
  57.     beep(3)
  58.   end if
  59. end
  60.  
  61. on getPixList
  62.   repeat with X = 1 to 6
  63.     repeat with y = 1 to the number of lines in field X
  64.       put word 4 to the number of words in line y of field X of line y of field X & RETURN after field 40
  65.     end repeat
  66.     put "__________________" & RETURN after field 40
  67.   end repeat
  68. end
  69.  
  70. on ReadIt
  71.   global hotColor
  72.   repeat with q = 1 to 20
  73.     put EMPTY into field q
  74.   end repeat
  75.   set subsectNum to 0
  76.   set pageNum to 0
  77.   set SubCodesName to EMPTY
  78.   set SubPixCastNum to EMPTY
  79.   set SubPixName to EMPTY
  80.   set TextBoxNum to EMPTY
  81.   set theObj to FileIO(mnew, "?read", "TEXT")
  82.   set thisLine to theObj(mReadLine)
  83.   set LineCount to word 1 of thisLine
  84.   repeat with X = 2 to LineCount
  85.     set thisLine to theObj(mReadLine)
  86.     if char 1 of thisLine = "_" then
  87.       next repeat
  88.     end if
  89.     if char 1 of thisLine = "<" then
  90.       if char 2 to 17 of thisLine = "subsection name=" then
  91.         set subsectNum to 1 + subsectNum
  92.         set SubCodesName to "Sub" & subsectNum & "Codes"
  93.         set the name of cast subsectNum to SubCodesName
  94.         set SubPixName to "Sub" & subsectNum & "PixCredits"
  95.         set the name of cast (subsectNum + 10) to SubPixName
  96.       else
  97.         if char 2 to 11 of thisLine = "page name=" then
  98.           set pageNum to char 17 to 18 of thisLine
  99.           set pageNum to integer(pageNum)
  100.           set buildAline to char 17 to 18 of thisLine & " "
  101.           put char 34 to 39 of thisLine & " " after buildAline
  102.           put char 51 of thisLine & " " after buildAline
  103.           put char 63 to the number of chars in thisLine of thisLine after buildAline
  104.           repeat with u = 1 to 3
  105.             delete char the number of chars in buildAline of buildAline
  106.           end repeat
  107.           put buildAline into line pageNum of field subsectNum
  108.         else
  109.           if char 2 to 10 of thisLine = "pixcredit" then
  110.             set thisLine to theObj(mReadLine)
  111.             set X to X + 1
  112.             put thisLine into line pageNum of field (subsectNum + 10)
  113.           else
  114.             next repeat
  115.           end if
  116.         end if
  117.       end if
  118.       next repeat
  119.     end if
  120.     set TextBoxNum to (100 * subsectNum) + pageNum
  121.     if the castType of cast TextBoxNum <> #text then
  122.       if word 3 of line pageNum of field subsectNum = 1 then
  123.         copyToClipBoard(cast 24)
  124.       else
  125.         copyToClipBoard(cast 21)
  126.       end if
  127.       pasteClipBoardInto(cast TextBoxNum)
  128.       set the scriptText of cast TextBoxNum to the text of cast 29
  129.     end if
  130.     put thisLine after field TextBoxNum
  131.     set the foreColor of cast TextBoxNum to 24
  132.     set the textFont of field TextBoxNum to "Geneva"
  133.     set the textSize of field TextBoxNum to 10
  134.     set the textHeight of field TextBoxNum to 16
  135.     set LinkstartCode to offset("<link", field TextBoxNum)
  136.     repeat while LinkstartCode > 0
  137.       set LinkendCode to offset("</link>", field TextBoxNum)
  138.       set the foreColor of char LinkstartCode to LinkendCode of field TextBoxNum to hotColor
  139.       delete char LinkendCode to LinkendCode + 6 of field TextBoxNum
  140.       delete char LinkstartCode to LinkstartCode + 5 of field TextBoxNum
  141.       set LinkstartCode to offset("<link", field TextBoxNum)
  142.     end repeat
  143.   end repeat
  144.   theObj(mdispose)
  145.   repeat with X = 1 to 20
  146.     set the textSize of field X to 9
  147.     set the textStyle of field X to "plain"
  148.   end repeat
  149. end
  150.