News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Hotkey example

Started by Magnum, December 10, 2010, 10:08:04 PM

Previous topic - Next topic

Magnum

> I have searched and not had much luck.

> I would like to have a hot key that would output text.
> I can't find much source code that addresses that.

> I know how to output text to a buffer and do a Shift Insert.

> I would like to be able to select different text depending on the
> situation.

> Any source for any compiler would be appreciated.

Don't you think assembly is the wrong language for this
purpose. Even C++ or Java is much to low level, do it
in GOOGLE:
Have a great day,
                         Andy

MichaelW

QuoteI would like to have a hot key that would output text.

In what context?
eschew obfuscation

dedndave


Magnum

Quote from: MichaelW on December 11, 2010, 02:24:01 AM
QuoteI would like to have a hot key that would output text.

In what context?

To output text.

Ex.

Ctrl-Alt-1 would send text to either the clipboard or be pasted in a box where my cursor is. (2nd way best.)



Have a great day,
                         Andy

dedndave

i think sending it to the clipboard would require a shell extension

pasted in a box - like say notepad ? - or console window ?

jj2007

- check async keystate for your key (e.g. once every 100 ms)
- get the active/foreground window
- enum its children until you find the editbox or similar where you selected the text
  (note this is not trivial, especially with Firefox...)
- get the text with WM_GETTEXT
- insert it into your editbox.

Magnum

Quote from: dedndave on December 11, 2010, 04:05:19 AM
i think sending it to the clipboard would require a shell extension

pasted in a box - like say notepad ? - or console window ?

Someone posted code how to put text in the clipboard.

Have a great day,
                         Andy

Magnum

Quote from: jj2007 on December 11, 2010, 07:11:11 AM
- check async keystate for your key (e.g. once every 100 ms)
- get the active/foreground window
- enum its children until you find the editbox or similar where you selected the text
  (note this is not trivial, especially with Firefox...)
- get the text with WM_GETTEXT
- insert it into your editbox.

Simple would be good too.

How about just sending some text to the clipboard using a hot key combination.

I have about 4 or 5 different sets of texts that I would like to assign to keys.

I could hit whatever hot key combination I needed and do a Shift Insert to "insert" it.


Have a great day,
                         Andy

Magnum

Have a great day,
                         Andy