123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849 |
- --小程序
- GITA=tdata.."git1.txt" GITB=tdata.."git2.txt"--web小程序重要参数
- 写入文件(GITA,"https://gitlab.com/txcgb/free/-/raw/master/tools/")
- 写入文件(GITB,"https://jihulab.com/txcgb/free/-/raw/master/tools/")
- -- 设置为竖屏模式
- activity.setRequestedOrientation(1)
- function hexToColor(hex)
- -- 去掉 # 前缀
- hex = hex:gsub("#", "")
- -- 将十六进制转换为数字
- local color = tonumber(hex, 16)
- return color
- end
- local hexColor = "#ff009688"
- local MyColor = hexToColor(hexColor)
- 写入文件(随机色,MyColor)
- 读取颜色(随机色,随机色)
- function 查看代码(文件名)
- 对话框()
- .设置消息(读取文件(FILES.."tools/"..文件名..".txt"))
- .显示()
- end
- function 布局边框(边框粗细,边框颜色,背景颜色,圆角大小)
- import "android.graphics.drawable.GradientDrawable"
- drawable=GradientDrawable()
- drawable.setShape(GradientDrawable.RECTANGLE)
- drawable.setStroke(边框粗细,tonumber(边框颜色))--边框粗细和颜色
- drawable.setColor(tonumber(背景颜色))--背景颜色
- drawable.setCornerRadius(圆角大小)--圆角
- return drawable
- end
- lay=
- {
- LinearLayout;
- orientation="vertical";
- background='#ffffff',
- {
- TextView;--文本控件
- text='网址大全';--显示文字
- id="隐藏功能",
- textSize='20sp';--文字大小
- textColor = '#333333',
- layout_marginTop = '35px',
- layout_gravity="center|bottom";
- };
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="浏览器",
- onClick=function()
- 子页面("安卓",读取文件(首页地址))
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor,0x00000000,17);
- },
- {
- Button,
- textSize="16dp",
- text="代码仓库",
- onClick=function()
- WEB小程序("daima")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="建站资源",
- onClick=function()
- WEB小程序("zhan")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="应用推荐",
- onClick=function()
- WEB小程序("vip")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="影视推荐",
- onClick=function()
- WEB小程序("ysdq")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="常用网站",
- onClick=function()
- WEB小程序("changyong")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="网址导航",
- onClick=function()
- WEB小程序("dh")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="电视直播",
- onClick=function()
- WEB小程序("tvlive")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="自有频道",
- id="自有频道",
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="收藏夹",
- id="删除收藏夹",
- onClick=function()
- WEB小程序("shoucang")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="历史记录",
- onClick=function()
- 子页面('安卓','file:///'..tdata..'His.html')
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="预留入口",
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- TextView;--文本控件
- text='云程序';--显示文字
- textSize='20sp';--文字大小
- textColor = '#333333',
- layout_marginTop = '35px',
- layout_gravity="center|bottom";
- };
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="RC4加解密",
- id="快解密";
- onClick=function()
- WEB小程序("jiemi")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="Base64编码",
- onClick=function()
- WEB小程序("base64")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="URL编码",
- onClick=function()
- WEB小程序("urlcode")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="MD5加密",
- onClick=function()
- WEB小程序("md5")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="特殊字符",
- onClick=function()
- WEB小程序("zifu")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="指南针",
- onClick=function()
- WEB小程序("zhinanzhen")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="Lua编辑器",
- id="编辑器",
- onClick=function()
- 写入文件(编辑路径,编辑文件)
- WEB小程序("bianjiqi1")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="手电筒(长按)",
- id="手电筒",
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="音乐播放器",
- onClick=function()
- WEB小程序("music")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="幸运数字",
- onClick=function()
- WEB小程序("suiji")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="QQ聊天",
- onClick=function()
- zdy_layout={
- LinearLayout;
- orientation="vertical";--重力属性
- id="zdy_father_layout",
- {
- EditText;--编辑框控件
- id="pathedit",
- layout_marginTop='15dp';--布局顶距
- layout_width="80%w";--编辑框宽度
- layout_gravity="center";--重力属性
- Hint="请输入QQ号";--设置编辑框为空时的提示文字
- };
- };
- AlertDialog.Builder(this)
- .setTitle("QQ聊天")--设置标题
- .setCancelable(false)--点击外围可取消
- .setView(loadlayout(zdy_layout))--设置布局
- .setPositiveButton("聊一聊",function(v)--设置积极按钮
- 联系QQ(pathedit.text)
- end)
- .setNegativeButton("取消",function(v)--设置消极按钮
- end)
- .show()
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="微信扫一扫",
- id="sys",
- onClick=function()
- 微信扫一扫()
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="网页计算器",
- onClick=function()
- 子页面("安卓","http://txcgb.web3v.work/dh/jisuanqi/")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="计算器小程序",
- onClick=function()
- WEB小程序("jisuanqi")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="小时钟",
- id="小时钟",
- onClick=function()
- WEB小程序("clock")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="文字图标",
- onClick=function()
- WEB小程序("wztb")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="一把尺子",
- onClick=function()
- WEB小程序("rule")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="小黄人",
- onClick=function()
- WEB小程序("xiaohuangren")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="蹦蹦跳跳",
- onClick=function()
- WEB小程序("tiao")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="文字翻转",
- onClick=function()
- 文字翻转()
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="搜索引擎",
- onClick=function()
- 搜索引擎()
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="下载文件",
- onClick=function()
- 下载文件()
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="二维码",
- id="二维码",
- onClick=function()
- 子页面("安卓","http://txcgb.web3v.work/dh/ewm/")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="加密文档",
- onClick=function()
- WEB小程序("wendang")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="微信零钱",
- onClick=function()
- WEB小程序("0qian")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="微信零钱通",
- onClick=function()
- WEB小程序("0qiantong")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="井字棋",
- onClick=function()
- WEB小程序("jing")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- {
- LinearLayout,
- layout_width="100%w",
- layout_height="50dp",
- layout_weight="1.0",
- {
- Button,
- textSize="16dp",
- text="小米翻译",
- onClick=function()
- WEB小程序("fanyi")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="万年历",
- onClick=function()
- 子页面("安卓","http://txcgb.web3v.work/wnl/sxwnl/source/indexmp.htm")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- {
- Button,
- textSize="16dp",
- text="预留入口",
- onClick=function()
- --WEB小程序("jing")
- end,
- layout_width="fill",
- layout_height="fill",
- layout_weight="1.0",
- layout_margin='5dp';--卡片边距
- BackgroundDrawable=布局边框(4,MyColor ,0x00000000,15);
- },
- },
- }
- webView.addView(loadlayout(lay))
- sys.onLongClick=function()
- 支付宝扫一扫()
- end
- 小时钟.onLongClick=function()
- WEB小程序("clock1")
- end
- function 搜索引擎()
- -----分割线-----
- zdy_layout={
- LinearLayout;
- orientation="vertical";--重力属性
- id="zdy_father_layout",
- {
- EditText;--编辑框控件
- id="pathedit",
- layout_marginTop='15dp';--布局顶距
- layout_width="80%w";--编辑框宽度
- layout_gravity="center";--重力属性
- Hint="请输入关键词";--设置编辑框为空时的提示文字
- };
- };
- 对话框()
- .设置标题("搜索引擎")--设置标题
- .setCancelable(true)--点击外围可取消
- .setView(loadlayout(zdy_layout))--设置布局
- .设置积极按钮("影视搜索",function(v)--设置积极按钮
- 子页面("安卓","http://hly.txcgb.site/jx/?url="..pathedit.text)
- end)
- .设置中立按钮("网页搜索",function(v)--设置中立按钮
- 子页面("安卓","http://cn.bing.com/search?q="..pathedit.text)
- end)
- .设置消极按钮("游戏搜索",function(v)--设置消极按钮
- 子页面("安卓","http://a.ruansky.com/search?words="..pathedit.text)
- end)
- .显示()
- ----分割线-----
- end
- function 文字翻转()
- -----分割线-----
- zdy_layout={
- LinearLayout;
- orientation="vertical";--重力属性
- id="zdy_father_layout",
- {
- EditText;--编辑框控件
- id="pathedit",
- layout_marginTop='15dp';--布局顶距
- layout_width="80%w";--编辑框宽度
- layout_gravity="center";--重力属性
- Hint='请输入翻转文字(默认"txcgb")';--设置编辑框为空时的提示文字
- };
- };
- 对话框()
- .设置标题("文字翻转")--设置标题
- .setCancelable(true)--点击外围可取消
- .setView(loadlayout(zdy_layout))--设置布局
- .设置积极按钮("确认",function(v)--设置积极按钮
- if pathedit.text=="" then
- 写入文件(tdata.."翻转.txt","txcgb")
- else
- 写入文件(tdata.."翻转.txt",pathedit.text)
- end
- WEB小程序("zhuan")
- end)
- .设置消极按钮("取消",function(v)--设置消极按钮
- end)
- .显示()
- ----分割线-----
- end
- 快解密.onLongClick=function()
- 解密云程序("kuaijiemi")
- return true--防止触发点击事件
- end
- 隐藏功能.onLongClick=function()
- 初始功能设置()
- return true--防止触发点击事件
- end
- 删除收藏夹.onLongClick=function()
- 对话框()
- .设置标题('警告!')
- .设置消息('是否确定删除收藏夹,该操作不可恢复')
- .设置积极按钮('确认',function (v)
- 写入文件(收藏小程序,收藏夹头文件)
- end)
- .设置消极按钮('取消')
- .显示()
- return true--防止触发点击事件
- end
-
- 编辑器.onLongClick=function()
- WEB小程序("bianjiqi")
- return true--防止触发点击事件
- end
- 二维码.onLongClick=function()
- 子页面("安卓","http://txcgb.web3v.work/dh/ewm/")
- return true--防止触发点击事件
- end
- 手电筒.onLongClick=function()
- 手电筒()
- return true--防止触发点击事件
- end
- 自有频道.onClick=function()
- 密码打开网页('535934D1537AD2E6B7ED663A727EFB4EF1B27CA2A818D86697CD6983FCDA645AF72C7B83C3')
- end
- function 手电筒()
- function 电筒(开关)
- CameraManager=this.getSystemService(Context.CAMERA_SERVICE) CameraManager.setTorchMode("0",开关)
- end
- if 开关==true then
- 电筒(false)
- 开关=false
- else
- 电筒(true)
- 开关=true
- end
- end
|