How do i make this possible? [button programming]

  • Thread starter Thread starter Rectifier
  • Start date Start date
  • Tags Tags
    Programming
AI Thread Summary
To program a keyboard key to add "##" around selected text in Windows 8, the approach differs based on whether the task is for a single application or all applications. For a single application, utilizing the Control.SelectedText property is effective, particularly in word processors like Open Office where macros can be implemented. For broader application use, reading from the clipboard and evaluating the text for specific patterns is suggested, though this method lacks reliability across all programs. An online tool, textmechanic.com, can also modify multiple lines of text by adding prefixes or suffixes, which may serve as an alternative solution.
Rectifier
Gold Member
Messages
313
Reaction score
4
Hey!
I would like to program my key on the keyboard to do a specific task. In my case, I would like it to do following:
I select a bit of text
12u6g2d.jpg

then I press the button (or combination of buttons)
and the system adds
## around the text I have selected.
BWurt3V.jpg


OS - Windows 8

Anyone that can help?
 
Computer science news on Phys.org
Is this for a single application or all applications? There isn't really a reliable way of doing this for any program.
Best bet is to read it from the clipboard and if it matches a specific pattern then evaluate it.

For a single application it's pretty easy. Almost every textbox implementation has a Control.SelectedText property you can read.
 
Sorry if 'Profile Badge' is not the correct term. I have an MS 365 subscription and I've noticed on my Word documents the small circle with my initials in it is sometimes different in colour document to document (it's the circle at the top right of the doc, that, when you hover over it it tells you you're signed in; if you click on it you get a bit more info). Last night I had four docs with a red circle, one with blue. When I closed the blue and opened it again it was red. Today I have 3...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Back
Top