Jump to content

Download Tool


andrew2
 Share

Recommended Posts

I Made a small Download tool

in the inputbox you enter the url of the file and then press download.

it got a status bar and a current downloadspeed shown

my problem is everytime i enter the url of a file and press download the script cancels with my error message and closed without doing anything.

Down_Bar_Speed_shown.au3

Edited by andrew2
Link to comment
Share on other sites

This could have something to do with it.

>"C:\Program Files\autoit3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\*****\Desktop\downloader.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams

+>08:27:55 Starting AutoIt3Wrapper v.1.10.1.8 Environment(Language:0409 Keyboard:00000409 OS:WIN_VISTA/Service Pack 1 CPU:X86)

>Running AU3Check (1.54.13.0) from:C:\Program Files\AutoIt3

C:\Users\*****\Desktop\downloader.au3(51,24) : WARNING: $sFileDest: possibly used before declaration.

FileDelete($sFileDest)

~~~~~~~~~~~~~~~~~~~~~^

Link to comment
Share on other sites

  • Moderators

1. @InetGetBytesRead returns an integer, and you're comparing it to a string.

2. $sFileDest isn't declared anywhere.

When doing boolean comparisons, use True/False... or 0 for False and any other number (positive or negative) for True.

Numbers/Integers/Booleans shouldn't be compared with strings.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

are you sure you executed my script because i dont get any errors like that in my stdout ?

That error is in SciTe Au3Check that those of us that use the SciTe editor use before launching an app to test for errors ahead of time.

Edit:

and sure sFileDest is declared on the bottom as global so there are no problems for me.

It has to be declared before it is used :)

1 line at a time before interpretation begins.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

ok if there where any interger errors or var declaration errors why is au3check telling me the following.

C:\Programme\AutoIt3\Down+Bar+Speed-shown.au3(56,24) : WARNING: $sFileDest: possibly used before declaration.

FileDelete($sFileDest)

~~~~~~~~~~~~~~~~~~~~~^

Down+Bar+Speed-shown.au3 - 0 error(s), 1 warning(s)

Edited by andrew2
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...