09-03-2010, 09:19 AM
If you download it with IntGetFile from other thread, you can use global variable.
int+ g_downloaded=0
IntGetFile ...
g_downloaded=1
in other thread wait until g_downloaded is 1.
int+ g_downloaded
wait 0 V g_downloaded
-----------------------------------
This is more universal code. Works with files downloaded with QM, Internet Explorer, Firefox, etc.
Function wait_file
test
Macro Macro1446
int+ g_downloaded=0
IntGetFile ...
g_downloaded=1
in other thread wait until g_downloaded is 1.
int+ g_downloaded
wait 0 V g_downloaded
-----------------------------------
This is more universal code. Works with files downloaded with QM, Internet Explorer, Firefox, etc.
Function wait_file
str s="D:\downloads\quickmac.exe"
Dir d
rep
,if d.dir(s) and d.FileSize
,,__HFile f.Create(s OPEN_EXISTING 0 FILE_SHARE_READ); err
,,if(f) f.Close; break
,0.5
mes "downloaded"
;info: the d.FileSize is for Firefox, which at first creates empty file, then downloads to other file...
test
Macro Macro1446