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

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();

你可能感兴趣的:(autojs,auto.js)