Lloyd's Software Application Prototype
Introduction
This example shows how to create a simple software application (a class syllabus) that collects research data while an individual explores it. The example will be created as part of a class activity. This is a support page for the activity that provides some scripts for easy copying and pasting.
Notes
& is the concatenation symbol (adding chunks together)
Always put text strings inside double quotes (e.g. “Description”)
Script for Button "Begin":
global gDescriptionFrequency
global gDescriptionTime
global gSectionName
on mouseUp
put 0 into gDescriptionFrequency
put 0 into gDescriptionTime
go to next card
end mouseUp
Script for Card "Description":
global gDescriptionFrequency
global gDescriptionTime
global gSectionName
global gStartTime, gEndTime, gTotalTime
on opencard
add 1 to gDescriptionFrequency
put "Description" into gSectionName
put the seconds into gStartTime
end opencard
Script for Button "Home" (on card “Description”):
global gDescriptionFrequency
global gDescriptionTime
global gSectionName
global gStartTime, gEndTime, gTotalTime
on mouseUp
put the seconds into gEndTime
put gEndtime - gStartTime into gTotalTime
add gTotalTime to gDescriptionTime
put the date&","&the time&","&gSectionName&","&gTotalTime&return after field "data" on
card "data"
go to card "home"
end mouseUp
Script for Button "I’m Done" (on card “menu”):
global gDescriptionFrequency
global gDescriptionTime
on mouseUp
put "Description Page Frequency"&","&gDescriptionFrequency&return after field "data" on card "data"
put "Session Ended"&return&return after field "data" on card "data"
go to card "data"
end mouseUp
Script for Button "Erase Data" (on card “data”):
on mouseUp
put empty into field "data"
end mouseUp
Script for Button "Erase Data" (on card “data”):
on mouseUp
put empty into field "data"
end mouseUp