Sign in to follow this  
Followers 0
lgnihlman

AVI trouble

7 posts in this topic

I'm having trouble with playing .avi file.

My script shows a GUI including an .avi file (just a progress bar to see that the script is working) and then starts downloading

a file using InetGet.

The problem is that the .avi stops playing when the InetGet function starts.

The sleep(500) line is just for debugging so that I can see that the avi actually starts playing.

I would like the avi to play continuously until the download has finished.

Is there a way fix this ?

CODE
#include <GUIConstants.au3>

;#NoTrayIcon

GUICreate("Hämtar fil", 250,100,-1,-1,1, $WS_EX_TOPMOST)

GUISetState (@SW_SHOW)

;Read INI file

$src = IniRead("gfile.ini", "Main", "Source", 0)

$dest = IniRead("gfile.ini", "Main", "Dest", 0)

$url = IniRead("gfile.ini", "Main", "URL", 0)

;Get file

$size = InetGetSize($url&$src)

GuiCtrlCreateLabel("Filnamn: "&$src , 27, 3)

GuiCtrlCreateLabel("Storlek: "&$size & " Byte" , 27, 20)

$ani1=GUICtrlCreateAvi("PGBar.avi",-1,12,41,$ACS_AUTOPLAY)

GUICtrlSetState ($ani1,$GUI_AVISTART)

Sleep(500)

InetGet($url&$src,$dest&$src,1)

Exit

Share this post


Link to post
Share on other sites



use While @InetGetActive to display the avi...

example below.. (you may need to edit it your self..)

CODE
#include <GUIConstants.au3>

;#NoTrayIcon

GUICreate("Hämtar fil", 250,100,-1,-1,1, $WS_EX_TOPMOST)

GUISetState (@SW_SHOW)

;Read INI file

$src = IniRead("gfile.ini", "Main", "Source", 0)

$dest = IniRead("gfile.ini", "Main", "Dest", 0)

$url = IniRead("gfile.ini", "Main", "URL", 0)

;Get file

GuiCtrlCreateLabel("Filnamn: "&$src , 27, 3)

GuiCtrlCreateLabel("Storlek: "&$size & " Byte" , 27, 20)

$ani1=GUICtrlCreateAvi("PGBar.avi",-1,12,41,$ACS_AUTOPLAY)

$size = InetGetSize($url&$src)

InetGet($url&$src,$dest&$src,1)

While @InetGetActive

GUICtrlSetState ($ani1,$GUI_AVISTART)

Sleep(250)

Wend

Exit

Share this post


Link to post
Share on other sites

is there also a way to do this with FileCopy as well?


[font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]

Share this post


Link to post
Share on other sites

yes...

Share this post


Link to post
Share on other sites

care to explain?

I know that theres an option with inetget that allows you to continue the script while the file downloads, however, I don't know of such an option with filecopy.


[font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I have a filecopy with a progress bar already completed. I used a variation of Larry's _FileSearch. However, on large files the copy animation (avi) stops sometimes, is there any way to remove this?

I should probably mention that it has to be FileCopy, and cmd cannot be used.

Edited by ame1011

[font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]

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