Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Grammarly edit.
  • Loading branch information
akalenuk authored Aug 13, 2018
1 parent 4311495 commit 6ede67a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ A piece of UI to borrow. 16 counters with Windows messaging IPC interface.

![screenshot](/screenshot.png "GUI")

This is a tool for several simple debugging techniques. It accepts integer data from debugged program and displays it immediately on the screen. When you send messages from debugged program, this tool handles them synchronously so it slows down the sending program, but you still can wath it run in realtime.
This is a tool for several simple debugging techniques. It accepts data from the debugged program and displays it immediately on the screen. When you send messages from the debugged program, this tool handles them synchronously, so it slows down the sending program, but you still can watch it run in real-time.

## Interface

It uses native Windows messaging for communication with all its limitations and advantages. It is actually language invariant, but I'll show all examples in C.
It uses native Windows messaging for communication with all its limitations and advantages. It is language invariant, but I'll show all the examples in C.

To send an integer number to some counter, use this:

SendMessage((HWND)655890, WM_USER, i, n);

Here `i` is a counter index and `n` is the number you want to see in it. 655890 - is the handle of a counter's window. It is written on top of it and also accessible via clipboard. Just click the "W" button to copy the handler, or "C" button to copy a whole SendMessage string.
Here `i` is a counter index and `n` is the number you want to see in it. 655890 - is the handle of a counter's window. It is written on top of it and also accessible via the clipboard. Just click the "W" button to copy the handler, or "C" button to copy a whole SendMessage string.

To increment a counter use this:

SendMessage((HWND)655890, WM_USER, 'I', i);

Note that 'I' works like a command here, so counter index is now the second argument.
Note that 'I' works like a command here, so the counter index is now the second argument.

Decrement a counter with this:

Expand All @@ -43,7 +43,7 @@ You can also use primitive time counter:

Sending `T` starts the corresponding timer, sending `S` stops it and displays elapsed time in milliseconds.

At this point you might be wondering, what the `button` button for? It is actually a button you can "outsource" from debugged program. It works like this, when you send a `B` command,
At this point, you might be wondering, what the `button` button for? It is actually a button you can "outsource" from the debugged program. It works like this. When you send a `B` command,

b = SendMessage((HWND)655890, WM_USER, 'B', 0);

Expand All @@ -53,11 +53,11 @@ counters return 1 or more iff a `button` was pressed, and then reset its state.

* `[0]` button nullifies all counters.
* `[N]` button updates counters when `Realtime print` is off.
* `[W]` button copies handler number to clipboard.
* `[C]` button copies C SendMessage template to clipboard.
* `[W]` button copies handler number to the clipboard.
* `[C]` button copies C SendMessage template to the clipboard.
* `[F]` button saves counters to a file.
* `[v] Realtime print` is a checkbox which sets automatic counter updates on and off. It is convenient to have it always `on`, but is also affects perforance, so this is optional.
* `[button]` button counts when you press it so you can read if it has been pressed via messaging afterwards.
* `[v] Realtime print` is a checkbox which sets automatic counter updates on and off. It is convenient to have it always `on`, but is also affects performance, so this is optional.
* `[button]` button increments the inner counter when you press it so you can read it afterward.

## Executable

Expand Down

0 comments on commit 6ede67a

Please sign in to comment.