home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PowerPlay 1997 March
/
PowerPlay0397.iso
/
T-ONLINE
/
SHOW
/
XTRAS
/
FFXTRAS
/
-FFBENCH.DIR
/
00003_Script_3
< prev
next >
Wrap
Text File
|
1996-03-15
|
4KB
|
130 lines
on closeWindow
put the windowList into theList
repeat with i = 1 to count(theList)
put string(getAt(theList,i)) into theItem
delete word 1 of theItem
delete char 1 of theItem
put the number of chars of theItem into theChar
delete char theChar-1 to theChar of theItem
if (theItem contains "Test Bench") or (theItem contains "FFBENCH") then
forget window theItem
end if
end repeat
tell the stage to puppetPalette 0
tell the stage to updateStage
end closeWindow
on listTitles
put dbCount() into theNum
repeat with i = 1 to theNum
put dbGo(i) into theResult
put fileflex(26,"TITLE")
end repeat
end listTitles
on buildHelpTextList
put empty into field "helptextlist"
put empty into theList
put 0 into frameRef
put 1 into textLine
put field "helptext" into theText
repeat while 1 = 1
if char 1 of line textLine of theText = "*" then
put frameRef + 1 into frameRef
if theList = "" then
put frameRef & "," & textLine into theList
else
put return & frameRef & "," & textLine after theList
end if
put textLine + 1 into textLine
else
if textLine = the number of lines of theText then exit repeat
put textLine + 1 into textLine
end if
end repeat
put theList into field "helpTextList"
put "Help Text List construction completed."
end buildHelpTextList
on showHelpText theF
put line theF of field "helpTitleList" into field "Help Title"
put 0 into foundF
repeat with i = 1 to the number of lines of field "HelpTextList"
put item 1 of line i of field "helptextlist" into theFrameP
if theFrameP = theF then
put i into foundF
exit repeat
end if
end repeat
if foundF > 0 then
put item 2 of line foundF of field "helpTextList" into startLine
if foundF < the number of lines of field "helpTextList" then
put item 2 of line (foundF + 1) of field "helpTextList" - 1 into endLine
else
put the number of lines of field "helpText" into endLine
end if
put line integer(startLine) to integer(endLine) of field "helpText" into theText
delete char 1 of theText
put theText into field "help field"
end if
end showHelpText
on getTheRecord
put dbGetCurrRecVal("L") into field "dbData"
if dbRecordDeleted(string(dbCurrRecNum())) = "Y" then
put "DELETED" into field "deleted"
else
put empty into field "deleted"
end if
end getTheRecord
on getTheRecord2
put DBGetCurrRecVal("L") into theRec
-- parse record into the fields
delete line 1 of theRec
delete line 1 of theRec -- crude, but hey, it's 6AM!
repeat with i = 1 to 16
if i <= the number of lines of theRec then
put line i of theRec into theLine
if item 2 of theLine = "M" then
put "[memo]" into field ("f" & i)
else
delete item 1 to 2 of theLine
put theLine into field ("f" & i)
end if
end if
-- field cleanup
-- if the number of chars of field ("f" & i) < 2 then
-- put field ("f" & i) & " " into field ("f" & i) -- force the size for Director
-- end if
-- set the backColor of cast ("f" & i) to 0
-- set the foreColor of cast ("f" & i) to 255
-- set the textSize of field ("f" & i) to 9
-- put the number of chars of field ("f" & i) into cnt
-- delete char cnt-1 to cnt of field ("f" & i)
end repeat
end getTheRecord2
on getTheRecordG
--put DBGetCurrRecVal("G") into dbResult
repeat with i = 1 to 16
if field ("n" & i) <> "[not used]" then
put "put " & field ("n" & i) & " into field " & quote & "f" & quote & " & i)" into theCmd
put theCmd
end if
end repeat
end getTheRecordG
on processFname f
put DBListFields() into theList
delete line 1 of theList
put f into fNum
delete char 1 of fNum
put line integer(fNum) of theList into theLine
if item 2 of theLine <> "N" then
alert "Can't sum or average a non-numeric field."
else
alert "Sum: " & DBSum(field f) & ", Average: " & DBAverage(field f)
end if
end processFname