- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @jpi656UL. Also when using SendKeys, you have to make sure that the dialog you want to send the keystrokes to has 'system focus' when they are 'sent out', because the keystrokes could get sent to the wrong place, which is why it is dangerous. I often precede the SendKeys line with AppActivate(ThisApplication.Caption), but even that if fairly vague. There is also a more advanced vb.net function usually called "SetForegroundWindow" that you could use there, if you were proficient in your vb.net. Then use "ThisApplication.UserInterfaceManager.DoEvents" on the line after calling SendKeys, to force it to be processed right then.
Or, you might be able to skip using the SendKeys altogether, and execute another command. There are several that sound about right, such as "AppContextual_DoneCmd", "AppContextual_ApplyCmd", "AppContextual_OKCmd", "AppContextual_ContinueCmd", "AppContinueCmd", "Continue", "Done", etc.
Wesley Crihfield
(Not an Autodesk Employee)