It is currently May 25th, 2020, 1:48 pm

If Match not working

Get help with installing and using Rainmeter.
Urzu7
Posts: 7
Joined: April 4th, 2020, 9:55 am

If Match not working

Post by Urzu7 »

I'm using a [MeasureTime] to create a "If match" condition, my condition is if the current month and date is match to the #Var1# it will show a image, but the "If Match" is not working, anyone can help me? Thank you.

Here's my code

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[Variables]
Var1=[MeasureMonthExpire][MeasureDateExpire]


[MeasureParse3]
Measure=WebParser
URL=file://C:\Users\Unknown\Documents\Rainmeter\Skins\New folder\DownloadFile\Parse.txt
RegExp=(?siU)FAMLOAD OPEN ACCESS MB.*Expires on (.*) (.*),.*</p>
DynamicVariables=1
OnRegExpErrorAction=[!Log "RegExp Error"]


[MeasureMonthExpire]
Measure=WebParser
URL=[MeasureParse3]
StringIndex=1

[MeasureDateExpire]
Measure=WebParser
URL=[MeasureParse3]
StringIndex=2


[MeasureTime]
Measure=Time
Format=%B%e
IfMatch=#Var1#
IfMatchAction=[!ShowMeter MeterImageExpire]
IfNotMatchAction=[!HideMeter MeterImageExpire]

[MeterImageExpire]
Meter=Image
ImageName=#@#Images\exp.png
H=25
W=25
X=40r
Y=-57r
Hidden=1

Here's the parse.txt

Code: Select all

<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<head id="Head1" runat="server">
	


	
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>Home - PLDT Prepaid WiFi - PLDT Home</title>
	<meta name="description" value="" />
	<meta name="viewport" content="width=device-width" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<link rel="icon" type="image/ico" href="/HomeWifiLoad/pldticon.ico" />

	<link rel="stylesheet" href="/HomeWifiLoad/Assets/css/normalize.min.css" />
	<link rel="stylesheet" href="/HomeWifiLoad/Assets/css/bootstrap.min.css" />
	<link rel="stylesheet" href="/HomeWifiLoad/Assets/css/font-awesome.min.css" />
	<link rel="stylesheet" href="/HomeWifiLoad/Assets/css/lato-font.css" />	
	<link rel="stylesheet" href="/HomeWifiLoad/Assets/css/dashboard.css" />
	

	
	<script type="text/javascript" src="/HomeWifiLoad/Assets/js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="/HomeWifiLoad/Assets/js/jquery-1.11.3.min.js"></script>
	<!--[if lte IE 7]>
		<link rel="stylesheet" type="text/css" href="//smart.com.ph/smartrevamp/AssetsResponsive/css/ie.css" media="screen" />
		<script src="//smart.com.ph/smartrevamp/AssetsResponsive/pngfix/iepngfix_tilebg.js" type="text/javascript"></script>
	<![endif]-->
</head>
<body id="PLDT">

	<!-- Google Tag Manager -->
    <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-NX8XXG"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-NX8XXG');</script>
    <!-- End Google Tag Manager -->
	
	<!--[if lt IE 7]>
		<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
	<![endif]-->
	<!--<div class="header container">
		<div class="row">
			<div class="logo col-xs-12">
				<img src="~/assets/images/pldt-logo-white.png" alt="PLDT Logo">
			</div>
		</div>
	</div>-->
	<div id="main">
		

<div id="inside">
	<div class="container new-contract">
		

<script type="text/javascript">
    $(document).ready(function () {
        $("div.modal-dialog").addClass("modal-lg");
        $("div.modal-header").removeClass("no-header");
        //document.getElementById("form-addon").reset();
        $('#availmentModalBodypop').modal('hide');
    });

    function closeModal() {
        $("#availmentModalpop3").fadeOut().removeClass("active");
        $(".modal-backdrop.in").fadeOut();
        $(".resetAddonspop2").fadeOut();
    }

    function closeModal2() {
        $(".img2").show();
        $(".img1").hide();
        $("#availmentModalpop2").fadeOut().removeClass("active");
        $(".resetAddonspop2").fadeOut();
        $(".modal-backdrop.fade.in").addClass('display');
        //  $("#availmentModalpop3").fadeOut();
        //  $(".modal-backdrop.in").fadeOut();

    }


    //function closeModal3() {
    //   $("#availmentModalpop").fadeOut().removeClass("active");
     //   $(".modal-backdrop.in").fadeOut();
      //  $(".resetAddonspop").fadeOut();
      //  $(".availmentModalpop3").fadeOut();

    //}

</script>

