SOURCE

//取出现行时间戳

var d = new Date() ;
var now = Math.round( d / 1000);

log(d.getHours())

d.setHours(0);

d.setMinutes(0)

d.setMilliseconds(0)

log(d.getHours())

var timing = Math.round( d / 1000);

var timeOut = timing - now;

log(timeOut)

setTimeout(function(){
    log(
   
   function start() {
       auto.waitFor()
       var appName = "com.taobao.taobao";
       if (launch(appName)){
           console.info("启动淘宝APP");
       }else{
           console.info("请手动启动淘宝APP")
       }
       
       console.show();
   }

   ,function enterActivity() {
   const Shopping_Cart = '购物车';
   const Yes_Oul = 'yesoul野小兽旗舰店';
   const Settlement = '结算';
   const Order_form = '提交订单'
   
   //购物车
   if (text(Shopping_Cart).exists()) {
       text(Shopping_Cart).findOne().click();
   }
   
   //旗舰店
   if (text(Yes_Oul).exists()) {
       text(Yes_Oul).findOne().click();
   }
   
   //结算
   if (text(Settlement).exists()) {
       text(Settlement).findOne().click();
   }
   
   //提交订单
   if (text(Order_form).exists()) {
       text(Order_form).findOne().click();
   }
   
    }
  );

},timeOut * 1000);
console 命令行工具 X clear

                    
>
console