Hi all!
I need a script whose can read and write own preferences to the file.
For example
- If start as applet user can enter a values for some variables, and save its to the file.
- If start as droplet read values from the file, then run.
For examples:
property currentTIFFResolution : missing value
on run
set tempResolution to display dialog “Choose resolution DPI:” default answer “”
set currentTIFFResolution to text returned of tempResolution as text
– here i need to save new value to the file
end run
on open droppeditems
– here i need to read value for TIFFResolution from the file
set outputFolder to (choose folder with prompt "Choose path to final files:") as alias
try
tell application "Finder"
if (not (exists folder ((outputFolder as string) & "Temp"))) then
-- set tempFolder to make new folder at outputFolder with properties {name:"Temp"}
set tempFolder to make folder at outputFolder with properties {name:"Temp"}
else
set tempFolder to folder ((outputFolder as string) & "Temp")
end if
-- display dialog tempFolder as string
end tell
on error the error_message number the error_number
display dialog "Error in Dropped Items: " & the error_number & ". " & the error_message ¬
buttons {"OK"} default button 1 with icon stop with title myTitle
end try
exportTempFiles(droppeditems)
end open
Regards, Alex