1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 13:50:36 +00:00
QB64-PE/internal/help/_FINISHDROP__1111111111.txt
Roland Heyder aeb9c0668b Updates help files for use with new Wiki parser (2nd try)
Note: Many files were removed (not yet existing/empty pages). The parser will try to download them on demand and will auto-generate text for missing pages (eg. most _gl pages).
2022-05-21 00:18:31 +02:00

60 lines
2 KiB
Plaintext

{{QBDLDATE:05-20-2022}}
{{QBDLTIME:23:08:14}}
{{DISPLAYTITLE:_FINISHDROP}}
The [[_FINISHDROP]] statement resets [[_TOTALDROPPEDFILES]] and clears the [[_DROPPEDFILE]] list of items (files/folders).
{{PageSyntax}}
: [[_FINISHDROP]]
{{PageDescription}}
* When using [[_DROPPEDFILE]] with an index (which goes from 1 to [[_TOTALDROPPEDFILES]]), you must call [[_FINISHDROP]] after you finish working with the list in order to prepare for the next drag/drop operation.
* '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]'''.
==Availability==
* '''Version 1.3 and up'''.
{{PageExamples}}
''Example:'' Accepting files dragged from a folder and processing the list received by specifying an index.
{{CodeStart}}
{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(128, 25, 0)
{{Cl|_ACCEPTFILEDROP}} 'enables drag/drop functionality
{{Cl|PRINT}} "Drag files from a folder and drop them in this window..."
{{Cl|DO}}
{{Cl|IF}} {{Cl|_TOTALDROPPEDFILES}} {{Cl|THEN}}
{{Cl|FOR}} i = 1 {{Cl|TO}} {{Cl|_TOTALDROPPEDFILES}}
a$ = {{Cl|_DROPPEDFILE}}(i)
{{Cl|COLOR}} 15
{{Cl|PRINT}} i,
{{Cl|IF}} {{Cl|_FILEEXISTS}}(a$) {{Cl|THEN}}
{{Cl|COLOR}} 2: {{Cl|PRINT}} "file",
{{Cl|ELSE}}
{{Cl|IF}} {{Cl|_DIREXISTS}}(a$) {{Cl|THEN}}
{{Cl|COLOR}} 3: {{Cl|PRINT}} "folder",
{{Cl|ELSE}}
{{Cl|COLOR}} 4: {{Cl|PRINT}} "not found", 'highly unlikely, but who knows?
{{Cl|END IF}}
{{Cl|END IF}}
{{Cl|COLOR}} 15
{{Cl|PRINT}} a$
{{Cl|NEXT}}
{{Cl|_FINISHDROP}} 'If _FINISHDROP isn't called here then _TOTALDROPPEDFILES never gets reset.
{{Cl|END IF}}
{{Cl|_LIMIT}} 30
{{Cl|LOOP}}
{{CodeEnd}}
{{PageSeeAlso}}
* [[_ACCEPTFILEDROP]], [[_TOTALDROPPEDFILES]], [[_DROPPEDFILE]]
* [[_FILEEXISTS]], [[_DIREXISTS]]
{{PageNavigation}}