Page 2 of 2

Re: Abort a downloadfile()

Posted: Mon Aug 14, 2023 10:06 pm
by papiosaur
This my code for download, no surprise, thanks a lot Andreas one more time!

Code: Select all

handle = Downloadfile(a1$, {Async=True, Adapter="hurl", File=f$}, p_SetProgress)
Repeat done = ContinueAsyncOperation(handle)
	VWait
Until done = True
and this is my code to 'Abort' the download with a button:

Code: Select all

Case "Pressed":
	Switch msg.ID
		Case "abort":
			CancelAsyncOperation(handle)
			done = True
	Endswitch