Function Reference


_ClipBoard_IsFormatAvailable

Determines whether the clipboard contains data in the specified format

#include <Clipboard.au3>
_ClipBoard_IsFormatAvailable ( $iFormat )

Parameters

$iFormat Specifies a standard or registered clipboard format

Return Value

Success: True - Clipboard contains data in the specified format
Failure: False - Clipboard does not contain data in the specified format

See Also

Search IsClipboardFormatAvailable in MSDN Library.

Example

#include <Clipboard.au3>
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>

Global $g_idMemo

Example()

Func Example()
    Local $aFormats[3] = [2, $CF_TEXT, $CF_OEMTEXT]

    ; Create GUI
    GUICreate("Clipboard", 600, 400)
    $g_idMemo = GUICtrlCreateEdit("", 2, 2, 596, 396, $WS_VSCROLL)
    GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New")
    GUISetState(@SW_SHOW)

    ; See if there is any text in the clipboard
    MemoWrite("Priority formats .:. " & _ClipBoard_GetPriorityFormat($aFormats))
    MemoWrite("Unicode available .: " & _ClipBoard_IsFormatAvailable($CF_UNICODETEXT))

    ; Loop until the user exits.
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>Example

; Write message to memo
Func MemoWrite($sMessage = "")
    GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1)
EndFunc   ;==>MemoWrite