Function Reference

_ClipBoard_FormatStr

標準クリップボード形式の文字列表現を返します。

#Include <Clipboard.au3>
_ClipBoard_FormatStr($iFormat)

 

パラメータ

$iFormat クリップボード形式を指定します

 

返し値

クリップボード形式の文字列表現を返します

 

注意

なし。

 

関連

 


#include <GuiConstantsEx.au3>
#include <ClipBoard.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)

Global $iMemo

_Main()

Func _Main()
    Local $hGUI, $iFormat, $iCount

    ; GUI作成
    $hGUI = GUICreate("Clipboard", 600, 400)
    $iMemo = GUICtrlCreateEdit("", 2, 2, 596, 396, $WS_VSCROLL)
    GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New")
    GUISetState()

    ; クリップボードを開く
    If Not _ClipBoard_Open ($hGUI) Then _WinAPI_ShowError ("_ClipBoard_Open failed")

    ; 利用可能なクリップボード形式を表示
    MemoWrite("Clipboard formats ..: " & _ClipBoard_CountFormats ())

    ; クリップボード形式を列挙
    Do
        $iFormat = _ClipBoard_EnumFormats ($iFormat)
        If $iFormat <> 0 Then
            $iCount += 1
            MemoWrite("Clipboard format " & $iCount & " .: " & _ClipBoard_FormatStr ($iFormat))
        EndIf
    Until $iFormat = 0

    ; クリップボードを閉じる
    _ClipBoard_Close ()

    ; ユーザーが終了させるまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

EndFunc   ;==>_Main

; メモにメッセージを書き込む
Func MemoWrite($sMessage = "")
    GUICtrlSetData($iMemo, $sMessage & @CRLF, 1)
EndFunc   ;==>MemoWrite