I did some experimenting with the Phantom Target test application. As in my app, when I select the menu items on the cascade menus, nothing appears to happen. I thought I might see the menus expand, but I do not. In the Phantom app, however, nothing is supposed to happen when you select the lower menu items, so it is possible that the item *is* being selected. In my app, actions are supposed to happen and they do not which is why I believe the menu item is not truly being selected.
I did select the "Checked" item to ensure that something was happening and although I don't see the menu expand, "Checked" does get un-checked. This item is at the top of the menu hierarchy however. In terms of the Phantom app, it would be beneficial to have one of the menu items in the cascaded menus be one of the "Checked" type items or open a dialog box of some kind.
I also experimented with MouseClicks and MouseMoves to navigate the cascading menu structure and they work fine and do have the added benefit of giving you a visual feedback.
Here is my code.
- Code: Select all
# test for cascading menus
use "PhantomTarget.dec"; # include the PhantomTarget dec file
System("C:\Program Files\Phantom\PhantomTarget.exe"); # start the PhantomTarget app
SetDelay(200);
PhantomTarget._Menus.C_hecked.Select(); # top level - unchecks
Sleep(2.0);
PhantomTarget._Menus._Cascade.Item_1.Select(); # second level
Sleep(2.0);
PhantomTarget._Menus._Cascade._Cascade.Item_1.Select(); # third level
Sleep(2.0);
PhantomTarget.MouseClick(0,125,-10,0); # click Menus
PhantomTarget.MouseClick(0,150, 40,0); # click Cascade
PhantomTarget.MouseMove( 250, 40 ); # move to Item1
PhantomTarget.MouseClick(0,250, 75,0); # click Cascade
PhantomTarget.MouseMove( 325, 75 ); # move to Item1
#PhantomTarget.Close(); # close app