autojs如何加自定义弹窗(随机彩色)

北城以北 提交于 2020-08-09 21:39:16

autojs,auto.js如何加随机彩色弹窗

***话不多说,直接上代码***直接运行即可

//在ui下面加
function sjcl() {
    let d = ["red", "green", "blue", "purple"]
    let y = random(0, 3)
    return d[y]

}

var Q="553908361"
var isFold = false,
    isRunning = false,
    isRotate = null;
var ys = sjcl();
var QQ = "1906507927";

var h = device.height;
var w = device.width;
dialogs.build({
    title: "欢迎加入autojs脚本交流群",
    titleColor: ys,
    content: "作者QQ:" + QQ + "\nautojs脚本交流Q群:" + Q,
    contentColor: ys,
    cancelable: true,
    positive: "加入Q群",
    positiveColor: ys,
    neutral: "取消",
    neutralColor: ys,
    negative: "联系作者",
    negativeColor: ys
}).on("positive", () => {
    app.startActivity({
        action: "android.intent.action.VIEW",
        data: "mqqapi://card/show_pslcard?card_type=group&uin=" + Q,
        packageName: "com.tencent.mobileqq",
    });
    toast("加入Q群")
}).on("negative", () => {
    app.startActivity({
        action: "android.intent.action.VIEW",
        data: "mqqapi://card/show_pslcard?uin=" + QQ,
        packageName: "com.tencent.mobileqq",
    })

    toast("联系作者")
}).on("neutral", () => {
    //取消键
    toast("返回")

}).show();

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!