console.show();
tm = new Date();
t1 = 11;
t2 = 30;
t3 = 1;
checkTime = function( tm1,tm3,tm3 ){
	tm = new Date();
	if( tm.getHours()>=t1 && tm.getMinutes()>=t2 && tm.getSeconds()>=t3 ) return true;
	return false;
}
t = text("结算").findOnce(1);
if( t ){
	curr = 0;
	while( !checkTime() ){
		tm = new Date();
		if( tm.getSeconds()> curr || tm.getSeconds()==0 ){
			console.log( tm.getHours()+":"+tm.getMinutes()+":"+tm.getSeconds() );
			curr = tm.getSeconds();
		}
		sleep(100);
	}
	console.clear();
	console.log("开始点击");
	while( true ){
		if( t ){
			t.click();
			tm = new Date();
			h = tm.getHours();
			m = tm.getMinutes();
			s = tm.getSeconds();
			console.log( h+":"+m+":"+s );
			sleep(1000 * 12);
		}else{
			console.log("按钮无效,或已准备支付,已退出");
			break;
		}
	}
}else{
	alert("未抓取到按钮,无法结算");
}