korsg Posted July 13, 2006 Share Posted July 13, 2006 Hello, First time i use this forum so wish me luck Well i have a script which copies a file over the network, its triggered by an button. I want an indetermined progress bar to move when the copying is progressing. But i an only get the bar to progress when the copying has finished Heres my script: expandcollapse popup#include <GUIConstants.au3> Global Const $PBS_MARQUEE = 0x08 Global Const $WM_USER = 0x0400 Global Const $PBM_SETMARQUEE = ($WM_USER+10) Global $status = 1 Opt("GUIOnEventMode", 1) $GUI = GUICreate("Marquee Progress Bar", 400, 400) GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_CLOSE") $salgsstatistik1 = GUICtrlCreateButton ("Hent nyeste Salgsstatisik", 10, 50, 170) GUICtrlSetOnEvent(-1, "salgsstatistik1") GUISetState() While 1 Sleep(100) WEnd Func salgsstatistik1() $GUI_Progress = GUICtrlCreateProgress(50, 200, 100, 20, $PBS_MARQUEE); progress bar setup GUICtrlSendMsg($GUI_Progress, $PBM_SETMARQUEE, 1, 200); Starts progress bar $salgcopy = FileCopy('K:\Sælgere\Salgsstatistik.zip', 'c:\',1); Copies file if $salgcopy = 1 then; Makes a small msgbox after the files has been downloadet. $status = 0; turns off progress bar MsgBox(4096, "Succes", "download succes") EndIf EndFunc Func GUI_CLOSE() Exit EndFunc What am i doing wrong? Link to comment Share on other sites More sharing options...
GaryFrost Posted July 13, 2006 Share Posted July 13, 2006 might want to look at: http://www.autoitscript.com/forum/index.ph...=11313&st=0 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
korsg Posted July 14, 2006 Author Share Posted July 14, 2006 (edited) Hmm, doesnt quite cut it... need something that only copies files... Cant figure it out, been searching the forums for ages, there must be something that can get my script working, or am i totally wrong ? Edited July 14, 2006 by korsg Link to comment Share on other sites More sharing options...
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