retvalue = shell("appname",mode) ' mode usually 1
AppActivate retvalue
SendKeys "% ",False ' false is easier to handle
' "% " = {ALT Space} is the exit/maximise menu in all apps.
I use it a lot and found that I have to AppActivate often and worse the app may have been around for an hour so I have to get it off the Task Bar and the only way I know is to shell again. The problem then is the retvalue has no meaning. So you have to AppActivate with the Title Bar Text - which for Outlook (say) can be one of many possibilities. eg
AppActivate "Outbox Microsoft Outlook",False
or
AppActivate "Inbox Microsoft Outlook",False
Each Hotkey or letter neads an individual SendKey to be sure and I put XX mSecs (from a timer) between each one and chose a time delay for each situation (20 mSecs to 5 secs if my HDD has to wake-up)
The last problem is that you can't do this in interpreter mode AND hope to stop it each time (but trying to AppActivate between each one may help)
The SendKeys statement is a doddle - using it in real situations needs a lot of thought - you can't blame MS for all of the problem either.
Good Luck
PS if you find a way of listing loaded apps in the Task Bar I am looking for same.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.