最近天貓雙11活動,對於繁雜的瀏覽店鋪領喵幣實在是懶得動手,就寫了個小腳本進行模擬。將源代碼和使用教程和大家分享。
本教程為免費學習分享,文件僅供學習使用,請下載者於24小時內刪除,請勿用於商業用途,如涉侵權請聯系我進行刪除。
先貼源代碼,有js的直接在活動頁面運行就可以了。現在只適配了主流了1080P分辨率的手機,如果有其他手機不支持的話多寫一個if語句就可以。
auto.waitFor(); var height = device.height; var width = device.width; toast("\n設備寬" + width + "\n" + "設備高" + height + "\n" + "手機型號" + device.model + "\n安卓版本" + device.release) if (height == 1920) { //設置腳本坐標點擊所適合的屏幕寬高。 setScreenMetrics(1080, 1920); toast("設備高" + height); lingqu() } else if (height == 2340) { setScreenMetrics(1080, 2340); toast("設備高"+height); lingqu() } function lingqu(){ click(547,1264);//點貓 領金幣 // //瀏覽15秒領金幣 sleep(1500); click(911,1716); sleep(1500); if(text("簽到").exists()){ text("簽到").findOne().click(); sleep(1600); toast("簽到成功") } sleep(1500); while(text("去進店").exists()){ //要支持的動作 toast("存在去進店"); text("去進店").findOne().click(); sleep(2500); swipe(width / 2, height - 600, width / 2, 0, 500); sleep(3500); swipe(width / 2, height - 600, width / 2, 0, 500); sleep(10000); swipe(width / 2, height - 600, width / 2, 0, 500); sleep(9000); back(); sleep(1000); } while(text("去瀏覽").exists()){ //要支持的動作 toast("存在去瀏覽"); text("去瀏覽").findOne().click(); sleep(1500); swipe(width / 2, height - 500, width / 2, 0, 500); sleep(2500); swipe(width / 2, height - 500, width / 2, 0, 500); sleep(10000); swipe(width / 2, height - 500, width / 2, 0, 500); sleep(8000); back(); sleep(1600); } toast("結束"); }
接下來講解使用教程,首先打開程序
點擊右下角加號,導入js文件
打開左邊的懸浮窗選項
在活動頁面點擊懸浮窗第一個按鈕,運行腳本,即可自動領取喵幣。
程序壓縮包如下:
鏈接:https://pan.baidu.com/s/1KfqCgZ3wHnsmlPnH3QLWcg
提取碼:7e2p
復制這段內容后打開百度網盤手機App,操作更方便哦