Thread Tools Display Modes
12-04-10, 10:10 AM   #1
medgno
A Murloc Raider
Join Date: Apr 2009
Posts: 4
Lightbulb Automatically submit SavedVariables for database

So Carbonite people have said that their database is made from the submission of the Carbonite SavedVariables from Users Like Us (tm). In order to help, I wrote a script that will automatically send my saved variables in every week. I'm posting this here in case others want to do this, or if others want to come up with solutions for other operating systems.

Since I use a mac and wanted an excuse to play with the language, I did this in Applescript. This relies on having Apple Mail setup as an email client.

I used Applescript Editor to put the following in my user directory in Software/Applescripts/Send Carbonite SavedVariables.scpt:

Code:
tell application "Mail"
	set theMessage to make new outgoing message with properties {subject:"Carbonite savedvariables", content:"Here is my saved variables file.  This was sent via a script.  If you want me to stop, please tell me :)

", visible:true}
	tell theMessage
		make new to recipient at end of to recipients with properties {address:"[email protected]"}
		make new attachment with properties {file name:"/Applications/World of Warcraft/WTF/Account/MYWOWUSERNAME/SavedVariables/Carbonite.lua"}
	end tell
	send theMessage
end tell
You want to change 'MYWOWUSERNAME' to your wow username. If you're not sure, check in your WTF/Account folder.

Then, to make this send automatically, I added the following to my crontab (added by running crontab -e in a terminal)

Code:
0 0 * * 1,4 osascript '/Users/myusername/Software/Applescripts/Send Carbonite SavedVariables.scpt'
Again, you'll want to replace 'myusername' with your OS X username.


If people have troubles getting this to work, I'll try to help, but I make no guarantees of being helpful.

Happy questing!
 
 

WoWInterface » Featured Projects » Carbonite » Carbonite Archive » Automatically submit SavedVariables for database


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off