Ditto- How to Paste Plain Texts Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
BannerStore
Posts: 87
Joined: 06 Sep 2017, 19:29

Ditto- How to Paste Plain Texts

29 Jul 2020, 06:29

I frequently use the Number Pads to paste a series of copies I've made. I'm assuming most of you do that too. For example, I will see a copy of related paragraphs I want to read later. I will select a paragraph, press copy+c. Then, when I see another paragraph, I select it and press copy+c. When I have up to ten of them, I will just press Control+Numpad1, Contro+Numpad2,...Control+Numpad9.

However, this will only paste the original paste it in the original source formatting. Does anyone know how to make a simply AutoHotkey program to so that Control+Alt+Numpad1 will paste the plain text of Control+Numpad1? And, Control+Alt+Numpad2 will pste the plaint text of Control+Numpad 2? And, so on?

I've mentally sketched out the script I would have to make. I just don't know the name of the functions I need. (I don't know AutoHotkey that well.)

If Control+Numpad1 is an environmental variable, I just put it in the clipboard and then just press the hotkey for "Paste Plain Text" (a command that exists in Ditto). If it's not an environmental variable, then I paste Control+Numpad1, select the entire paste, cut it with control+x, and then just Paste Plain Text.

Seems easy. Anybody know how to do it?
colt
Posts: 291
Joined: 04 Aug 2014, 23:12
Location: Portland Oregon

Re: Ditto- How to Paste Plain Texts  Topic is solved

29 Jul 2020, 09:13

Try this. It works for me in word.

Code: Select all

;as example copy some text with formatting to clipboard before launching script
;you would need to store these values in your clipboard memory array each time you ^C
;this works in word
textWithFormatting := clipboardAll
textRaw := clipboard

^Numpad1:: ;retain formatting	
	clipboard := textWithFormatting 
	send {CTRLDOWN}v{CTRLUP}
return

^!Numpad1:: ;paste in current formatting of document or default 
	clipboard := textRaw 
	send {CTRLDOWN}v{CTRLUP}
return
BannerStore
Posts: 87
Joined: 06 Sep 2017, 19:29

Re: Ditto- How to Paste Plain Texts

11 Aug 2020, 23:05

Great answer. Sorry for the late reply but I've been trying to fix my computer after I got the BSOD for the past 2 weeks. I wish there was a way that computers can just reinstall everything with a wave of a hand. It takes me like 2-3 weeks to tweak my computer back to normal after I wipe the drive and reinstall a clean copy of the OS.

I'll give it a try and see if it works. Thanks so much!
colt wrote:
29 Jul 2020, 09:13
Try this. It works for me in word.

Code: Select all

;as example copy some text with formatting to clipboard before launching script
;you would need to store these values in your clipboard memory array each time you ^C
;this works in word
textWithFormatting := clipboardAll
textRaw := clipboard

^Numpad1:: ;retain formatting	
	clipboard := textWithFormatting 
	send {CTRLDOWN}v{CTRLUP}
return

^!Numpad1:: ;paste in current formatting of document or default 
	clipboard := textRaw 
	send {CTRLDOWN}v{CTRLUP}
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee and 330 guests