- This topic has 1 reply, 2 voices, and was last updated 2 years, 6 months ago by
December 9, 2017 at 7:29 pm #88262ParticipantTopics: 1Replies: 0Points: 0Rank: Member
Hi, I used Autohotkey to script small Things for myself and I am Aware that this Task could be done with Autohotkey without Problems. However I Need to provide a script on many machines and would like to use Powershell instead so I do not Need to install Autohotkey everywhere.
1. User has to select some text in browser or other window
2. Press Hotkey, for example F12 on Keyboard to trigger script
3. SCRIPT: send Ctrl+X to grab selected text .
4. SCRIPT: replace dedicated character (for example #) with other string (CR/LR)
5. SCRIPT: send Ctrl+V to paste modified text at same place where source text was
I am just wondering if Powershell can do this, as I am newbie on Powershell. If anybody could confirm that this is possible I will dig into scrpting hoping to solve this
December 9, 2017 at 9:28 pm #88292ParticipantTopics: 2Replies: 1013Points: 2,093Rank: Community Hero
This has been possible ever since the VBScript days.
It’s called SendKeys, though it does get panned by many over the years. I’ve had no real issues in using it.
In PowerShell, it is just doing this.. Say, some Windows UI
### Start PowerUser Menu
A quick search using your favorite search engine, using the strings
… Will provide you a long list of articles to choose from.
Also take a look at the WASP module, here:
- The topic ‘Send Ctrl+X / Replace string / Ctrl+V using a Hotkey?’ is closed to new replies.