Not sure if this appropriate to put as 开发者_如何学编程a question or not? It's sort of a scripting question I think. Just down vote me if not :p
Basically, what I'm looking for is a way to push a windows hotkey and have whatever text is in the clipboard be stripped of formatting. An example of what the macro could do:
- I push (whatever hotkey combo here)
- open notepad.exe
- Paste to notepad from clipboard
- Select all text in notepad
- Copy/Cut all text from notepad
- Close notepad
I'm just wondering if someone has done something like this before, or knows how it could be accomplished. I think this could be a huge time-saver for almost anyone. I find myself doing this all the time when cutting and pasting between different office applications, etc.
Have you heard of Puretext, it appears to do what you're looking for:
http://www.stevemiller.net/puretext/
Instead of emulating hotkeys to control Notepad, you can write code to implement what Notepad implements when it gets text from the clipboard: i.e. use the clipboard API to get the clipboard contents as unformatted text.
Try AutoHotKey to make a tiny and easy script to do what you want.
You will find a powerful windows interface macro programing tool.
精彩评论