Home of Macro Scheduler - Macro Tools and Automation Software
 How can I make one hotkey play different macros depending on what application I'm working in?

This is very much like the last question, but you need to make a new controlling macro which you assign to the hotkey you want to use. Let's assume you have three macros, one for Excel, one for Word and one for Outlook. Create a new macro that looks like this :

GetActiveWindow>title,X,Y
Pos>Microsoft Excel,title,1,StPos
If>StPos>0,DoExcelMacro

Pos>Microsoft Word,title,1,StPos
If>StPos>0,DoWordMacro

Pos>Outlook,title,1,StPos
If>StPos>0,DoOutlookMacro

//None match so skip to end
Goto>End

Label>DoExcelMacro
Macro>My_Excel_Macro
Goto>End

Label>DoWordMacro
Macro>My_Word_Macro
Goto>End

Label>DoOutlookMacro
Macro>My_Outlook_Macro

Label>End

As you can see, in this example, I've assumed your three macros are called My_Word_Macro, My_Excel_Macro and My_Outlook_Macro. Now all you need to do is assign this new controlling macro to a hotkey and when you press that hotkey the appropriate macro runs for the application you're working in.

Back To Index

Sitemap | Privacy Policy | © MJT Net Ltd 1997-2008 All Rights Reserved.

Windows Vista and the Windows logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.