# How do I write an AppleScript for Maquarium?

Most of Maquarium's data is stored in lists inside of tanks, you access these lists as you would any other list in AppleScript. Below is a sample AppleScript that adds a new note entry to the first tank in the tank list and then modifies its note content.

tell application "Maquarium"
set newNote to make new note entry at the end of note entries of tank 1 with properties { note:"New note", noted date:current date }
set newNote's note to "My notes about my aquarium"
end tell

This AppleScript shows how to get the preferred temperature value from the first tank:

tell application "Maquarium"
set temp to preferred value of temperature settings of tank 1
display dialog "The preferred aquarium temperature is: " & temp as string
end tell