I have a macro which reads a list of account numbers and notes from a text file and inputs them into a customer service system. The notes screen in the CS system is launched from an icon in the toolbar. This works great for customers that only have one account, but if they have multiple accounts clicking on the notes button brings up a context menu containing a list of accounts. I need to be able to loop through this list and match up an account number. How do get the text of a single context menu item? Here's what I have....
Capture Control to %C1% //Toolbar button
Mouse Left Button Click
Delay 2 Seconds
Mouse Move Position 10,20 //Check for context menu
Capture Control to %C2% //Capture control under mouse
If Control %C2% Visible //Not always there
Repeat Until %N99% = 1 //Infinite Loop
Variable Get Control Text %C2% to %T4% //Get menu item text???
If Variable %T4% = Variable %T1% //If it matches my account....
Repeat Exit //Break loop
Else //If not....
Mouse Move Position 0,20 //Move to next item
Delay 2 Seconds
Capture Control to %C2% //Capture control under mouse
End If
Repeat End
End If