jhooie Posted June 16, 2006 Report Share Posted June 16, 2006 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 Quote Link to comment Share on other sites More sharing options...
jhooie Posted June 19, 2006 Author Report Share Posted June 19, 2006 I've found a way around this problem where I don't have to use the context menu, but I would still love to hear from anyone who has done this before. Quote Link to comment Share on other sites More sharing options...
cyberchief Posted June 19, 2006 Report Share Posted June 19, 2006 Can you post the actual macro commands (not the text... but the actual macro)? I would like to see the actual commands. Also, what was your work-around? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.