Eavesdropping on what my text editor is up to
January 23, 2012 5:54 PM Subscribe
Is there a way to write a script that makes something happen outside
of MS Word as a result of an event that occurs within
posted by lollusc to Computers & Internet (6 answers total) 3 users marked this as a favorite
I'm not actually wedded to this involving Word specifically. It could be LibreOffice or Openoffice or if it absolutely had to be, a plain text editor would be okay too.
As a simple example, say I want a pop-up box to appear once I have written 1000 words in my text document.
Or for a more difficult example, when I start a new paragraph, I want my music player to skip to the next mp3.
I have an okay knowledge of how to write shell scripts and how to code in various languages. It's specifically the bit where the script has to "watch" my word processing program and receive information from it that is baffling me.
I'm okay with a solution that only works for Linux, or only for Windows, but not one that only works for Mac.
Is this possible? What do I need to be googling to find information that will help me? I'm failing at google because all I'm getting is how to script things within Word, and how to write screenplays.