I can easily set the default size for a new application by adding the application name into the matching expression. The new macro offers much more versatility. You can learn more about regular expressions in this post. ![]() It checks the front window application name - accessed through %Application%1% - by matching the regular expression through the term “Matches”.Įach application name is separated by a pipe for alternation. The macro uses a Switch/Case Action to control the flow of the actions. You can change it to your preferred shortcut. I prefer to set F8 as the hot key to trigger this macro and set the front window application to the default size. Inside the “Global UI Control” macro group, I create a new macro called “Default Window Size”. Setting Multiple Default Sizes with Switch Case Now, the “Resize and Center” macro can accept (height, width) as the parameter.Ĭlick on the gear icon on the top right Execute Macro action to toggle With Parameter input fields. I adjusted the vertical position to take into the menu bar height. The remaining action is centering the front application window. It’s one way to avoid clutter in the “variables” section under the preferences pane. You can prepend Local to the variable to prevent Keyboard Maestro from making the variable available globally for other macros. You can access the parameter’s value respectively with %TriggerValue% and %TriggerValue% and save them as local variables. It accepts two parameters separated by a comma for width and height. By tweaking the “Resize and Center” macro, I can tell the new macro to accept width and height as the parameters to resize the window size dynamically. ![]() Keyboard Maestro lets you pass parameters when executing a macro.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |