Ken Granger Posted March 4, 2021 Report Share Posted March 4, 2021 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! Quote Link to comment Share on other sites More sharing options...
acantor Posted March 4, 2021 Report Share Posted March 4, 2021 This sounds like a good Macro Express project. The instructions you will probably need are: Variable Set String %ProgramName% to topmost program name and/or Variable Set String %WindowTitle% to topmost window title 1 Quote Link to comment Share on other sites More sharing options...
acantor Posted March 4, 2021 Report Share Posted March 4, 2021 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 Quote Link to comment Share on other sites More sharing options...
Ken Granger Posted March 4, 2021 Author Report Share Posted March 4, 2021 Thanks for the headstart! Yeah, it could be really handy. I'm sure I'll be back on here for more help if I get into this, so thanks for your wisdom. Quote Link to comment Share on other sites More sharing options...
Ken Granger Posted March 4, 2021 Author Report Share Posted March 4, 2021 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.