How do i make this possible? [button programming]

  • Thread starter Rectifier
  • Start date
  • Tags
    Programming
In summary, a user is looking to program a key on their keyboard to add ## around selected text in any application on Windows 8. It may be possible to do it for a single application using the Control.SelectedText property or with a macro in a word-processing program. If the text is on separate lines, a tool like textmechanic.com can be used to modify it in bulk.
  • #1
Rectifier
Gold Member
313
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
  • #2
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.
 

1) How can I make a button with a specific functionality?

There are several programming languages that can be used to make a button with a specific functionality, such as HTML, CSS, JavaScript, and more. The specific method will depend on the type of button and the desired functionality. It is best to consult with a developer or research online tutorials for the specific language you are using.

2) What is the difference between a button and a link?

A button and a link both have the ability to take the user to a different page or perform a specific action. However, the main difference is that a button is generally used for an action within the current page, while a link is used to navigate to a different page or website.

3) How can I add a button to my website?

To add a button to your website, you will need to use HTML code. You can use the

Back
Top