Click here to Skip to main content
16,018,802 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to create an application which, while its run and is minimized will be able log another program activities (for example Word or PowerPoint). Get the object name (for example - File or View button click) will be enough, but is it possible to get this kind of information outside created application?

Is it possible to do with C#?
So far I only managed to get mouse coordinates outside created application (and disable mouse buttons if I need to)and also log informatioon about it, but I didn;t found a thing about how to get at least something from another runned program.

Edit:
Well i really got a problem with explanation) Well, by object name I mean second thing: For example, I clicked button View in Microsoft Word or Paste or Insert or Page Layout or B-Bold. I need to write in text file this "names": "View", "Paste", "Insert", "Page Layout", "Bold". This is enough for me, I don't need more.

P.S Sorry about my english.
Posted
Updated 23-Mar-14 1:30am
v2

In general case, you cannot access anything is an external process of an application which is not specifically designed for some collaboration. It is not clear what you mean by "object name", but there is no such thing as the common object property called "name". Note that the applications in question are not .NET assemblies where you could at least discover types, their names, members and names of all members. Even if you have this information, it does not help you to log its activities (except some specific ones). You should also understand that processes are thoroughly isolated and are executed in different address spaces. The same numeric address values in different processes actually reference different objects in memory.

—SA
 
Share this answer
 
Comments
Member 10503105 23-Mar-14 5:17am    
Well i really got a problem with explanation) Well, by object name I mean second thing: For example, I clicked button View in Microsoft Word or Paste or Insert or Page Layout or B-Bold. I need to write in text file this "names": "View", "Paste", "Insert", "Page Layout", "Bold". This is enough for me, I don't need more.
Sergey Alexandrovich Kryukov 23-Mar-14 12:12pm    
But this is not related to the question about "logging". For what you need, you can address to MS Word Automation.
—SA
Have a look at the answer to this post on StackOverflow[^] I'm not sure you'll get exactly what you need but it should be a good starting point.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900