lgnihlman Posted December 10, 2007 Posted December 10, 2007 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
mikiutama Posted December 10, 2007 Posted December 10, 2007 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
ame1011 Posted December 10, 2007 Posted December 10, 2007 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]
ame1011 Posted December 10, 2007 Posted December 10, 2007 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]
mikiutama Posted December 10, 2007 Posted December 10, 2007 try reading here...http://www.autoitscript.com/forum/index.ph...lecopy+progresshttp://www.autoitscript.com/forum/index.ph...lecopy+progresshttp://www.autoitscript.com/forum/index.ph...lecopy+progress
ame1011 Posted December 10, 2007 Posted December 10, 2007 (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 December 10, 2007 by ame1011 [font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now