How can I check if POS 4 class is "toggle btn btn-default off" and then skip the imacro pos 4 line?
My guess is that I will have to use either the eval or some javascript to achieve this, but I really don't know.
Thanks a lot guys.
This is the code from the website:
Code: Select all
<fieldset class="option">
<legend>Specifications</legend>
<div class="row">
<div class="col-xs-12 col-sm-2 text-right">
<div class="toggle btn btn-primary" data-toggle="toggle" style="width: 100px; height: 35px;"><input data-toggle="toggle" data-width="100" data-height="35" checked="" name="popup" value="ja" data-on="Yes" data-off="No" type="checkbox"><div class="toggle-group"><label class="btn btn-primary toggle-on" style="line-height: 19px;">Yes</label><label class="btn btn-default active toggle-off" style="line-height: 19px;">No</label><span class="toggle-handle btn btn-default"></span></div></div>
</div>
<div class="col-xs-12 col-sm-10">
<label class="checkbox-inline" for="popup">
</label>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-2 text-right">
<div class="toggle btn btn-primary" data-toggle="toggle" style="width: 100px; height: 35px;"><input data-toggle="toggle" data-width="100" data-height="35" checked="" name="popup2" value="ja" data-on="Yes" data-off="No" type="checkbox"><div class="toggle-group"><label class="btn btn-primary toggle-on" style="line-height: 19px;">Yes</label><label class="btn btn-default active toggle-off" style="line-height: 19px;">No</label><span class="toggle-handle btn btn-default"></span></div></div>
</div>
<div class="col-xs-12 col-sm-10">
<label class="checkbox-inline">
</label>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-2 text-right">
<div class="toggle btn btn-primary" data-toggle="toggle" style="width: 100px; height: 35px;"><input data-toggle="toggle" data-width="100" data-height="35" checked="" name="sound" value="ja" data-on="Yes" data-off="No" type="checkbox"><div class="toggle-group"><label class="btn btn-primary toggle-on" style="line-height: 19px;">Yes</label><label class="btn btn-default active toggle-off" style="line-height: 19px;">No</label><span class="toggle-handle btn btn-default"></span></div></div>
</div>
<div class="col-xs-12 col-sm-10">
<label class="checkbox-inline">
</label>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-2 text-right">
<div class="toggle btn btn-default off" data-toggle="toggle" style="width: 100px; height: 35px;"><input id="hatpopup3" data-toggle="toggle" data-width="100" data-height="35" name="popup2" value="ja" data-on="Yes" data-off="No" type="checkbox"><div class="toggle-group"><label class="btn btn-primary toggle-on" style="line-height: 19px;">Yes</label><label class="btn btn-default active toggle-off" style="line-height: 19px;">No</label><span class="toggle-handle btn btn-default"></span></div></div>
</div>
<div class="col-xs-12 col-sm-10">
<label class="checkbox-inline">
</label>
</div>
</div>
</fieldset>
This is part the iMacro code I have which toggles the buttons with no problem as long as all the class are set to "toggle btn btn-primary" when I open the page.
TAG POS=1 TYPE=LABEL ATTR=TXT:Yes
TAG POS=2 TYPE=LABEL ATTR=TXT:Yes
TAG POS=3 TYPE=LABEL ATTR=TXT:Yes
TAG POS=4 TYPE=LABEL ATTR=TXT:Yes