Jump to content
Macro Express Forums

Macro that runs once when app is opened?

Recommended Posts

I have a feeling this has been discussed before, either here or in the ME 3 Forum, but if so I've not yet found the relevant thread(s).


My requirement is very simple. I want to resize and position a progam's window when it's opened. I don't believe there's any way to edit a Windows shortcut to do this (apart from maximising it or restoring it to its last spec). So I thought I'd do it with a macro that is activated when the program is first started. But how? I don't want to activate the macro every time I focus the program, only when I first open it.


BTW, I have tools that will resize/reposition programs that are already open.



Edit: OK, found it a few minutes later. The Process Event > Process starts running activation. Reliable? Any quirks or gotchas I should watch out for? I have a vague recollection that I used it ages ago and found some issue with it. I'll keep searching.


I'll leave the post in place. Mainly because I don't think I can delete it! But it may be helpful someday to others searching for similar requirement.



Terry, East Grinstead, UK

Link to comment
Share on other sites

Hi Terry,


I don't know if this will answer your question, but I've found that whenever I need a program to be a specific size and in a specific position upon launch, but don't want it to get adjusted every time I focus it (I do this with Notepad a lot - I want it to start in the bottom-right corner, but I may want to move it for various reasons), the easiest thing - for me - is to simply launch it with a macro.


That way, it launches, gets sized and positioned, and then I don't have to concern myself with that macro fiddling with my windows anymore.

Link to comment
Share on other sites

Hi Steve,


Good to see you back on the forum!


That's a brilliantly simple alternative. :rolleyes: I suppose I'm so used to running my programs from standard shortcuts (usually the ones made automatically when the programs are installed) that I've never considered replacing them with macros.


What method do you use? Two approaches come to mind:


1. Activate the macro directly, probably from a pop-up menu, and remove any existing shortcuts.

2. Make a Windows shortcut to the macro, and use that to replace the original ones (e.g. in the Start Menu structure, in Quick Launch, on the Desktop, etc.)


Not sure yet, but I expect I'll only find a few dozen programs that will need customising like this.



Terry, East Grinstead, UK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...