Jump to content

Inetget & "abort"


Recommended Posts

I see from the latest version 3.1.1.125 that " InetGet("abort") and exiting AutoIt with a download in progres now correctly stop the download immediately. (by Valik)"

however, what if you have a list of files to Inetget and only want to abort one of them and not exit AutoIt??

Rick

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

  • Replies 45
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Developers

I see from the latest version 3.1.1.125 that " InetGet("abort") and exiting AutoIt with a download in progres now correctly stop the download immediately. (by Valik)"

however, what if you have a list of files to Inetget and only want to abort one of them and not exit AutoIt??

Rick

Rick, How would you do multiple downloads with one script ?

Don't you have to shell one script per download ?

Moved to support forum since its not a Bug report.

:)

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Rick, How would you do multiple downloads with one script ?

Don't you have to shell one script per download ?

Moved to support forum since its not a Bug report.

:)

say i have a list of files (files 1-5) in a while loop i download each one , checking the filesize of downloaded file, upon success i inetget the next one, however, say file 3 is going to take too long to download. i want to "abort" this filedownload so it moves onto the next Does that help?

Edited by Rick

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

  • Developers

say i have a list of files (files 1-5) in a while loop i download each one , checking the filesize of downloaded file, upon success i inetget the next one, however, say file 3 is going to take too long to download. i want to "abort" this filedownload so it moves onto the next Does that help?

The InetGet("abort") will stop the current download, not the script, so that should work for you ... :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I wish it did but it doesnt until autoit is exited hence my original post

It hangs until ftp timeout occurs

Edited by Rick

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

  • Developers

I wish it did but it doesnt until autoit is exited hence my original post

It hangs until ftp timeout occurs

Are you using the Background =1 parameter ?

Can you show a script to demo's this behaviour ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Are you using the Background =1 parameter ?

Can you show a script to demo's this behaviour ?

yes i'm using the Background =1 parameter ,

it seems that altho Ineget("abort") pauses download it doesnt disconnect as it should.

so the ftp site is left hanging wondering what to do, and then finally times out and disconnecting.

i'll see if i can setup a test folder altho i have to be carefull as its my works ftpsite.

Edited by Rick

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

  • Developers

yes i'm using the Background =1 parameter ,

it seems that altho Ineget("abort") pauses download it doesnt disconnect as it should.

so the ftp site is left hanging wondering what to do, and then finally times out and disconnecting.

i'll see if i can setup a test folder altho i have to be carefull as its my works ftpsite.

Rick,

Just tested the below script with the latest Beta and had no problem to stop the current download and continue with the next one:

HotKeySet("{end}", "StopDownload")
$userid = "????"
$psw = "????"
$url1 = "www.autoitscript.com/scite/download/scite4autoit3.zip"
$url1 = "www.autoitscript.com/scite/download/scite4autoit3.zip"
;
InetGet("FTP://" & $userid & ":" & $psw & "@" & $url1, "c:\temp\test1.zip", 1, 1)
While @InetGetActive
    TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16)
    Sleep(250)
WEnd
;
InetGet("FTP://" & $userid & ":" & $psw & "@" & $url2, "c:\temp\test2.zip", 1, 1)
While @InetGetActive
    TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16)
    Sleep(250)
WEnd
;
Func StopDownload()
    InetGet("abort")
EndFunc   ;==>StopDownload

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Calling InetGet("abort") closes the connection to the remote host. I don't see how it could continue to block. Without a publicly available site to test on, there's nothing I can do to test it.

Link to comment
Share on other sites

Calling InetGet("abort") closes the connection to the remote host. I don't see how it could continue to block. Without a publicly available site to test on, there's nothing I can do to test it.

yay Valiks here give me 2 minutes and i'll a site up for ya

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

Works fine for me. I let the first download start, once I saw some bytes were being downloaded, I pressed the hotkey. The download was stopped. After a second or two, the next download was started. Once it downloaded a few bytes, I pressed the hotkey again and it stopped and then the script terminated. I didn't see anything out of the ordinary.

Link to comment
Share on other sites

i'm watching whoevers trying to run the script , and its work as it should

I just dont know why when i do it it hangs untill timeout??

Who needs puzzles when we have AutoIt!!

Link to comment
Share on other sites

  • Developers

i'm watching whoevers trying to run the script , and its work as it should

I just dont know why when i do it it hangs untill timeout??

Works for me as well... I am running WinXP SP2 .. What OS are you running it on ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

could I ask a favour and once this testing is resolved that the script i put gets deleted off this forum!?

Just say when ... :)

EDIT: You can also edit your own post ...

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...