Jump to content

Recommended Posts

Quote

Command Prompt - "ConsoleApp3.exe - Shortcut.lnk"  
title bar
Microsoft Windows [Version 10.0.16299.402]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\root>cd Desktop

C:\Users\root\Desktop>"ConsoleApp3.exe - Shortcut.lnk" > file.txt

C:\Users\root\Desktop>"ConsoleApp3.exe - Shortcut.lnk" > file.txt

C:\Users\root\Desktop>"ConsoleApp3.exe - Shortcut.lnk" > file.txt

So, I made this console app--using TreeWalkers of course to walk the UI Tree-- that starts at the root and looks for enabled, active controls--and in piping that to a file, I got this (edited, lots of controls in that list), above. LOL, so, those commands that are stored in memory are control elements! Sweet. this UIAutomation stuff is awesome. @junkew got me into this, blame his IUIAutomation kit. So there is this OLD vb OCX that is super ornery, but his kit can manipulate it, even if it is just SendKeys, So I must build a C# wrapper of my own... LOL this stuff is so cool. I have tried TestStack.White and MANY other wrappers, they seriously suck, no support either.

I used canned Microsoft example code too for the most part. This is an extreme for me though, our modern stuff I can test easily enough, but I want my own kit to use to discover and poke around with. I like to use the IUIAutomation tool as a sanity check too, it's very useful.

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By TheDcoder
      Hello, many of you already know I'm working on a new programming language and I need some help to figure out an issue in the parser. I'm posting it here with the hope that someone knowledgeable enough can point out the solution and to also document this issue as I may forget the details if I don't make progress and set it aside.
      Here's the parser:
      /* * This file is part of EasyCodeIt. * * Copyright (C) 2021 TheDcoder <TheDcoder@protonmail.com> * * EasyCodeIt is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ %define parse.trace %code requires { #define _GNU_SOURCE /* Required to enable (v)asprintf */ #include <stdbool.h> #include "parser/tree.h" #include "parser/parser_internal.h" } %union { double num; struct { char *str; size_t len; } str; bool boolean; struct Expression expr; struct ExpressionList expr_list; } %token UNKNOWN %token WS %token NL '\n' %token COMMENT %token DIRECTIVE %token <num> NUMBER %token <str> STRING %token <boolean> BOOL %token <str> WORD %token <str> MACRO %token <str> VARIABLE %token OPERATOR %token BRACKET %token DOT %token COMMA /* Keywords */ %token K_DIM "Dim" %token K_LOCAL "Local" %token K_GLOBAL "Global" %token K_ENUM "Enum" %token K_CONST "Const" %token K_STATIC "Static" %token K_CONTINUE_CASE "ContinueCase" %token K_CONTINUE_LOOP "ContinueLoop" %token K_DEFAULT "Default" %token K_NULL "Null" %token K_DO "Do" %token K_UNTIL "Until" %token K_WHILE "While" %token K_END_WHILE "WEnd" %token K_FOR "For" %token K_IN "In" %token K_TO "To" %token K_STEP "Step" %token K_NEXT "Next" %token K_EXIT "Exit" %token K_EXITLOOP "ExitLoop" %token K_FUNC "Func" %token K_RETURN "Return" %token K_END_FUNC "EndFunc" %token K_IF "If" %token K_ELSE "Else" %token K_ELSE_IF "ElseIf" %token K_END_IF "EndIf" %token K_REDIM "ReDim" %token K_SELECT "Select" %token K_SWITCH "Switch" %token K_CASE "Case" %token K_END_SELECT "EndSelect" %token K_END_SWITCH "EndSwitch" /* Operators */ %precedence '?' %precedence ':' %left AND "And" OR "Or" %left LT '<' GT '>' LTE "<=" GTE ">=" EQU '=' NEQ "<>" SEQU "==" %left '&' %left '+' '-' %left '*' '/' %left '^' %left NOT "Not" %precedence INVERSION %precedence '.' /* WORKAROUND: Bison can't handle "sandwich" operators which surround the 2nd part of a binary expression */ %precedence '[' %precedence '(' %precedence GROUPING %type <expr> expression %type <expr_list> expression_list %{ int yylex(); void yyerror(const char *s); %} %% top: /* nothing */ | expression_list {print_expr($1.expression);} expression: BOOL {$$ = expr_from_prim(&(struct Primitive){.type = PRI_BOOLEAN, .boolean = $1});} | NUMBER {$$ = expr_from_prim(&(struct Primitive){.type = PRI_NUMBER, .number = $1});} | STRING {$$ = expr_from_str($1.str, $1.len);} | WORD {$$ = expr_from_ident($1.str, $1.len);} | MACRO {$$ = expr_from_ident($1.str, $1.len);} | VARIABLE {$$ = expr_from_ident($1.str, $1.len);} | expression '?' expression ':' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3, &$5}, 3, OP_CON);} | expression "And" expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_AND);} | expression "Or" expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_OR);} | expression '<' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_LT);} | expression '>' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_GT);} | expression '=' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_EQU);} | expression "<=" expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_LTE);} | expression ">=" expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_GTE);} | expression "<>" expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_NEQ);} | expression "==" expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_SEQU);} | expression '&' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_CAT);} | expression '+' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_ADD);} | expression '-' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_SUB);} | expression '*' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_MUL);} | expression '/' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_DIV);} | expression '^' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_EXP);} | "Not" expression {$$ = expr_from_expr((struct Expression *[]){&$2}, 1, OP_NOT);} | '-' expression %prec INVERSION {$$ = expr_from_expr((struct Expression *[]){&$2}, 1, OP_INV);} /*| expression '.' WORD {$$ = expr_from_expr((struct Expression *[]){&$1, &(struct Expression){expr_from_ident($3.str, $3.len)}}, 2, OP_ACC);}*/ | expression '.' WORD { struct Expression ident_expr = expr_from_ident($3.str, $3.len); $$ = expr_from_expr((struct Expression *[]){&$1, &ident_expr}, 2, OP_ACC); } | expression '[' expression ']' {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_ACC);} | expression '(' expression_list ')' {$$ = expr_from_call(&$1, &$3);} | expression '(' ')' {$$ = expr_from_call(&$1, NULL);} /* | expression '(' expression_list ')' %prec CALL {$$ = expr_from_call(&$1, &$3);} | expression '(' ')' %prec CALL {$$ = expr_from_call(&$1, NULL);} */ | '(' expression ')' %prec GROUPING {$$ = $2;} expression_list: /* expression {$$ = (struct ExpressionList){.expression = , .list = NULL};} | expression ',' expression_list {$$ = (struct ExpressionList){.expression = &$1, .list = &$3};} */ expression {$$ = exprlist_from_expr(&$1, NULL);} /* | expression ',' expression_list {$$ = exprlist_from_expr(&$1, &$3);} | expression '\n' expression_list {$$ = exprlist_from_expr(&$1, &$3);} */ | expression_list ',' expression {$$ = exprlist_from_expr(&$3, &$1);} | expression_list '\n' expression {$$ = exprlist_from_expr(&$3, &$1);} %% #include "parser/parser.c" And the "parser output" by Bison:
      Terminals unused in grammar UNKNOWN WS NL COMMENT DIRECTIVE OPERATOR BRACKET DOT COMMA "Dim" "Local" "Global" "Enum" "Const" "Static" "ContinueCase" "ContinueLoop" "Default" "Null" "Do" "Until" "While" "WEnd" "For" "In" "To" "Step" "Next" "Exit" "ExitLoop" "Func" "Return" "EndFunc" "If" "Else" "ElseIf" "EndIf" "ReDim" "Select" "Switch" "Case" "EndSelect" "EndSwitch" AND OR LT GT LTE GTE EQU NEQ SEQU NOT Grammar 0 $accept: top $end 1 top: ε 2 | expression_list 3 expression: BOOL 4 | NUMBER 5 | STRING 6 | WORD 7 | MACRO 8 | VARIABLE 9 | expression '?' expression ':' expression 10 | expression "And" expression 11 | expression "Or" expression 12 | expression '<' expression 13 | expression '>' expression 14 | expression '=' expression 15 | expression "<=" expression 16 | expression ">=" expression 17 | expression "<>" expression 18 | expression "==" expression 19 | expression '&' expression 20 | expression '+' expression 21 | expression '-' expression 22 | expression '*' expression 23 | expression '/' expression 24 | expression '^' expression 25 | "Not" expression 26 | '-' expression 27 | expression '.' WORD 28 | expression '[' expression ']' 29 | expression '(' expression_list ')' 30 | expression '(' ')' 31 | '(' expression ')' 32 expression_list: expression 33 | expression_list ',' expression 34 | expression_list '\n' expression Terminals, with rules where they appear $end (0) 0 '\n' (10) 34 '&' (38) 19 '(' (40) 29 30 31 ')' (41) 29 30 31 '*' (42) 22 '+' (43) 20 ',' (44) 33 '-' (45) 21 26 '.' (46) 27 '/' (47) 23 ':' (58) 9 '<' (60) 12 '=' (61) 14 '>' (62) 13 '?' (63) 9 '[' (91) 28 ']' (93) 28 '^' (94) 24 error (256) UNKNOWN (258) WS (259) NL (260) COMMENT (261) DIRECTIVE (262) NUMBER <num> (263) 4 STRING <str> (264) 5 BOOL <boolean> (265) 3 WORD <str> (266) 6 27 MACRO <str> (267) 7 VARIABLE <str> (268) 8 OPERATOR (269) BRACKET (270) DOT (271) COMMA (272) "Dim" (273) "Local" (274) "Global" (275) "Enum" (276) "Const" (277) "Static" (278) "ContinueCase" (279) "ContinueLoop" (280) "Default" (281) "Null" (282) "Do" (283) "Until" (284) "While" (285) "WEnd" (286) "For" (287) "In" (288) "To" (289) "Step" (290) "Next" (291) "Exit" (292) "ExitLoop" (293) "Func" (294) "Return" (295) "EndFunc" (296) "If" (297) "Else" (298) "ElseIf" (299) "EndIf" (300) "ReDim" (301) "Select" (302) "Switch" (303) "Case" (304) "EndSelect" (305) "EndSwitch" (306) AND (307) "And" (308) 10 OR (309) "Or" (310) 11 LT (311) GT (312) LTE (313) "<=" (314) 15 GTE (315) ">=" (316) 16 EQU (317) NEQ (318) "<>" (319) 17 SEQU (320) "==" (321) 18 NOT (322) "Not" (323) 25 INVERSION (324) GROUPING (325) Nonterminals, with rules where they appear $accept (89) on left: 0 top (90) on left: 1 2 on right: 0 expression <expr> (91) on left: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 on right: 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 expression_list <expr_list> (92) on left: 32 33 34 on right: 2 29 33 34 State 0 0 $accept: • top $end NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 $default reduce using rule 1 (top) top go to state 10 expression go to state 11 expression_list go to state 12 State 1 4 expression: NUMBER • $default reduce using rule 4 (expression) State 2 5 expression: STRING • $default reduce using rule 5 (expression) State 3 3 expression: BOOL • $default reduce using rule 3 (expression) State 4 6 expression: WORD • $default reduce using rule 6 (expression) State 5 7 expression: MACRO • $default reduce using rule 7 (expression) State 6 8 expression: VARIABLE • $default reduce using rule 8 (expression) State 7 26 expression: '-' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 13 State 8 25 expression: "Not" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 14 State 9 31 expression: '(' • expression ')' NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 15 State 10 0 $accept: top • $end $end shift, and go to state 16 State 11 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' 32 expression_list: expression • '?' shift, and go to state 17 "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 32 (expression_list) State 12 2 top: expression_list • 33 expression_list: expression_list • ',' expression 34 | expression_list • '\n' expression '\n' shift, and go to state 36 ',' shift, and go to state 37 $default reduce using rule 2 (top) State 13 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 26 | '-' expression • 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 26 (expression) State 14 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 25 | "Not" expression • 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 25 (expression) State 15 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' 31 | '(' expression • ')' '?' shift, and go to state 17 "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 ')' shift, and go to state 38 State 16 0 $accept: top $end • $default accept State 17 9 expression: expression '?' • expression ':' expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 39 State 18 10 expression: expression "And" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 40 State 19 11 expression: expression "Or" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 41 State 20 12 expression: expression '<' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 42 State 21 13 expression: expression '>' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 43 State 22 15 expression: expression "<=" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 44 State 23 16 expression: expression ">=" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 45 State 24 14 expression: expression '=' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 46 State 25 17 expression: expression "<>" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 47 State 26 18 expression: expression "==" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 48 State 27 19 expression: expression '&' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 49 State 28 20 expression: expression '+' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 50 State 29 21 expression: expression '-' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 51 State 30 22 expression: expression '*' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 52 State 31 23 expression: expression '/' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 53 State 32 24 expression: expression '^' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 54 State 33 27 expression: expression '.' • WORD WORD shift, and go to state 55 State 34 28 expression: expression '[' • expression ']' NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 56 State 35 29 expression: expression '(' • expression_list ')' 30 | expression '(' • ')' NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 ')' shift, and go to state 57 expression go to state 11 expression_list go to state 58 State 36 34 expression_list: expression_list '\n' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 59 State 37 33 expression_list: expression_list ',' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 60 State 38 31 expression: '(' expression ')' • $default reduce using rule 31 (expression) State 39 9 expression: expression • '?' expression ':' expression 9 | expression '?' expression • ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '?' shift, and go to state 17 ':' shift, and go to state 61 "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 State 40 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 10 | expression "And" expression • 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 10 (expression) State 41 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 11 | expression "Or" expression • 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 11 (expression) State 42 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 12 | expression '<' expression • 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 12 (expression) State 43 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 13 | expression '>' expression • 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 13 (expression) State 44 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 15 | expression "<=" expression • 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 15 (expression) State 45 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 16 | expression ">=" expression • 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 16 (expression) State 46 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 14 | expression '=' expression • 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 14 (expression) State 47 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 17 | expression "<>" expression • 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 17 (expression) State 48 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 18 | expression "==" expression • 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 18 (expression) State 49 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 19 | expression '&' expression • 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 19 (expression) State 50 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 20 | expression '+' expression • 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 20 (expression) State 51 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 21 | expression '-' expression • 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 21 (expression) State 52 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 22 | expression '*' expression • 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 22 (expression) State 53 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 23 | expression '/' expression • 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 23 (expression) State 54 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 24 | expression '^' expression • 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 24 (expression) State 55 27 expression: expression '.' WORD • $default reduce using rule 27 (expression) State 56 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 28 | expression '[' expression • ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '?' shift, and go to state 17 "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 ']' shift, and go to state 62 State 57 30 expression: expression '(' ')' • $default reduce using rule 30 (expression) State 58 29 expression: expression '(' expression_list • ')' 33 expression_list: expression_list • ',' expression 34 | expression_list • '\n' expression '\n' shift, and go to state 36 ')' shift, and go to state 63 ',' shift, and go to state 37 State 59 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' 34 expression_list: expression_list '\n' expression • '?' shift, and go to state 17 "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 34 (expression_list) State 60 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' 33 expression_list: expression_list ',' expression • '?' shift, and go to state 17 "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 33 (expression_list) State 61 9 expression: expression '?' expression ':' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 64 State 62 28 expression: expression '[' expression ']' • $default reduce using rule 28 (expression) State 63 29 expression: expression '(' expression_list ')' • $default reduce using rule 29 (expression) State 64 9 expression: expression • '?' expression ':' expression 9 | expression '?' expression ':' expression • 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 9 (expression) And finally a minimal reproduction of the issue I'm facing:
      TheDcoder@arch /m/d/P/C/E/build (master)> eci 1\n2 Starting parse Entering state 0 Stack now 0 Reading a token Next token is token NUMBER () Shifting token NUMBER () Entering state 1 Stack now 0 1 Reducing stack by rule 4 (line 130): $1 = token NUMBER () -> $$ = nterm expression () Entering state 11 Stack now 0 11 Reading a token Next token is token NL () Reducing stack by rule 32 (line 168): $1 = nterm expression () -> $$ = nterm expression_list () Entering state 12 Stack now 0 12 Next token is token NL () Reducing stack by rule 2 (line 126): $1 = nterm expression_list () { "op": "No Operation", "args": [ 1.0 ] } -> $$ = nterm top () Entering state 10 Stack now 0 10 Next token is token NL () 2: syntax error at Error: popping nterm top () Stack now 0 Cleanup: discarding lookahead token NL () Stack now 0 Now I will explain the issue:
      I am trying to parse several different expressions and construct an "expression list" from them, however my parser immediately reduces the first expression to the "top" rule, but what I want is for it to make an "expression_list" which combines the following expression which is separated by a NL.
      This fact can be observed in the debug output from the reproduction script parse attempt, after the parser enters state 12 it immediately uses rule 2 to reduce to "top", but what we want is for it to use rule 34 and reduce to another "expression_list".
      The reason why I think this happens is because the reduction to top simply consumes less tokens and satisfies the parser, and as far as I can tell there is no way to force Bison to be "greedy" when reducing an "expression_list".
      So I'm unsure how to proceed further, I think we have to change the parser but I do not know how. I tried some silly things (like making another "super_top" non-terminal etc.) but those don't compile and produce a ton of conflicts 😕
    • By rmckay
      I'm trying to understand the use of TreeWalker and DllCall()s.  My ultimate goal is to use TreeWalker to list all children of webpages.  I've been working through the files for UIASpy to understand the logic.  After a weeks worth of searching for examples I'm still stuck on the reason for the repeated use of DllCalls in most of the functions.  Here is an example - the function 'UIASpy_CheckWindows()' (located in UIASpy_Elements.au3) is called from file UIASpy_Gui.au3.  In the function the following DllCall is used:
      DllCall( "user32.dll", "lresult", "SendMessageW", "hwnd", $hTV, "uint", $TVM_GETITEMW, "wparam", 0, "struct*", $tItem ) I understand that the function 'SendMessageW' in 'user32.dll' sends a message to the window $hTV.  The message is '$TVM_GETNEXTITEM' and '$tItem' is a struct with additional information - Microsoft Doc -https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessagew.  The window $hTV is created in UIASpy_Gui.au3 and that's where I get lost.  Is there code in UIASpy_Gui.au3 that handles this message?  I don't know what to look for.  This procedure - Function called that contains DllCall (SendMessage) is repeatedly used.  Thanks in advance.
    • By rmckay
      Hello,
      I'm trying to set a value in a combo box on a Chrome web page.  I've checked that the Chrome://accessibility is on and have checked to see that it's working with one of @LarsJ's scripts.  I've been able to locate the combo box and expand it.  I have then tried to put the contents into an element array.  When I check to see if the array is created there is no error.  When I check the size of the array with   '$oUIElementArray1.Length($iLength1)' the length is zero.  I then tried to set the value in the combo box with .SetValue().  No luck.  Next I tried to get the combo box items with '$oSelectionPattern1.GetCurrentSelection($pElementArray*)'.  My assumption is that the combo box items are put in an array - $pElementArray* though I couldn't get this to work in another program.  I've included the script and output.  This is my first attempt working with a website so that is likely where the problem is.  I've used all of the code except '$oSelectionPattern1' successfully in another script.
      #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include "C:\Users\Rod\Documents\AutoIt\Include\UIA_Constants.au3" ; Can be copied from UIASpy Includes folder #include "C:\Users\Rod\Documents\AutoIt\Include\CUIAutomation2WithDuplicatesRemoved.au3" ;~ #include "C:\Users\Rod\Documents\AutoIt\Jigsaw Open Journalytix\Jigsaw Open Journalytix 01.au3" Opt("MustDeclareVars", 1) Example() Func Example() ; Create UI Automation object Local $oUIAutomation = ObjCreateInterface($sCLSID_CUIAutomation8, $sIID_IUIAutomation5, $dtag_IUIAutomation5) If Not IsObj($oUIAutomation) Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oUIAutomation ERR" & @CRLF) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oUIAutomation OK" & @CRLF) ; Get Desktop element Local $pDesktop, $oDesktop $oUIAutomation.GetRootElement($pDesktop) $oDesktop = ObjCreateInterface($pDesktop, $sIID_IUIAutomationElement8, $dtag_IUIAutomationElement8) If Not IsObj($oDesktop) Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oDesktop ERR" & @CRLF) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oDesktop OK" & @CRLF) ; --- Find window/control --- ConsoleWrite("--- Find window/control ---" & @CRLF) ; locate browser Local $pCondition0 $oUIAutomation.CreatePropertyCondition($UIA_ClassNamePropertyId, "Chrome_WidgetWin_1", $pCondition0) If Not $pCondition0 Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $pCondition0 ERR" & @CRLF) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $pCondition0 OK" & @CRLF) Local $pPane1, $oPane1 $oDesktop.FindFirst($TreeScope_Descendants, $pCondition0, $pPane1) $oPane1 = ObjCreateInterface($pPane1, $sIID_IUIAutomationElement8, $dtag_IUIAutomationElement8) If Not IsObj($oPane1) Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oPane1 ERR" & @CRLF) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oPane1 OK" & @CRLF) ; --- Find combo box --- ConsoleWrite("--- Find combo box ---" & @CRLF) Local $pCondition1 $oUIAutomation.CreatePropertyCondition($UIA_ControlTypePropertyId, $UIA_ComboBoxControlTypeId, $pCondition1) If Not $pCondition1 Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $pCondition1 ERR" & @CRLF) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $pCondition1 OK" & @CRLF) Local $pComboBox1, $oComboBox1 $oPane1.FindFirst($TreeScope_Descendants, $pCondition1, $pComboBox1) $oComboBox1 = ObjCreateInterface($pComboBox1, $sIID_IUIAutomationElement8, $dtag_IUIAutomationElement8) If Not IsObj($oComboBox1) Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oComboBox1 ERR" & @CRLF) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oComboBox1 OK" & @CRLF) ; --- ExpandCollapse Pattern (action) Object --- ConsoleWrite("--- ExpandCollapse Pattern (action) Object ---" & @CRLF) Local $pExpandCollapsePattern1, $oExpandCollapsePattern1 $oComboBox1.GetCurrentPattern($UIA_ExpandCollapsePatternId, $pExpandCollapsePattern1) $oExpandCollapsePattern1 = ObjCreateInterface($pExpandCollapsePattern1, $sIID_IUIAutomationExpandCollapsePattern, $dtag_IUIAutomationExpandCollapsePattern) If Not IsObj($oExpandCollapsePattern1) Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oExpandCollapsePattern1 ERR" & @CRLF) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oExpandCollapsePattern1 OK" & @CRLF) ; --- ExpandCollapse Pattern (action) Methods --- ConsoleWrite("--- ExpandCollapse Pattern (action) Methods ---" & @CRLF) $oExpandCollapsePattern1.Expand() ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oExpandCollapsePattern1.Expand()" & @CRLF) Local $oUIElementArray1, $iLength1, $pElements ; $pElements is a pointer to an UI Automation element array Local $pTrueCondition $oUIAutomation.CreateTrueCondition($pTrueCondition) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oUIAutomation.CreateTrueCondition()" & @CRLF) If Not $pTrueCondition Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $pTrueCondition ERR" & @CRLF) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $pTrueCondition OK" & @CRLF) $oComboBox1.FindAll($TreeScope_Children, $pTrueCondition, $pElements) $oUIElementArray1 = ObjCreateInterface($pElements, $sIID_IUIAutomationElementArray, $dtag_IUIAutomationElementArray) If Not IsObj($oUIElementArray1) Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oUIElementArray1 ERR" & @CRLF) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oUIElementArray1 OK" & @CRLF) ; script stops here - apparently array is not created $oUIElementArray1.Length($iLength1) If Not $iLength1 Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $iLength1 = 0 ERR" & @CRLF) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $iLength1 = " & $iLength1 & @CRLF) #cs============================================================================= Display array #ce============================================================================= Local $pElement1, $oElement1, $sValue1 For $i = 0 To $iLength1 - 1 $oUIElementArray1.GetElement($i, $pElement1) $oElement1 = ObjCreateInterface($pElement1, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) $oElement1.GetCurrentPropertyValue($UIA_NamePropertyId, $sValue1) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $sValue" & $i & "= " & $sValue1 & @CRLF) Next ; --- LegacyIAccessible Pattern (action) Object --- ConsoleWrite("--- LegacyIAccessible Pattern (action) Object ---" & @CRLF) Local $pLegacyIAccessiblePattern1, $oLegacyIAccessiblePattern1 $oComboBox1.GetCurrentPattern($UIA_LegacyIAccessiblePatternId, $pLegacyIAccessiblePattern1) $oLegacyIAccessiblePattern1 = ObjCreateInterface($pLegacyIAccessiblePattern1, $sIID_IUIAutomationLegacyIAccessiblePattern, $dtag_IUIAutomationLegacyIAccessiblePattern) If Not IsObj($oLegacyIAccessiblePattern1) Then Return ConsoleWrite("$oLegacyIAccessiblePattern1 ERR" & @CRLF) ConsoleWrite("$oLegacyIAccessiblePattern1 OK" & @CRLF) ; --- LegacyIAccessible Pattern (action) Methods --- ; tried to set value into combobox but nothing happens ConsoleWrite("--- LegacyIAccessible Pattern (action) Methods ---" & @CRLF) Local $sShowEntriesCombobox = 'All' $oLegacyIAccessiblePattern1.SetValue($sShowEntriesCombobox) ConsoleWrite("$oLegacyIAccessiblePattern1.SetValue()" & @CRLF) ; --- Selection Pattern (action) Object --- ConsoleWrite("--- Selection Pattern (action) Object ---" & @CRLF) Local $pSelectionPattern1, $oSelectionPattern1 $oComboBox1.GetCurrentPattern($UIA_SelectionPatternId, $pSelectionPattern1) $oSelectionPattern1 = ObjCreateInterface($pSelectionPattern1, $sIID_IUIAutomationSelectionPattern, $dtag_IUIAutomationSelectionPattern) Sleep(1000) If Not IsObj($oSelectionPattern1) Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oSelectionPattern1 ERR" & @CRLF) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oSelectionPattern1 OK" & @CRLF) ; --- Selection Pattern (action) Methods --- ConsoleWrite("--- Selection Pattern (action) Methods ---" & @CRLF) $oSelectionPattern1.GetCurrentSelection($pElements) ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oSelectionPattern1.GetCurrentSelection()" & @CRLF) EndFunc ;==>Example Console Output
      >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\Rod\Documents\AutoIt\jigsaw Show Entries Code\JIgsa Show Entries Combobox - for Forum 02.au3" /UserParams +>15:31:00 Starting AutoIt3Wrapper v.19.102.1901.0 SciTE v.4.1.2.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:2 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\Rod\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\Rod\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.5) params:-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 from:C:\Program Files (x86)\AutoIt3 input:C:\Users\Rod\Documents\AutoIt\jigsaw Show Entries Code\JIgsa Show Entries Combobox - for Forum 02.au3 +>15:31:00 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\Rod\Documents\AutoIt\jigsaw Show Entries Code\JIgsa Show Entries Combobox - for Forum 02.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop :18: $oUIAutomation OK :25: $oDesktop OK --- Find window/control --- :35: $pCondition0 OK :41: $oPane1 OK --- Find combo box --- :50: $pCondition1 OK :56: $oComboBox1 OK --- ExpandCollapse Pattern (action) Object --- :66: $oExpandCollapsePattern1 OK --- ExpandCollapse Pattern (action) Methods --- :73: $oExpandCollapsePattern1.Expand() :79: $oUIAutomation.CreateTrueCondition() :81: $pTrueCondition OK :88: $oUIElementArray1 OK :92: $iLength1 = 0 ERR +>15:31:00 AutoIt3.exe ended.rc:0 +>15:31:00 AutoIt3Wrapper Finished. >Exit code: 0 Time: 1.681 Thanks in advance
    • By rmckay
      Hello,
      I'm trying to automate the settings of combo boxes in a program. The combo boxes are child windows of two different windows.  They have the similar but different titles so I can locate them using 'WinList('ES 06-20-NT8')'.  After I locate the windows I need to change the selection in a combo box on each.  I initially tried to use the window handle of the respective windows to create an element for each with '$oUIAutomation.ElementFromHandle( $hWindow, $pWindow )'.  The objects will create and I can read the contents of the combo boxes. When I try to change the value using   .SetValue() the combo box in only one of the windows changes.  WinActivate() or .SetFocus() will change the active window but the combo box will still only change in one of the windows.  Next attempt is to use the '$UIA_AutomationIdPropertyId' & ' $UIA_NativeWindowHandlePropertyId  to create an ''AndCondition'.  I've included the script for this.  The problem now is that each time the program restarts the value for '$UIA_NativeWindowHandlePropertyId ' changes.  If I get the current value using UIASpy and input the values into the script it will work.  I've searched every place I can think of to find out how I can get the current value for '$UIA_NativeWindowHandlePropertyId ' and automate it.  Any suggestions are greatly appreciated.

       
      #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include "C:\Users\Rod\Documents\AutoIt\Include\UIA_Constants.au3" ; Can be copied from UIASpy Includes folder #include "C:\Users\Rod\Documents\AutoIt\Include\CUIAutomation2WithDuplicateConstantsRemoved.au3" #include 'Array.au3' Opt("MustDeclareVars", 1) Example() Func Example() ; creates an array with 3 rows Local $aArr = WinList('ES 06-20-NT8') _ArrayDisplay($aArr) For $i = 1 To UBound($aArr) - 1 ConsoleWrite($aArr[$i][0] & ' ' & $aArr[$i][1] & @CRLF) Next ; tried window handle for property condition in '$UIA_NativeWindowHandlePropertyId' but it doesn't work ; Local $hWnd = WinGetHandle($aArr[1][0]) ; Create UI Automation object Local $oUIAutomation = ObjCreateInterface($sCLSID_CUIAutomation8, $sIID_IUIAutomation5, $dtag_IUIAutomation5) If Not IsObj($oUIAutomation) Then Return ConsoleWrite("$oUIAutomation ERR" & @CRLF) ConsoleWrite("$oUIAutomation OK" & @CRLF) ; Get Desktop element Local $pDesktop, $oDesktop $oUIAutomation.GetRootElement($pDesktop) $oDesktop = ObjCreateInterface($pDesktop, $sIID_IUIAutomationElement8, $dtag_IUIAutomationElement8) If Not IsObj($oDesktop) Then Return ConsoleWrite("$oDesktop ERR" & @CRLF) ConsoleWrite("$oDesktop OK" & @CRLF) ; --- Find window/control --- ConsoleWrite("--- Find window/control ---" & @CRLF) Local $pCondition0, $pCondition1, $pAndCondition1 $oUIAutomation.CreatePropertyCondition($UIA_AutomationIdPropertyId, "accountComboBox", $pCondition0) $oUIAutomation.CreatePropertyCondition($UIA_NativeWindowHandlePropertyId, 0x001506B6, $pCondition1) $oUIAutomation.CreateAndCondition($pCondition0, $pCondition1, $pAndCondition1) If Not $pAndCondition1 Then Return ConsoleWrite("$pAndCondition1 ERR" & @CRLF) ConsoleWrite("$pAndCondition1 OK" & @CRLF) Local $pComboBox1, $oComboBox1 $oDesktop.FindFirst($TreeScope_Descendants, $pAndCondition1, $pComboBox1) $oComboBox1 = ObjCreateInterface($pComboBox1, $sIID_IUIAutomationElement8, $dtag_IUIAutomationElement8) If Not IsObj($oComboBox1) Then Return ConsoleWrite("$oComboBox1 ERR" & @CRLF) ConsoleWrite("$oComboBox1 OK" & @CRLF) ; --- LegacyIAccessible Pattern (action) Object --- ConsoleWrite("--- LegacyIAccessible Pattern (action) Object ---" & @CRLF) Local $pLegacyIAccessiblePattern1, $oLegacyIAccessiblePattern1 $oComboBox1.GetCurrentPattern($UIA_LegacyIAccessiblePatternId, $pLegacyIAccessiblePattern1) $oLegacyIAccessiblePattern1 = ObjCreateInterface($pLegacyIAccessiblePattern1, $sIID_IUIAutomationLegacyIAccessiblePattern, $dtag_IUIAutomationLegacyIAccessiblePattern) If Not IsObj($oLegacyIAccessiblePattern1) Then Return ConsoleWrite("$oLegacyIAccessiblePattern1 ERR" & @CRLF) ConsoleWrite("$oLegacyIAccessiblePattern1 OK" & @CRLF) ; --- LegacyIAccessible Pattern (action) Methods --- ConsoleWrite("--- LegacyIAccessible Pattern (action) Methods ---" & @CRLF) Local $sValue $oLegacyIAccessiblePattern1.CurrentValue($sValue) ConsoleWrite("$oLegacyIAccessiblePattern1.CurrentValue() = " & $sValue & @CRLF) ; --- Value Pattern (action) Object --- ConsoleWrite("--- Value Pattern (action) Object ---" & @CRLF) Local $pValuePattern1, $oValuePattern1 $oComboBox1.GetCurrentPattern($UIA_ValuePatternId, $pValuePattern1) $oValuePattern1 = ObjCreateInterface($pValuePattern1, $sIID_IUIAutomationValuePattern, $dtag_IUIAutomationValuePattern) If Not IsObj($oValuePattern1) Then Return ConsoleWrite("$oValuePattern1 ERR" & @CRLF) ConsoleWrite("$oValuePattern1 OK" & @CRLF) ; --- Value Pattern (action) Methods --- ConsoleWrite("--- Value Pattern (action) Methods ---" & @CRLF) $oValuePattern1.SetValue('NT8-Sim 03 Tue') ConsoleWrite("$oValuePattern1.SetValue()" & @CRLF) $oLegacyIAccessiblePattern1.CurrentValue($sValue) ConsoleWrite("$oLegacyIAccessiblePattern1.CurrentValue() = " & $sValue & @CRLF) ; --- Find window/control --- ConsoleWrite("--- Find window/control ---" & @CRLF) ; --- Find window/control --- ConsoleWrite("--- Find window/control ---" & @CRLF) $oUIAutomation.CreatePropertyCondition($UIA_AutomationIdPropertyId, "accountComboBox", $pCondition0) $oUIAutomation.CreatePropertyCondition($UIA_NativeWindowHandlePropertyId, 0x0010069E, $pCondition1) $oUIAutomation.CreateAndCondition($pCondition0, $pCondition1, $pAndCondition1) If Not $pAndCondition1 Then Return ConsoleWrite("$pAndCondition1 ERR" & @CRLF) ConsoleWrite("$pAndCondition1 OK" & @CRLF) $oDesktop.FindFirst($TreeScope_Descendants, $pAndCondition1, $pComboBox1) $oComboBox1 = ObjCreateInterface($pComboBox1, $sIID_IUIAutomationElement8, $dtag_IUIAutomationElement8) If Not IsObj($oComboBox1) Then Return ConsoleWrite("$oComboBox1 ERR" & @CRLF) ConsoleWrite("$oComboBox1 OK" & @CRLF) ; --- LegacyIAccessible Pattern (action) Object --- ConsoleWrite("--- LegacyIAccessible Pattern (action) Object ---" & @CRLF) $oComboBox1.GetCurrentPattern($UIA_LegacyIAccessiblePatternId, $pLegacyIAccessiblePattern1) $oLegacyIAccessiblePattern1 = ObjCreateInterface($pLegacyIAccessiblePattern1, $sIID_IUIAutomationLegacyIAccessiblePattern, $dtag_IUIAutomationLegacyIAccessiblePattern) If Not IsObj($oLegacyIAccessiblePattern1) Then Return ConsoleWrite("$oLegacyIAccessiblePattern1 ERR" & @CRLF) ConsoleWrite("$oLegacyIAccessiblePattern1 OK" & @CRLF) ; --- LegacyIAccessible Pattern (action) Methods --- ConsoleWrite("--- LegacyIAccessible Pattern (action) Methods ---" & @CRLF) $oLegacyIAccessiblePattern1.CurrentValue($sValue) ConsoleWrite("$oLegacyIAccessiblePattern1.CurrentValue()" & $sValue & @CRLF) ; --- Value Pattern (action) Object --- ConsoleWrite("--- Value Pattern (action) Object ---" & @CRLF) $oComboBox1.GetCurrentPattern($UIA_ValuePatternId, $pValuePattern1) $oValuePattern1 = ObjCreateInterface($pValuePattern1, $sIID_IUIAutomationValuePattern, $dtag_IUIAutomationValuePattern) If Not IsObj($oValuePattern1) Then Return ConsoleWrite("$oValuePattern1 ERR" & @CRLF) ConsoleWrite("$oValuePattern1 OK" & @CRLF) ; --- Value Pattern (action) Methods --- ConsoleWrite("--- Value Pattern (action) Methods ---" & @CRLF) $oValuePattern1.SetValue('NT8-Sim 03 Tue') ConsoleWrite("$oValuePattern1.SetValue()" & @CRLF) $oLegacyIAccessiblePattern1.CurrentValue($sValue) ConsoleWrite("$oLegacyIAccessiblePattern1.CurrentValue() = " & $sValue & @CRLF) EndFunc ;==>Example  
      Output from script
      ES 06-20-NT8-Sim 02 Mon 0x05D50AAA ES 06-20-NT8-Sim04 Wed 0x001208B8 $oUIAutomation OK $oDesktop OK --- Find window/control --- $pAndCondition1 OK $oComboBox1 OK --- LegacyIAccessible Pattern (action) Object --- $oLegacyIAccessiblePattern1 OK --- LegacyIAccessible Pattern (action) Methods --- $oLegacyIAccessiblePattern1.CurrentValue() = NT8-Sim 02 Mon --- Value Pattern (action) Object --- $oValuePattern1 OK --- Value Pattern (action) Methods --- $oValuePattern1.SetValue() $oLegacyIAccessiblePattern1.CurrentValue() = NT8-Sim 03 Tue --- Find window/control --- --- Find window/control --- $pAndCondition1 OK $oComboBox1 OK --- LegacyIAccessible Pattern (action) Object --- $oLegacyIAccessiblePattern1 OK --- LegacyIAccessible Pattern (action) Methods --- $oLegacyIAccessiblePattern1.CurrentValue()NT8-Sim04 Wed --- Value Pattern (action) Object --- $oValuePattern1 OK --- Value Pattern (action) Methods --- $oValuePattern1.SetValue() $oLegacyIAccessiblePattern1.CurrentValue() = NT8-Sim 03 Tue Thanks in advance.
    • By rmckay
      I'm trying to set the slider in a window using RangeValuePattern.SetValue().  The window is used to set the start point for replaying market data in the app NinjaTrader 8. When using the Action window in Inspect.exe I can set a value and the slider responds.  When I run a script that selects the slider and uses .SetValue() with the same value the slider does not move.  I've tried giving the focus to the slider with no change in results.  
      #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 ;#AutoIt3Wrapper_UseX64=n ; If target application is running as 32 bit code #AutoIt3Wrapper_UseX64=y ; If target application is running as 64 bit code #include "C:\Users\Rod\Documents\AutoIt\Include\UIA_Constants.au3" ; Can be copied from UIASpy Includes folder ;#include "UIA_Functions.au3" ; Can be copied from UIASpy Includes folder ;#include "UIA_SafeArray.au3" ; Can be copied from UIASpy Includes folder ;#include "UIA_Variant.au3" ; Can be copied from UIASpy Includes folder Opt("MustDeclareVars", 1) Example() Func Example() ; Create UI Automation object Local $oUIAutomation = ObjCreateInterface($sCLSID_CUIAutomation8, $sIID_IUIAutomation5, $dtag_IUIAutomation5) If Not IsObj($oUIAutomation) Then Return ConsoleWrite("$oUIAutomation ERR" & @CRLF) ConsoleWrite("$oUIAutomation OK" & @CRLF) ; Get Desktop element Local $pDesktop, $oDesktop $oUIAutomation.GetRootElement($pDesktop) $oDesktop = ObjCreateInterface($pDesktop, $sIID_IUIAutomationElement8, $dtag_IUIAutomationElement8) If Not IsObj($oDesktop) Then Return ConsoleWrite("$oDesktop ERR" & @CRLF) ConsoleWrite("$oDesktop OK" & @CRLF) ; --- Find window/control --- ConsoleWrite("--- Find window/control ---" & @CRLF) Local $pCondition0 $oUIAutomation.CreatePropertyCondition($UIA_NamePropertyId, "Playback", $pCondition0) If Not $pCondition0 Then Return ConsoleWrite("$pCondition0 ERR" & @CRLF) ConsoleWrite("$pCondition0 OK" & @CRLF) Local $pWindow1, $oWindow1 $oDesktop.FindFirst($TreeScope_Descendants, $pCondition0, $pWindow1) $oWindow1 = ObjCreateInterface($pWindow1, $sIID_IUIAutomationElement8, $dtag_IUIAutomationElement8) If Not IsObj($oWindow1) Then Return ConsoleWrite("$oWindow1 ERR" & @CRLF) ConsoleWrite("$oWindow1 OK" & @CRLF) ; --- Find window/control --- ConsoleWrite("--- Find window/control ---" & @CRLF) Local $pCondition1 $oUIAutomation.CreatePropertyCondition($UIA_AutomationIdPropertyId, "slider", $pCondition1) If Not $pCondition1 Then Return ConsoleWrite("$pCondition1 ERR" & @CRLF) ConsoleWrite("$pCondition1 OK" & @CRLF) Local $pSlider1, $oSlider1 $oWindow1.FindFirst($TreeScope_Descendants, $pCondition1, $pSlider1) $oSlider1 = ObjCreateInterface($pSlider1, $sIID_IUIAutomationElement8, $dtag_IUIAutomationElement8) If Not IsObj($oSlider1) Then Return ConsoleWrite("$oSlider1 ERR" & @CRLF) ConsoleWrite("$oSlider1 OK" & @CRLF) ; --- RangeValue Pattern (action) Object --- ConsoleWrite("--- RangeValue Pattern (action) Object ---" & @CRLF) Local $pRangeValuePattern1, $oRangeValuePattern1 $oSlider1.GetCurrentPattern($UIA_RangeValuePatternId, $pRangeValuePattern1) $oRangeValuePattern1 = ObjCreateInterface($pRangeValuePattern1, $sIID_IUIAutomationRangeValuePattern, $dtag_IUIAutomationRangeValuePattern) If Not IsObj($oRangeValuePattern1) Then Return ConsoleWrite("$oRangeValuePattern1 ERR" & @CRLF) ConsoleWrite("$oRangeValuePattern1 OK" & @CRLF) ; --- RangeValue Pattern (action) Methods --- ConsoleWrite("--- RangeValue Pattern (action) Methods ---" & @CRLF) Local $iSetValue = 50000 $oRangeValuePattern1.SetValue($iSetValue) ConsoleWrite("$oRangeValuePattern1.SetValue()" & @CRLF) EndFunc ;==>Example Console Output
      >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\Rod\Documents\AutoIt\NT8 PlayBack\NT8 PlayBack01.au3" /UserParams    
      +>10:39:16 Starting AutoIt3Wrapper v.19.102.1901.0 SciTE v.4.1.2.0   Keyboard:00000409  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0409)  CodePage:0  utf8.auto.check:2
      +>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\Rod\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\Rod\AppData\Local\AutoIt v3\SciTE 
      >Running AU3Check (3.3.14.5)  params:-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\Rod\Documents\AutoIt\NT8 PlayBack\NT8 PlayBack01.au3
      +>10:39:16 AU3Check ended.rc:0
      >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\Rod\Documents\AutoIt\NT8 PlayBack\NT8 PlayBack01.au3"    
      +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
      $oUIAutomation OK
      $oDesktop OK
      --- Find window/control ---
      $pCondition0 OK
      $oWindow1 OK
      --- Find window/control ---
      $pCondition1 OK
      $oSlider1 OK
      --- RangeValue Pattern (action) Object ---
      $oRangeValuePattern1 OK
      --- RangeValue Pattern (action) Methods ---
      $oRangeValuePattern1.SetValue()
      +>10:39:16 AutoIt3.exe ended.rc:0
      +>10:39:16 AutoIt3Wrapper Finished.
      >Exit code: 0    Time: 1.087
      I'm a noob with autoit and tried to attach screenshots to this post.  I have shots from UIASpy and Inspect.exe.  When I try to attach them I get an "Upload Failed" message.  They show results from the respective programs.  As an alternative I included the apps results with the slider selected.
      Inspect.exe:
      How found:    Selected from tree...
      Name:    ""
      ControlType:    UIA_SliderControlTypeId (0xC35F)
      LocalizedControlType:    "slider"
      BoundingRectangle:    {l:1579 t:531 r:1801 b:549}
      IsEnabled:    true
      IsOffscreen:    false
      IsKeyboardFocusable:    true
      HasKeyboardFocus:    false
      AcceleratorKey:    ""
      AccessKey:    ""
      ProcessId:    9928
      RuntimeId:    [7.26C8.279F814]
      AutomationId:    "slider"
      FrameworkId:    "WPF"
      ClassName:    "Slider"
      IsControlElement:    true
      IsContentElement:    true
      ProviderDescription:    "[pid:9928,providerId:0x0 Main(parent link):Unidentified Provider (managed:MS.Internal.Automation.ElementProxy, PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)]"
      IsPassword:    false
      ItemStatus:    ""
      ItemType:    ""
      IsRequiredForForm:    false
      HelpText:    ""
      ClickablePoint:    {x:-2147483648 y:-2147483648}
      Orientation:    0
      LegacyIAccessible.ChildId:    0
      LegacyIAccessible.DefaultAction:    ""
      LegacyIAccessible.Description:    ""
      LegacyIAccessible.Help:    ""
      LegacyIAccessible.KeyboardShortcut:    ""
      LegacyIAccessible.Name:    ""
      LegacyIAccessible.Role:    slider (0x33)
      LegacyIAccessible.State:    focusable (0x100000)
      LegacyIAccessible.Value:    "0"
      RangeValue.IsReadOnly:    false
      RangeValue.LargeChange:    1.000000
      RangeValue.Maximum:    691200.000000
      RangeValue.Minimum:    0.000000
      RangeValue.SmallChange:    0.100000
      RangeValue.Value:    0.000000
      IsAnnotationPatternAvailable:    false
      IsDragPatternAvailable:    false
      IsDockPatternAvailable:    false
      IsDropTargetPatternAvailable:    false
      IsExpandCollapsePatternAvailable:    false
      IsGridItemPatternAvailable:    false
      IsGridPatternAvailable:    false
      IsInvokePatternAvailable:    false
      IsItemContainerPatternAvailable:    false
      IsLegacyIAccessiblePatternAvailable:    true
      IsMultipleViewPatternAvailable:    false
      IsObjectModelPatternAvailable:    false
      IsRangeValuePatternAvailable:    true
      IsScrollItemPatternAvailable:    false
      IsScrollPatternAvailable:    false
      IsSelectionItemPatternAvailable:    false
      IsSelectionPatternAvailable:    false
      IsSpreadsheetItemPatternAvailable:    false
      IsSpreadsheetPatternAvailable:    false
      IsStylesPatternAvailable:    false
      IsSynchronizedInputPatternAvailable:    true
      IsTableItemPatternAvailable:    false
      IsTablePatternAvailable:    false
      IsTextChildPatternAvailable:    false
      IsTextEditPatternAvailable:    false
      IsTextPatternAvailable:    false
      IsTextPattern2Available:    false
      IsTogglePatternAvailable:    false
      IsTransformPatternAvailable:    false
      IsTransform2PatternAvailable:    false
      IsValuePatternAvailable:    false
      IsVirtualizedItemPatternAvailable:    false
      IsWindowPatternAvailable:    false
      IsCustomNavigationPatternAvailable:    false
      IsSelectionPattern2Available:    false
      FirstChild:    "" thumb
      LastChild:    "" thumb
      Next:    "M0,3C0,3 0,4 0,4 0,4 3,4 3,4 3,4 3,3 3,3 3,3 4,3 4,3 4,3 4,4 4,4 4,4 7,4 7,4 7,4 7,3 7,3 7,3 6,3 6,3 6,3 6,2 6,2 6,2 5,2 5,2 5,
      Previous:    "" button
      Other Props:    Object has no additional properties
      Children:    "" thumb
      Ancestors:    "Playback" window
          "Desktop 1" pane
          [ No Parent ]
       
      UIASpy:
      Treeview Element                                    Slider: Slider
                                                          
      Element Properties (identification)                 
      $UIA_AutomationIdPropertyId                         slider
      $UIA_ClassNamePropertyId                            Slider
      $UIA_ControlTypePropertyId                          $UIA_SliderControlTypeId
                                                          
      Element Properties (session unique)                 
      $UIA_ProcessIdPropertyId                            9928
      $UIA_RuntimeIdPropertyId                            7,9928,41547796
                                                          
      Element Properties (information)                    
      $UIA_BoundingRectanglePropertyId                    l=1579,t=531,w=222,h=18
      $UIA_ClickablePointPropertyId                       -2147483648,-2147483648
      $UIA_FrameworkIdPropertyId                          WPF
      $UIA_HeadingLevelPropertyId                         80050
      $UIA_LocalizedControlTypePropertyId                 slider
      $UIA_OptimizeForVisualContentPropertyId             False
      $UIA_ProviderDescriptionPropertyId                  [pid:9928,providerId:0x0 Main(parent link):Unidentified Provider (managed:MS.Internal.Automation.ElementProxy, PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)]
                                                          
      Element Properties (has/is info)                    
      $UIA_HasKeyboardFocusPropertyId                     False
      $UIA_IsContentElementPropertyId                     True
      $UIA_IsControlElementPropertyId                     True
      $UIA_IsDataValidForFormPropertyId                   False
      $UIA_IsDialogPropertyId                             False
      $UIA_IsEnabledPropertyId                            True
      $UIA_IsKeyboardFocusablePropertyId                  True
      $UIA_IsOffscreenPropertyId                          False
      $UIA_IsPasswordPropertyId                           False
      $UIA_IsPeripheralPropertyId                         False
      $UIA_IsRequiredForFormPropertyId                    False
                                                          
      Control Patterns (element actions)                  
      $UIA_IsLegacyIAccessiblePatternAvailablePropertyId  True (LegacyIAccessiblePattern)
      $UIA_IsRangeValuePatternAvailablePropertyId         True (RangeValuePattern)
      $UIA_IsSynchronizedInputPatternAvailablePropertyId  True (SynchronizedInputPattern)
                                                          
      Control Pattern Properties                          
      $UIA_LegacyIAccessibleChildIdPropertyId             0
      $UIA_LegacyIAccessibleDefaultActionPropertyId       
      $UIA_LegacyIAccessibleDescriptionPropertyId         
      $UIA_LegacyIAccessibleHelpPropertyId                
      $UIA_LegacyIAccessibleKeyboardShortcutPropertyId    
      $UIA_LegacyIAccessibleNamePropertyId                
      $UIA_LegacyIAccessibleRolePropertyId                51 = $ROLE_SYSTEM_SLIDER
      $UIA_LegacyIAccessibleStatePropertyId               1048576 = $STATE_SYSTEM_FOCUSABLE
      $UIA_LegacyIAccessibleValuePropertyId               0
      $UIA_RangeValueIsReadOnlyPropertyId                 False
      $UIA_RangeValueLargeChangePropertyId                1
      $UIA_RangeValueMaximumPropertyId                    691199.9999999
      $UIA_RangeValueMinimumPropertyId                    0
      $UIA_RangeValueSmallChangePropertyId                0.1
      $UIA_RangeValueValuePropertyId                      2.47032822920623e-319
                                                          
      Control Pattern Methods                             
      LegacyIAccessible Pattern Methods                   
                                                          DoDefaultAction()
                                                          Select(long)
                                                          SetValue(wstr)
                                                          GetIAccessible(idispatch*)
                                                          CurrentChildId(int*)
                                                          CurrentDefaultAction(bstr*)
                                                          CurrentDescription(bstr*)
                                                          CurrentHelp(bstr*)
                                                          CurrentKeyboardShortcut(bstr*)
                                                          CurrentName(bstr*)
                                                          CurrentRole(uint*)
                                                          CurrentState(uint*)
                                                          CurrentValue(bstr*)
                                                          GetCurrentSelection(ptr*)
      RangeValue Pattern Methods                          
                                                          SetValue(ushort)
                                                          CurrentIsReadOnly(long*)
                                                          CurrentMaximum(ushort*)
                                                          CurrentMinimum(ushort*)
                                                          CurrentLargeChange(ushort*)
                                                          CurrentSmallChange(ushort*)
                                                          CurrentValue(ushort*)
      SynchronizedInput Pattern Methods                   
                                                          StartListening(long)
                                                          Cancel()
                                                          
      Parents from Desktop                                Pane: Desktop 1
                                                          Window: Playback
                                                          
      Parent to child index                               
       
      In addition to this problem, I am unable to press the start button with an autoit script or by using inspect.exe=>Action=>Toggle() or inspect.exe=>Action=>DoDefaultAction().  I'll post that after solving the current problem.

       
×
×
  • Create New...