Well now I have a new desire to automate some things and so I've picked back up the torch (for iMacros).
I am unbelievably rusty at scripting. I think I have forgotten almost everything. I'm hoping to get back up to speed but I've run into something that seems odd to me. All I want to do is a simple HREF extract on a button. After extracting the HREF I want to store it as a variable for later conditional comparison.
This was recorded when clicking on it...
Code: Select all
TAG POS=1 TYPE=A ATTR=HREF:/p/login&&ID:sbGlobalNavLoginBtn
Code: Select all
var SBHome
var SBLogin
var SBLoginURL
var nL="\n"
var i
SBHome = "CODE:"
SBHome = SBHome+"TAB T=1" + nL
SBHome = SBHome+"TAB CLOSEALLOTHERS" + nL
SBHome = SBHome+"URL GOTO=http://www.swagbucks.com/p/login" + nL
iimDisplay("We need to close ALL tabs now.")
iimPlay(SBHome)
SBLogin = "CODE:"
SBLogin = SBLogin+"TAG POS=1 TYPE=A ATTR=HREF:/p/login&&ID:sbGlobalNavLoginBtn EXTRACT=HREF"
SBLoginURL = iimGetExtract(1)
alert(SBLoginURL)
The button can be viewed here..
http://www.swagbucks.com/?gw=1