It creates a search engine that searches your labels for a word, then lists it. The user then types in the label they want to go to, then hit a "go to" button to be taken there.
on searchText
set searchWord = the text of field "Search Field"
set returnList = [:]
set the text of field "Output" to ""
set numList = (the number of lines of the labelList) - 1
if searchWord = "" then
alert "Please enter a word"
else
repeat with i = 1 to numList
set testWord to line i of the labelList
set theOffset = offset(searchWord, testWord)
if theOffset <> 0 then
put testWord into returnList
put returnList after member "Output"
put RETURN after member "Output"
end if
end repeat
if returnList = [:] then
alert "This word was not found."
end if
end if
end
on jumpLoc
set searchWord = the text of field "Search Field"
set numList = (the number of lines of the labelList) - 1
repeat with i = 1 to numList
set testWord to line i of the labelList
if testWord = searchWord then
set goWord = the text of field "Search Field"
go to frame goWord
set the text of field "Output" to ""
set the text of field "Search Field" to ""
end if
end repeat
if goWord <> SearchWord then
alert "The page does not exist. Check to make sure you entered the ¬
complete page title correctly"
end if
end
on keyDown me
if the key = return then
searchText
else
pass
end if
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA