Skip to content

Instantly share code, notes, and snippets.

@TLMcode
Created September 30, 2015 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TLMcode/7e090083080c95b70f93 to your computer and use it in GitHub Desktop.
Save TLMcode/7e090083080c95b70f93 to your computer and use it in GitHub Desktop.
EnumClipFormats(). Retrieves a list of formats in the clipboard
msgbox % EnumClipFormats()
EnumClipFormats()
{
DllCall("OpenClipboard"), VarSetCapacity( buf, 256 )
Loop % DllCall("CountClipboardFormats")
{
fmt := DllCall("EnumClipboardFormats", uint, a_index=1?0:fmt )
DllCall("GetClipboardFormatName", uInt, fmt, str, buf, int, 128 )
fmts .= ((fNum:=StrGet(&buf))?fNum:fmt) "`n"
}
DllCall( "CloseClipboard" )
return fmts
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment