Function Reference


_ClipPutFile

Copy Files to Clipboard Like Explorer does

#include <Misc.au3>
_ClipPutFile ( $sFilePath [, $sDelimiter = "|"] )

Parameters

$sFilePath Full Path to File(s)
$sDelimiter [optional] Separator for multiple Files, Default = '|'

Return Value

Success: True
Failure: False and sets the @error flag to non-zero.
@error: 1 - Unable to Open Clipboard
2 - Unable to Empty Cipboard
3 - GlobalAlloc Failed
4 - GlobalLock Failed
5 - Unable to Create H_DROP
6 - Unable to Update Clipboard
7 - Unable to Close Clipboard
8 - GlobalUnlock Failed
9 - GlobalFree Failed

Example

#include <Misc.au3>
#include <MsgBoxConstants.au3>

; Add the following contents to the clipboard.
Local $bReturn = _ClipPutFile(@ScriptFullPath & "|" & @ScriptDir & "|" & @SystemDir)
If Not $bReturn Then
    MsgBox($MB_SYSTEMMODAL, "_ClipPutFile() call Failed", "@error = " & @error)
Else
    MsgBox($MB_SYSTEMMODAL, "_ClipPutFile()", "Content of Clipboard:" & @CRLF & ClipGet())
EndIf