Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

问题反馈 #81

Open
gaohan-cmd opened this issue Jun 22, 2020 · 8 comments
Open

问题反馈 #81

gaohan-cmd opened this issue Jun 22, 2020 · 8 comments

Comments

@gaohan-cmd
Copy link

每日答题中的有提示的,无法提取出来答案,显示“徐特立”

@lolisaikou
Copy link

只有填空有问题吧
image
错误效果
image
可以暂时把getFitbQuestion()函数里的blankCount += 1换成(其实可以写成blankCount++)
blankCount = (className("EditText").findOnce().parent().childCount() - 1);
(不过这样碰到双填空会报错,不过试了好几天都没碰到)

@gaohan-cmd
Copy link
Author

gaohan-cmd commented Jun 22, 2020 via email

@lolisaikou
Copy link

lolisaikou commented Jun 22, 2020

/**
 * @description: 获取填空题题目数组
 * @param: null
 * @return: questionArray
 */
function getFitbQuestion() {
    var questionCollections = className("EditText").findOnce().parent().parent();
    var questionArray = [];
    var findBlank = false;
    var blankCount = 0;
    var blankNumStr = "";
    var i = 0;
    questionCollections.children().forEach(item => {
        if (item.className() != "android.widget.EditText") {
            if (item.text() != "") {//题目段
                if (findBlank) {
                    blankNumStr = "|" + blankCount.toString();
                    questionArray.push(blankNumStr);
                    findBlank = false;
                }
                questionArray.push(item.text());
            }
            else {
                findBlank = true;
                blankCount = (className("EditText").findOnce(i).parent().childCount() - 1);
                i++;
            }
        }
    });
    return questionArray;
}

直接把getFitbQuestion()函数换成我这个
image
我这里是没有问题的(图里是这个脚本改的功能分离版)

@gaohan-cmd
Copy link
Author

gaohan-cmd commented Jun 22, 2020 via email

@eurekaqian
Copy link

改了之后出错,reference error “activity” is not defined,请问怎么解决

@ba4met
Copy link

ba4met commented Jul 14, 2020

@lolisaikou 脚本点卡“查看提示”后不能提取答案,一直卡在“查看提示”这里,是不是和这个问题类似?大佬有代码吗?

@lolisaikou
Copy link

@lolisaikou 脚本点卡“查看提示”后不能提取答案,一直卡在“查看提示”这里,是不是和这个问题类似?大佬有代码吗?

@ba4met 没遇到,你可以看我主页,我用这个脚本做了个功能分离的版本,一直在维护

@sanfordkai
Copy link

@lolisaikou 脚本点卡“查看提示”后不能提取答案,一直卡在“查看提示”这里,是不是和这个问题类似?大佬有代码吗?

@ba4met 没遇到,你可以看我主页,我用这个脚本做了个功能分离的版本,一直在维护

大佬,千万别弃坑啊,支持你!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@ba4met @lolisaikou @sanfordkai @gaohan-cmd @eurekaqian and others