So in the moments after losing it all, I vowed it would never happen again. After spending an hour thinking and Googling, I had an idea. All I had to do was have the computer hit Ctrl+S every five minutes when I was in Tableau. Simple.
I found a third party program called AutoHotKey that allowed for just such a automated miracle.
Before I post the 'how to' on this (which I originally posted a few months ago), a few words of warning. Some people LOVE this hack (myself included - It's saved me so many hours!) and some people don't - they say that the minuses outweigh the pluses. I disagree with the naysayers on most of their points, but it does require some thoughtfulness if you chose to use it. Here are some things to think about.
- It's going to save (duh) (unless you pause it/turn it off) - so don't think you can open a file, try some crazy stuff and revert back to the beginning just by hitting X and selecting "Don't save". It saved while you did those crazy things. Therefore, if you're going to do something crazy create a new file or select "Pause the script". If your crazy idea works out just save back over the original file or turn the script back on. Just be thoughtful.
- On the flip side (a positive) you do not lose any "Undo"-ability. You have the ability to hit the back arrow and take the file all the way back to the original way it was when you first opened it (if you had the patience to click that many times).
- If your file becomes very large you will begin to notice the amount of time it takes to perform the save. If you lower you cycle to time to 90 seconds or so, it could get really annoying.
But even with those caveats, I continue to wholeheartedly endorse the Auto Save Hack. So here it is:
The first thing you need is a lovely piece of third party software called AutoHotKey. AutoHotKey allows you to write macros of all types that are totally customizable. We are going to use it to write a very simple script that will automatically save your Tableau workbook every five minutes as you work on it.
Download and install.
Fire it up and you’ll see that it comes with a pre-canned script (typically saved in your ‘My Documents’ folder’).
Open up Notepad and paste the following text:
Loop ;Do this forever
IfWinActive ahk_class TableauMfcMainWindow ;If my active window is Tableau, then….
{
Send ^s ;Hit Ctrl+s (Save)
Sleep 300000 ;Do this every 300,000 milliseconds (aka - 300 seconds, bak - 5 minutes – this is totally changeable)
}
IfWinActive ahk_class TableauMfcMainWindow ;If my active window is Tableau, then….
{
Send ^s ;Hit Ctrl+s (Save)
Sleep 300000 ;Do this every 300,000 milliseconds (aka - 300 seconds, bak - 5 minutes – this is totally changeable)
}
Go to File>>Save as
Select ‘Save as type’=All Files
Save it as ‘Save Tableau 5 min.ahk’ (make sure you specify to save it as an .ahk (AutoHotKey file)). Now, if you double click the file you will see a little icon on the toolbar tray showing that the macro is up and running.
Now, go to the file’s location and create a shortcut.
Save that shortcut into your start up folder.
(On Windows 8 it’s at: C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup)
That’s it!
Now, starting from the time your computer boots up, while you’re running Tableau, your active workbook will save every 5 min and you won’t even notice it (all least not after you’ve given it a file name). But check your workbook repository for the time modified for the file and you’ll notice that it’s updating automatically and always within the last five minutes.
I hope you find this helpful! If you do, please let me know in the comments below.
Many thanks –
Nelson
Can you publish the workbook or at least the datasources? The concept looks interesting, but I didn't fully follow how it works.
ReplyDeletenice blog , very helpful and visit us for VISUALIZATION SERVICES in UK
ReplyDeletegood post viraltrench
ReplyDelete