Dheyker
Member
How can I do to download a file and save it in the location that I want?
The idea would be that it works with any browser, it is for example if a DLL file is missing to download it automatically, this would be checked by a cleo and it would download it, but I don't know if it's possibleIn the browser settings,What browser are you using?
Do you have any example? how to select the location where the file is saved?:URLDownloadToFile
0AA2: 10@ = load_library "Urlmon.dll" // IF and SET
0AA4: 11@ = get_proc_address "URLDownloadToFileA" 10@
0AA7: address 11@ params 5 pop 0 /*params*/ 0 0 0@ 1@ 0 /*ret*/ 12@
ret 0
Or if you are using sampfuncs you can use 0C65
{$CLEO .cs}
0000: NOP
0AC8: 0@ = allocate_memory_size 1024
0AD3: 0@ = "cleo\5MB.zip"
0AC8: 1@ = allocate_memory_size 1024
0AD3: 1@ = "http://ipv4.download.thinkbroadband.com/5MB.zip"
0AB1: @URLDownloadToFile 2 0@ 1@
0AD1: "~r~Download" time 1337
004E: end_thread
:URLDownloadToFile
0AA2: 10@ = load_library "Urlmon.dll" // IF and SET
0AA4: 11@ = get_proc_address "URLDownloadToFileA" 10@
0AA7: address 11@ params 5 pop 0 /*params*/ 0 0 0@ 1@ 0 /*ret*/ 12@
0AB2: ret 0
{$CLEO .cs}
0000: NOP
WAIT 8500
WHILE TRUE
WAIT 0
IF 0AB0: key_pressed 88
THEN
0AC8: 0@ = allocate_memory_size 1024
0AD3: 0@ = "cleo\5MB.zip"
0AC8: 1@ = allocate_memory_size 1024
0AD3: 1@ = "http://ipv4.download.thinkbroadband.com/5MB.zip"
0AB1: @URLDownloadToFile 2 0@ 1@
0AD1: "~r~Download" time 1337
WAIT 3000
END
END
:URLDownloadToFile
0AA2: 10@ = load_library "Urlmon.dll" // IF and SET
0AA4: 11@ = get_proc_address "URLDownloadToFileA" 10@
0AA7: address 11@ params 5 pop 0 /*params*/ 0 0 0@ 1@ 0 /*ret*/ 12@
0AB2: ret 0