<div id="account-balance">

    <div class="col-xs-6 j45">
        <h2 class="hwd">Home WiFi Dashboard</h2><br /><br />
    </div>
    <div class="col-xs-6 j55">
        <span class="hwd-spiel">Subscribe to the latest FamLoad<br />promos and your family can enjoy!</span>
    </div>
    <div class="clear"></div>
    <div class="col-xs-6 j45 b-img">
        <img src="../assets/images/fam-new3.png" alt="Family" class="family">
    </div>

            <div class="balance prepaid col-xs-6 j55">
                                <div class="row prepaid remaining-bal">
                                <div class="depth1">
                                <div class="depth1a">
                                <div class="depth1b">
                                <div class="depth2">
                                <div class="depth3">
                                <div class="depth4">
                                    <div class="col-xs-12 col-sm-6 b-label">
                                        <p class="family-pack">LOAD BALANCE</p>
                                    </div>
                                    <div class="col-xs-12 col-sm-6 b-value">
                                        <p class="value bal-info">397.00</p>
                                            <p class="expiration dp-none">Expires on April 05, 2021 06:32 AM</p>
                                    </div>
                                    <div style="clear: both;"></div>
                                </div>
                                </div>
                                </div>
                                </div>
                                </div>
                                </div>
                                </div>
                                <div class="row prepaid open-access">
                                <div class="depth1">
                                <div class="depth1a">
                                <div class="depth1b">
                                <div class="depth2">
                                <div class="depth3">
                                <div class="depth4">
                                    <div class="col-xs-12 col-sm-6 b-label">
                                        <p class="family-pack">FAMLOAD OPEN ACCESS MB</p>
                                    </div>
                                    <div class="col-xs-12 col-sm-6 b-value">
                                        <p class="value bal-info">12291.19</p>
                                            <p class="expiration">Expires on April 19, 2020 05:10 PM</p>
                                    </div>
                                    <div style="clear: both;"></div>
                                </div>
                                </div>
                                </div>
                                </div>
                                </div>
                                </div>
                                </div>
                                <div class="row prepaid open-access">
                                <div class="depth1">
                                <div class="depth1a">
                                <div class="depth1b">
                                <div class="depth2">
                                <div class="depth3">
                                <div class="depth4">
                                    <div class="col-xs-12 col-sm-6 b-label">
                                        <p class="family-pack">HOLIDEALS FREE DATA ALLOCATION </p>
                                    </div>
                                    <div class="col-xs-12 col-sm-6 b-value">
                                        <p class="value bal-info">12015.99</p>
                                            <p class="expiration">Expires on April 19, 2020 05:10 PM</p>
                                    </div>
                                    <div style="clear: both;"></div>
                                </div>
                                </div>
                                </div>
                                </div>
                                </div>
                                </div>
                                </div>
            </div>

</div>


		<div id="mysmartModal" class="modal fade" role="dialog">
			<div class="modal-dialog">
				<!-- Modal content-->
				<div id="modalContent" class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">&times;</button>
						<h4 id="modalTitle" class="modal-title">Smart Dashboard</h4>
					</div>

					<div id="modalBody" class="modal-body">
						<p>Sorry, we have encountered an error. Please try again later.</p>
					</div>
					<div id="modalButton" class="modal-footer">
						<button type="button" class="btn ghost-blue" data-dismiss="modal" id="modalOkBtn">OK</button>
					</div>
				</div>
			</div>
		</div>

		<div id="adcModal" class="modal fade" role="dialog">
			<div class="modal-dialog">
				<!-- Modal content-->
				<div id="adcModalContent" class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" onclick="resetAdc();">&times;</button>
						<h4 id="adcModalTitle" class="modal-title">Smart Dashboard</h4>
					</div>

					<div id="adcModalBody" class="modal-body">
						<center><div id="loading-datacharging" style="display:none;">
							<img src="/HomeWifiLoad/Assets/images/load.gif"/>
						</div></center>
					</div>

					
				</div>
			</div>
		</div>

		<div id="availmentModal" class="modal fade" role="dialog">
			<div id="availDiv" class="modal-dialog">
				<!-- Modal content-->
				<div id="availmentModalContent" class="modal-content">
					<div id="availheaderDiv" class="modal-header no-header">
						<button type="button" class="close" data-dismiss="modal" onclick="resetAddons();">&times;</button>
						<h4 id="availmentModalTitle" class="modal-title">Smart Dashboard</h4>
					</div>

					<div id="availmentModalBody" class="modal-body">
						<center><div id="loading-availment" style="display:none;">
							<img src="/HomeWifiLoad/Assets/images/load.gif"/>
						</div></center>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
	</div>

 	<script type="text/javascript" src="/HomeWifiLoad/Assets/js/jquery-ui-1.9.2.tabs.js"></script>
    <script type="text/javascript" src="/HomeWifiLoad/Assets/js/modernizr-2.6.2.min.js"></script>
    <script type="text/javascript" src="/HomeWifiLoad/Assets/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/HomeWifiLoad/Assets/js/pace.min.js"></script>
    <script type="text/javascript" src="/HomeWifiLoad/Assets/js/pldtprepaidwifi.js"></script>

</body>
</html>
mak_kawa
Posts: 640
Joined: December 30th, 2015, 9:47 am

Re: If Match not working

Post by mak_kawa »

You are missing DynamicVariables=1 in the [MeasureTime] measure.
User avatar
balala
Rainmeter Sage
Posts: 10577
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: If Match not working

Post by balala »

EDIT: Sorry mak_kawa, you beat me.
Urzu7 wrote:
April 12th, 2020, 11:54 am
but the "If Match" is not working, anyone can help me?
Yep, we can. Just add a DynamicVariables=1 option to the [MeasureTime] measure.
Urzu7
Posts: 7
Joined: April 4th, 2020, 9:55 am

Re: If Match not working

Post by Urzu7 »

mak_kawa wrote:
April 12th, 2020, 12:25 pm
You are missing DynamicVariables=1 in the [MeasureTime] measure.
balala wrote:
April 12th, 2020, 12:32 pm
Yep, we can. Just add a DynamicVariables=1 option to the [MeasureTime] measure.
Work perfectly, Thank you mak_kawa and balala
User avatar
balala
Rainmeter Sage
Posts: 10577
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: If Match not working

Post by balala »

Urzu7 wrote:
April 12th, 2020, 1:33 pm
Work perfectly,
The value of the Var1 variable is changing dynamically whenever the value returned by either the [MeasureMonthExpire] or the [MeasureDateExpire] measure is changing. That's why the [MeasureTime] measure requires setting on the dynamic variables.
Glad you got it working.