| 1070 | if (wnds.empty() || index < 0 || index >= wnds.size()) return nullptr; |
| 1071 | |
| 1072 | if (args.size() > 4) inter->setValue(args[4].toString(), wnds.size()); |
| 1073 | std::sort(wnds.begin(), wnds.end()); |
| 1074 | return wnds[index]; |
| 1075 | } |
| 1076 | }; |
| 1077 | /* |
| 1078 | str name: window name |
| 1079 | str class: window class |
| 1080 | str process_path: window of process path |
| 1081 | int index: index of windows |
| 1082 | str var_name: var name for accept window count |
| 1083 | |
| 1084 | ptr return |
| 1085 | */ |
| 1086 | struct QiFunc_wnd_find_other : public QiFunc |
| 1087 | { |
| 1088 | QiFunc_wnd_find_other() : QiFunc(1, 4) {} |
| 1089 | QiVar exec(const std::vector<QiVar>& args, QiScriptInterpreter* inter) const override |
| 1090 | { |