Jump to content
Sign in to follow this  
Rick

Inetget & "abort"

Recommended Posts

Rick

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!!

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
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.

:)

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!!

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Rick

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!!

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Rick

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!!

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Rick

hmm interesting , your script did work for http://www.autoitscript.com, maybe its a setting i need to look at in FileZilla(what runs our ftpsite) to see if theres something in there which releases control of a file.


Who needs puzzles when we have AutoIt!!

Share this post


Link to post
Share on other sites
Valik

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.

Share this post


Link to post
Share on other sites
Rick

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!!

Share this post


Link to post
Share on other sites
Rick

ok, heres goes hope this helps..............

--Script removed ---

Edited by JdeB

Who needs puzzles when we have AutoIt!!

Share this post


Link to post
Share on other sites
Valik

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.

Share this post


Link to post
Share on other sites
Rick

very odd, i wonder why it hangs for me???


Who needs puzzles when we have AutoIt!!

Share this post


Link to post
Share on other sites
Rick

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!!

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Rick

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

winxp home sp2


Who needs puzzles when we have AutoIt!!

Share this post


Link to post
Share on other sites
Rick

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


Who needs puzzles when we have AutoIt!!

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Rick

well ok, as you and valik have it then take it off now thanks

do you reckon its something to do with XP Home?


Who needs puzzles when we have AutoIt!!

Share this post


Link to post
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
Sign in to follow this  

×