How do i make this possible? [button programming]

  • Thread starter Thread starter Rectifier
  • Start date Start date
  • Tags Tags
    Programming
Click For Summary
SUMMARY

This discussion focuses on programming a keyboard shortcut to automatically add "##" around selected text on Windows 8. The most effective method involves using the Control.SelectedText property within a specific application, such as a word processor like Open Office. For broader applications, utilizing clipboard monitoring to detect specific patterns is suggested, although it lacks reliability across all programs. An online tool, Text Mechanic, is also recommended for batch modifications of text strings.

PREREQUISITES
  • Understanding of Windows 8 operating system functionalities
  • Familiarity with programming concepts related to keyboard shortcuts
  • Knowledge of Control.SelectedText property in application development
  • Basic skills in using online text manipulation tools
NEXT STEPS
  • Research how to implement keyboard shortcuts in Windows applications
  • Explore clipboard monitoring techniques for text manipulation
  • Learn about the Control.SelectedText property in various programming environments
  • Investigate other online text modification tools similar to Text Mechanic
USEFUL FOR

Programmers, software developers, and users looking to enhance productivity through keyboard shortcuts in text editing applications.

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.
 

Similar threads

Replies
17
Views
2K
Replies
3
Views
4K
Replies
21
Views
5K
  • · Replies 51 ·
2
Replies
51
Views
7K
  • · Replies 19 ·
Replies
19
Views
4K
Replies
17
Views
2K
  • · Replies 20 ·
Replies
20
Views
2K
Replies
1
Views
7K
  • · Replies 5 ·
Replies
5
Views
927
  • · Replies 2 ·
Replies
2
Views
2K