This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
Get file from pasteboard
|
Get file from pasteboard ( xIndex ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
xIndex | Longint |
![]() |
Xth file included in drag action | |||||
Function result | String |
![]() |
Pathname of file extracted from pasteboard | |||||
The Get file from pasteboard command returns the absolute pathname of a file included in a drag and drop operation. Several files can be selected and moved simultaneously. The xIndex parameter is used to designate a file from among the set of files selected.
If there is no Xth file in the pasteboard, the command returns an empty string.
The following example can be used to retrieve in an array all the pathnames of the files included in a drag and drop operation:
ARRAY TEXT($filesArray;0)
C_TEXT($vfileArray)
C_LONGINT($n)
$n:=1
Repeat
$vfileArray:=Get file from pasteboard($n)
If($vfileArray#"")
APPEND TO ARRAY($filesArray;$vfileArray)
$n:=$n+1
End if
Until($vfileArray="")
Product: 4D
Theme: Pasteboard
Number:
976
Created: 4D v11 SQL
4D Language Reference ( 4D v20 R7)