hi there. i’m trying to script tomato torrent. from the dictionary i can see that i have the option of setting the ‘save download folder (alias)’ and ‘starts immediately (boolean)’. i’ve been trying to set these 2 settings but i keep getting the error ‘Tomato Torrent got an error: Can’t make save download folder into type reference.’. this is a sample of my script (don’t laugh):
tell application "Tomato Torrent"
open FileString
set save download folder to alias "Tiki:"
set starts immediately to true
end tell
what would be the correct way to go do this?
Model: iBook G4
AppleScript: v2.1 (80)
Browser: Safari v2.0 (412)
Operating System: Mac OS X (10.4)
well i tried without the alias, with (choose folder) and that’s about all i can think of. are there any other possibilities i can try? here’s the relevant part of the dictionary for tomato torrent:
Did you try replacing save download folder with save download path, which to me (who knows nothing of this app) looks like a more likely (and from the documentation mandatory) option.
Just a long shot, but have you tried putting the word ‘its’ in front of ‘save download folder’, or perhaps putting parentheses round the expression? Another thing to try would be to change ‘alias “Tiki:”’ to ‘(“Tiki:” as alias)’, or to assign the alias to a variable in a previous line or before the tell block.
You might want to download TOTOTO (search in MacUpdate) and take a look into it’s source?
(It’s open source! You find the script file in TOTOTO’s resources)
I’ve just downloaded Tomato Torrent to take a closer look at its dictionary.
Sorry. The answer should have been obvious when you posted the dictionary entry yesterday. ‘Save download folder’ is a property of a ‘download document’. You thus have to set that property in the document.
tell application "Tomato Torrent"
open FileString -- dictionary says 'list of alias'
tell front download document
set save download folder to alias "Tiki:"
set starts immediately to true
end tell
end tell
I can’t test this myself without getting deeper into the software and creating the appropriate kind of file. But it should get you a bit closer.