Sign in to follow this  
Followers 0
iahngy

Menu item wont get checked.

5 posts in this topic

my app at work has a menu of File, edit, view ....

i try to go to view, and enable on an item " auto scroll when run" ..but i wont do anything....I test the func on notepad it works...

is there any way around to check on the submenu's item ? it can read the text but it cant check on the item.... at work it wont let me click on the autoit button to post code.

$hWnd = WinGetHandle($title1)

$hMain = _GUICtrlMenu_GetMenu($hWnd)

$x = _GUICtrlMenu_FindItem($hMain, "View")

$hView = _GUICtrlMenu_GetItemSubMenu($hMain, $x)

$t = _GUICtrlMenu_GetItemText($hView, 9)

ConsoleWrite("status: " &_GUICtrlMenu_GetItemChecked($hView, 9) &@crlf) ;status shows 0

_GUICtrlMenu_SetItemChecked($hView, 9)

ConsoleWrite("status: " &_GUICtrlMenu_GetItemChecked($hView, 9) &@crlf) ; status shows 1 but the item is not checked

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hey,

It may not be a "clean" way to do it, but usually when I have trouble interacting with external applications controls, I simply use keyboard shortcuts.

Is your work app accepting them?

Maybe:

send("{!v}")
send("{DOWN}")
send("{SPACE}"}
Edited by Neutro

Share this post


Link to post
Share on other sites

Thnks Neutro. it works with alt v but not with space to check...but i can send down 9 times then enter....but sometimes the apps open with a check there and sometimes it doesnt .

Share this post


Link to post
Share on other sites

This " auto scroll when run" setting value must be written somewhere on your computer. Maybe in an .ini file, maybe in the registry.

Did you try to find it?

Share this post


Link to post
Share on other sites

I asked the test owner...he doesnt set any of the app...how can i check if that item is checked or not using registry?

Share this post


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
Sign in to follow this  
Followers 0