Question: I need to record the steps a user performs while he is using an application of which I do not have the source code.

Which is the best way to do such a thing? Where should I start?

For Example: Say my application is notepad, the log might look like this:

```
1. Click on File Menu
2. Click on New...
3. Type "How are you?"
4. Click on Edit Menu
5. Click on Select All

```

etc.

Answer: 
It seems what you are really looking for is a "Test Suite", or a key logger. For control names you can use application like Spy++ or, better yet, if its WPF/Window Forms use Snoop.
For every action the user makes, you should implement a callback (eventhandler, depending on which language you use) method. This method then writes a line to a file. That line describes what the function does.

It's eventsbased programming like in C# ;)