Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

SetClipboardData and GetClipboardData functions


  • Please log in to reply
32 replies to this topic
AmourSpirit
  • Members
  • 93 posts
  • Last active: Mar 01 2016 04:28 PM
  • Joined: 01 Dec 2010
What I posted above here works Fine for Chrome, Evernote and other Html Editors but not for Firefox

anybody had any luck getting this to work with putting formatted HTML on the clipboard?

Any help on getting this to work would be really appreciated


OutputText := "This Will Work on <a href='http://google.com'>Google</a> Chrome But not in <a href='http://www.mozilla.org/'>Firefox</a>."

Html := pushHTML(OutputText)
   SetClipBoardData("HTML Format", Html, 0, false) ; This currently Works
   SetClipBoardData("text/html", Html, 0, true) ; This currently will not, seems to be needed by Firefox


AmourSpirit
  • Members
  • 93 posts
  • Last active: Mar 01 2016 04:28 PM
  • Joined: 01 Dec 2010

@AmourSpirit: see first page where Firefox is mentioned, it uses a different format.


Yes, I Know Firefox seems to use a different fromat

The HTML format seems to be "HTML Format" (Firefox put also a Unicode "text/html" format) which seems to have a quite precise format:


As I posted previously

Chrome or Dreamweaver the "Html Format" works fine but Firefox will not paste anything. It say in this post that firefox needs "text/html" format on the clipboard.

Html := pushHTML(OutputText)
	SetClipBoardData("HTML Format", Html, 0, false)
	SetClipBoardData("text/html", Html, 0, true)

This is What gets pasted into Firefox ( gmail or online html editor such as tinyMCE )

敖獲潩㩮⸰ਹ瑓牡䡴䵔㩌〰〰〰㔹䔊摮呈䱍〺〰〰㌵ਲ਼瑓牡䙴慲浧湥㩴〰〰㄰㜲䔊摮牆条敭瑮〺〰〰〵㰱呈䱍㰾佂奄㰾ⴡ匭慴瑲牆条敭瑮ⴭ匾敥䔠敶湲瑯㩥䠠汥潬圠牯摬‬愼栠敲㵦攢敶湲瑯㩥⼯瘯敩⽷ㄱ㐷㤸㜶猯〱⼹昲晤㈱㤷愭捣ⵦ㌴㘰㠭ㄹⴳ㈵戰㉤㤰㍦㘰㈯摦ㅦ㜲ⴹ捡晣㐭〳ⴶ㤸㌱㔭〲摢〲昹〳⼶㸢猼慰瑳汹㵥挧汯牯›杲⡢ⰰㄠ㠲‬⤰✻䐾獥瑫灯⼼灳湡㰾愯ⰾ㰠⁡牨晥✽瑨灴㩳⼯睷⹷癥牥潮整挮浯瘯敩⽷昲晤㈱㤷愭捣ⵦ㌴㘰㠭ㄹⴳ㈵戰㉤㤰㍦㘰氿捯污㵥湥渣㈽摦ㅦ㜲ⴹ捡晣㐭〳ⴶ㤸㌱㔭〲摢〲昹〳✶琠牡敧㵴弧汢湡❫圾扥⼼㹡映牯映牵桴牥椠普牯慭楴湯㰮ⴡ䔭摮牆条敭瑮ⴭ㰾䈯䑏㹙⼼呈䱍>

In Chrome ( gmail ) or Dreamweaver the html paste fine.
For Example:
See Evernote: Hello World, Desktop, Web for further information.

I am using AutoHotkey_L Unicode on Window 7 x64


The Issues Is how to get this work for "text/html" format for firefox? Do I need to Convert Text to Unicode or something. What am I missing?
Thanks

oldbrother
  • Members
  • 149 posts
  • Last active: Nov 09 2014 07:36 PM
  • Joined: 06 Jul 2005
Hi AmourSpirit,

I like your script so much! But it does not work with Outlook. Could you please get it fixed?

Thank you.