Git Product home page Git Product logo

Comments (7)

tzwsoho avatar tzwsoho commented on July 2, 2024 1

玩不起了哈。。
0ABBCC09

from auto_snail_lucky.

huanghe2015 avatar huanghe2015 commented on July 2, 2024 1

对iOS领域有兴趣的可以看下EasyClick。

from auto_snail_lucky.

historicgracer avatar historicgracer commented on July 2, 2024

微信图片_20220509141732

from auto_snail_lucky.

historicgracer avatar historicgracer commented on July 2, 2024

留了支付宝小程序入口,那玩意得autojs之类的才能弄吧,趁还有一个月肝完这些资源(泪目)

from auto_snail_lucky.

huanghe2015 avatar huanghe2015 commented on July 2, 2024

留了支付宝小程序入口,那玩意得autojs之类的才能弄吧,趁还有一个月肝完这些资源(泪目)

前期的内容我已经写的差不多了,先分享一下。主要是线性流程太慢了,界面越到后面越卡,还有自选码不知道要怎么搞。

/*
 * @Author       : AK88
 * @Date         : 2021-05-19 21:51:52
 * @Description  : 几羊自动抽奖,按下自动寻找抽奖。
 * @LastEditTime : 2021-7-11 11:25:15
 * @LastEditors  : AK88
 * @TODO         : T
 */
//
// 假设你已经打开了搜索抽奖界面
function trick()
{
	toastLog('碰到暗桩啦!');
	scrollBackward();
	scrollDown();
}
function main()
{
	// 配置
	const JOIN_TEXT='参与抽奖';
	const JOIN_CONFIRMATION='得抽奖码并组队';
	const SURE_TEXT='0元抽奖';
	const MAIN_TEXT='发现';
	const YAO_NEED=false;
	const YAO_CAPTURE_TEXT='摇一摇再拿一注抽奖码';
	const YAO_COMFIRMENT='正在匹配同时摇一摇的用户';
	const TRICK_HINT1='正在努力加载中...';
	const END_TEXT='没有更多内容啦';
	const COLLECTION_TEXT='收藏';
	// 执行
	while(true)
	{
		while(true)
		{
			let join=text(JOIN_TEXT).findOnce();
			if(join)
			{
				join.click();
				// 网络不好,等待抽奖页面加载完毕
				// sleep(1000);
				// textContains(JOIN_CONFIRMATION).waitFor();
				// toastLog('准备找抽奖按钮了');
				if(text(JOIN_CONFIRMATION).findOne()||text(JOIN_CONFIRMATION).findOnce()||textContains(JOIN_CONFIRMATION).findOne()||textContains(JOIN_CONFIRMATION).findOnce())
				{
					// toastLog('找到抽奖按钮了');
					break;
				}
			}
			else
			{
				toast('没找到啊,往下翻');
				scrollDown();
				//暗桩处理
				if(text(TRICK_HINT1).findOnce())
				{
					trick();
					scrollDown();
				}
				else if(text(END_TEXT).findOnce())
				{
					for(let i=0;i<3;i++)
					{
						trick();
					}
					if(text(END_TEXT).findOnce())
					{
						toast('啊偶,结束了。换下一个吧!');
						return 0;
					}
				}
			}
		}
		toastLog('已经进抽奖页面了');
		while(true)
		{
			try
			{
				// TODO: 先点击收藏,为跑Python脚本做准备;
				let collect=text(COLLECTION_TEXT).findOnce();
				if(collect) collect.click();
				let champ=text(SURE_TEXT).findOne();
				champ.click();
				sleep(100);
				// 补刀
				for(let i=0;i<3;i++)
				{
					click(540,1950);
				}
				//网络不好,等待结果
				if(text('羊毛不足').findOnce())
				{
					toast('啊偶,结束了');
					return 0;
				}
				else if(text('商品金额超出上限').findOnce())
				{
					toast('啊偶,卡住了');
					return 0;
				}
				else if(text('抽奖码正在生成中......').findOne())
				{
					break;
				}
				else if(text('您的抽奖码已生成').findOne())
				{
					break;
				}
				else if(text('请稍等').findOne())
				{
					break;
				}
			}
			catch(error)
			{
				//抓不到抽奖按钮可能会导致异常退出
				toastLog('抽奖出错啦!');
				toastLog(error);
				sleep(1000);
			}
		}
		if(YAO_NEED)
		{


			// 摇一摇流程
			text(YAO_CAPTURE_TEXT).waitFor();
			while(true)
			{
				try
				{
					let yao=text('摇一摇').findOnce();
					if(yao)
					{
						toastLog('找到摇一摇了');
						yao.click();
						sleep(3000);
						if(text(YAO_COMFIRMENT).findOnce())
						{
							break;
						}
					}
				}
				catch(error)
				{
					//抓不到抽奖按钮可能会导致异常退出
					toastLog('摇一摇出错啦!');
					toastLog(error);
				}
			}
			text(YAO_COMFIRMENT).waitFor();
		}
		//退回到搜索结果页
		while(true)
		{
			//返回主页
			let main=text(MAIN_TEXT).findOnce();
			if(main)
			{
				break;
			}
			else
			{
				back();
				sleep(1250);
				// break;
			}
		}
	}
}
main();

from auto_snail_lucky.

gghao78 avatar gghao78 commented on July 2, 2024

有哪个大佬会用iOS快捷指令做一个自动抽奖/(ㄒoㄒ)/~~

from auto_snail_lucky.

huanghe2015 avatar huanghe2015 commented on July 2, 2024

有哪个大佬会用iOS快捷指令做一个自动抽奖/(ㄒoㄒ)/~~

肯定不行的啦。如果快捷指令支持无障碍的话,早就被用烂了。现在的只支持通过URL去访问APP里的内容。

from auto_snail_lucky.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.