Hints, tips and tricks for newbies
Moderators: JRL, Dorian (MJT support)
-
Homer315
- Newbie
- Posts: 3
- Joined: Thu Aug 27, 2009 5:50 pm
Post
by Homer315 » Fri Aug 28, 2009 12:46 am
Hi guys, im 100% newbie having newbie trouble..
I need to download a file, and i need the macro to recognize when the file has finalized downloading itself, and then proceed with the rest of the script..
I have been using something like this:
label>file
IfFileExists>E:\USD\Como_dejar_de_fumar.doc
wait>0.25
goto>end
[ [Else
Wait>0.25
goto>file
Endif ]
Label>end
I have a trouble that if the file has not finished itself from downloading, the macro continues regardless of that... don't know if i could make myself clear ...
Thanks in advance

-
Me_again
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Post
by Me_again » Fri Aug 28, 2009 1:07 am
Please tell us how you are downloading the file, show that code if you can (change the url).
-
Homer315
- Newbie
- Posts: 3
- Joined: Thu Aug 27, 2009 5:50 pm
Post
by Homer315 » Fri Aug 28, 2009 1:18 am
I am downloding it though firefox, click in the link, opens up the accept window and the download starts
The first part of the script is ok, I used the recorder, but the problem is that the download time varies from download to download, sometimes it starts fast, sometimes low, taht is why i need to optimize the recognition of the downloaded file so then it can continue with the rest of the script...
Thanks
-
Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
-
Contact:
Post
by Bob Hansen » Fri Aug 28, 2009 1:49 am
Here are three suggestions....
1. Wait for window to open with message that says file has completed downloading.
2. If you know the source size, then loop to check until download size = source size.
3. If you don't know the expected size, then loop to check filesize is no longer getting larger. When stopped growing for x seconds/minutes consider ir is done?
============
Sorry, no tmie for samples right now....
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
-
Homer315
- Newbie
- Posts: 3
- Joined: Thu Aug 27, 2009 5:50 pm
Post
by Homer315 » Fri Aug 28, 2009 2:33 am
Great idea bob thanks!
-
Me_again
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Post
by Me_again » Fri Aug 28, 2009 3:26 am
4. Consider using HTTPRequest to download the file directly instead of using FF. The script will not continue until HTTPRequest has finished.
-
idiot
- Macro Veteran
- Posts: 152
- Joined: Thu Mar 01, 2007 9:21 am
Post
by idiot » Wed Nov 04, 2009 10:20 am
use getpixelcolor fire fox download window always starts with one color and ends on a dif colro always same 2 colors and always at top so either just check to see if color has changed to the 2nd one when its finished sometimes its best to keep it simple stupd good luck bro peace
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!