Sign in to follow this  
Followers 0
andrew2

Download Tool

6 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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)

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

Share this post


Link to post
Share on other sites

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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

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

Edited by andrew2

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

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  
Followers 0