Abort a downloadfile()

Discuss GUI programming with the RapaGUI plugin here
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

Re: Abort a downloadfile()

Post 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
Post Reply