Jump to content
Macro Express Forums

How to store the name of the active program in a variable


Recommended Posts

I'm trying to duplicate an app I have on my Mac (GhostNotes) that displays "context-aware" notes that change depending upon which program/document is active. In other words, if I'm in a Word it displays a notepad file containing notes I've made regarding the document, and if I'm on a web page, it displays notes I've made about that page. 

 

Not being a coder I won't be able to exactly duplicate what GhostNotes does, but I thought I'd play around with it a bit. I can't seem to figure out how to determine what program/file is active. Can someone point me in the right direction? I'm sure it's staring me right in the face. 😐

 

Thanks for any guidance you can send my way!

Link to comment
Share on other sites

Another approach would be to use statements like these:

 

If Program "firefox.exe" is focused

 

and/or

 

If Window "How to store the name of the active program in a variable - Macro Express and Macro Express Pro - Macro Express Forums — Mozilla Firefox" is focused

 

Link to comment
Share on other sites

My first thought is using notepad files all stored in specific folder. The reason I need to grab the active program/document name is to be able to automatically create and open a txt file with that name if it doesn't exist, or open it if it does exist, when a program gets the focus. 

 

I'll give your suggestions a try.

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.

Guest
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.

Loading...
 Share

×
×
  • Create New...