Like you I wasn't able to use the code that was provided in this thread. So, I turned to JQuery which made things a whole lot simpler.
You'll have to place the JQuery plugin somewhere on your site and then link to it before calling the function.
//First locate the plugin on your site
//Then proceed to find the link and click it.
What that line does is to search for all links with the class of "initiclick".
So, the link you would like to have clicked would have to have a class of "initclick". Naturally you can adjust the name of that class as you like.
<a href="yoururl" class="initclick">YourUrl</a>