Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

remove format on font


  • Please log in to reply
12 replies to this topic
  • Guests
  • Last active:
  • Joined: --
How do you remove format from font copied from browsers?

TheDewd
  • Members
  • 842 posts
  • Last active: Jun 10 2016 06:55 PM
  • Joined: 28 Mar 2010
Save it to a plain text file.

  • Guests
  • Last active:
  • Joined: --
I want ahk magic, just press key and walah no format on paste.

TheDewd
  • Members
  • 842 posts
  • Last active: Jun 10 2016 06:55 PM
  • Joined: 28 Mar 2010

I want ahk magic, just press key and walah no format on paste.

Clipboard, ClipboardAll, and OnClipboardChange
<!-- m -->http://www.autohotke...c/Clipboard.htm<!-- m -->

clipboard = my text ; Give the clipboard entirely new contents.
clipboard = ; Empty the clipboard.
clipboard = %clipboard% ; Convert any copied files, HTML, or other formatted text to plain text.
clipboard = %clipboard% Text to append. ; Append some text to the clipboard.
StringReplace, clipboard, clipboard, ABC, DEF, All ; Replace all occurrences of ABC with DEF (also converts the clipboard to plain text).



sinkfaze
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008

I want ahk magic, just press key and walah no format on paste.


Send ^c
Sleep, 300   ; allot a small time slice for data to copy
Clipboard=%Clipboard%


Basic examples:

clipboard = %clipboard%   ; Convert any copied files, HTML, or other formatted text to plain text.



  • Guests
  • Last active:
  • Joined: --
Thanks you guys. Is that correct spelling though of walah? LOL

sinkfaze
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008
I think you meant voilà, but we got the gist of it :wink: .

  • Guests
  • Last active:
  • Joined: --
I have another I wish can be fixed with ahk. I want like a feature from Word to change case.

From: mom. Please
To: mom, please

m. P
m, p

where:
m is inconsequential
P is variable

F1::
send {delete}
send ,,
send {right}
[color=red]?[/color]               ; need to lowercase this 
return


nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010
Use Send +{Right}^c with the previously mentioned clipboard.

  • Guests
  • Last active:
  • Joined: --
F1::
send {delete}
send ,,
send {right}
send +{Right}^c    ; need to lowercase this
Sleep, 300
Clipboard=%Clipboard%
;send {delete}
;send ^v
return

I dunno, it just highlighted P but not lowercasing it?

nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010
I forgot StringLower :oops:

  • Guests
  • Last active:
  • Joined: --
F1::
send {delete}
send ,,
send {right}
send +{Right}
StringLower, OutputVar, InputVar
send ^c ; need to lowercase this
Sleep, 300
Clipboard=%Clipboard%
return

just highlight but no lower

Odlanir
  • Members
  • 775 posts
  • Last active: Mar 06 2014 11:02 AM
  • Joined: 07 Aug 2011
Look like a bit confused, You wrote

send +{Right}
StringLower, OutputVar, InputVar
send ^c ; need to lowercase this

but, where do you set InputVar ?

Try this:
F1::
	send {delete}
	send ,,
	send {right}
	send +{Right}
	send ^c								; copy the Uppercase char
	StringLower, clipboard, clipboard	; lowercase it
	send ^v 							; paste the char
return
Regards,