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

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