|get-menu, text includes filepath [message #1779698]
||Thu, 11 January 2018 11:25
| Andrew Small
Registered: December 2017
From the recorder, the menu -path option is |
get-view Console | get-button "Display Selected Console" | click -arrow
-path "5 testShader_shader_simulator [Renesas Shader Simulator Debugging] C:\\/testeagl\\/Renesas\\/DebugComp\\/imp_x5-elf-gdb.exe -shader-core=2 (7.10.1)"
As this contains my test folder, to be portable the script needs to build this dynamically. I've been able to read the path OK, from another property, but not use it subsequently in the get-menu call. Possibly it is lacking the \\ tags.
I've attached the script and some show-alert screenshots.
Capture2: Error message from get-menu $gdbmenu
Capture3: AUT showing menu
One useful feature would be to access menu items by their raw index (my understanding of the current -index option is that it is only valid in the case where menu entries are repeated, requiring a -path and -index). For example here, get-menu -rawindex 4 would obtain the fifth item. Alternatively a -contains option allowing partial string match (AFAIK the -path has to be an exact, full, match?)
Powered by FUDForum
. Page generated in 0.01745 seconds