Create preferences in to ASS :(

i have one question :|: in to my litle aplication i have one popup button with 5 menu it control screenshot format in to Tiger os, the application work good i have only this problem:
After restart my application, the popup buttom not respect the regular position screenshoot format … my popup menu ceck only the first position … is possible i store my esecution in to .plist file for remember it ? someone have idea to risolve this problem .

this is is my code :




on choose menu item theObject
	(*Add your script here.*)
	
	
	(*Add your script here.*)
	if name of theObject is "screenshot" then
		set popupChoice to content of theObject
		if popupChoice is 0 then
			do shell script "defaults write com.apple.screencapture type png"
			
		else if popupChoice is 1 then
			do shell script "defaults write com.apple.screencapture type pdf"
			
		else if popupChoice is 2 then
			do shell script "defaults write com.apple.screencapture type gif"
			
		else if popupChoice is 3 then
			do shell script "defaults write com.apple.screencapture type tif"
			
		else if popupChoice is 4 then
			do shell script "defaults write com.apple.screencapture type psd"
			
		else if popupChoice is 5 then
                        do shell script "defaults write com.apple.screencapture type pict"
		end if
	end if
end choose menu item

on awake from nib theObject
	
	
end awake from nib

Model: G5 DP 2700
AppleScript: 2.1
Browser: Safari 412.2.2
Operating System: Mac OS X (10.4)

or you can

do shell script “defaults read com.apple.screencapture type”

thanx
do shell script “defaults read com.apple.screencapture type”

i know i thanx

i need the info for creating my personal preferences for my button :frowning:
some one have one exaple ? only for one buttom.
EXAMPLE :

 
on clicked theObject
	set buttton to name of theObject as string
	if button = "test" then
		if state of theObject = 1 then
			-- xxxxx
		else
			-- xxxxx
		end if
	end if
end clicked

i press my button and quit my application,
i need after restart my application my button “test” remember the last position :frowning:

Model: G5 DP 2700
AppleScript: 2.1
Browser: Safari 412.2.2
Operating System: Mac OS X (10.4)