au3scr Posted May 10, 2008 Posted May 10, 2008 How to avoid gui hide when script is downloading firefox? When i dont have last while section comment out , goui will be hided, how i can avoid it? expandcollapse popup#include <GUIConstants.au3> $Form1 = GUICreate("Apt-get", 640, 480, 201, 116, BitOr($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX)) $MenuItem1 = GUICtrlCreateMenu("General") $MenuItem11 = GUICtrlCreateMenuItem("Copy text", $MenuItem1) $MenuItem12 = GUICtrlCreateMenuItem("Save text", $MenuItem1) $MenuItem13 = GUICtrlCreateMenuItem("Fullscreen", $MenuItem1) $MenuItem14 = GUICtrlCreateMenuItem("Hide", $MenuItem1) $MenuItem2 = GUICtrlCreateMenu("Help") $MenuItem21 = GUICtrlCreateMenuItem("About", $MenuItem2) $MenuItem21 = GUICtrlCreateMenuItem("Install.ini Commands", $MenuItem2) Global $output = GUICtrlCreateedit ("",3,0,638,460,$ES_READONLY) GUICtrlSetBkColor(-1,0x000000) GUICtrlSetColor(-1,0xC0C0C0) GUICtrlSetFont(-1, 10, 500, 0,"terminal") GUICtrlSetData ($output,"Welcome to installer, made by Rain"&@crlf&'To see avaible commands click on help menu and then click on "Install.ini Commands"') $admin = IsAdmin () If $admin = 0 Then $oldoutput = GUICtrlRead($output) GUICtrlSetData($output,$oldoutput&@CRLF&"Sorry, you DO NOT have permission to install any programm, please exit now") EndIf getlist () GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func getlist () $ProgramsToInstall = 1 $ProgramName = "Firefox" $oldoutput = GUICtrlRead($output) GUICtrlSetData($output,$oldoutput&@CRLF&" "&@CRLF&"Number programs selected for instalation:"&$ProgramsToInstall) $oldoutput = GUICtrlRead($output) GUICtrlSetData($output,$oldoutput&@CRLF&" "&@CRLF&$ProgramName) $oldoutput = GUICtrlRead($output) GUICtrlSetData($output,$oldoutput&@CRLF&" "&@CRLF&"Starting instalation") _firefox () ;~ MsgBox(1,"","done") EndFunc Func _firefox () InetGet("http://www.mozilla.com/en-US/firefox/", "firefox.htm", 1, 1) While @InetGetActive $oldoutput = GUICtrlRead($output) GUICtrlSetData($output,$oldoutput&@CRLF&" "&@CRLF&" "&@CRLF&" "&@CRLF&"Dedecting lastest version") Sleep(550) Wend $version = FileReadLine (@scriptdir&"\firefox.htm",98) $count=StringLeft($version,75) $count2=Stringright($count,8) $oldoutput = GUICtrlRead($output) GUICtrlSetData($output,$oldoutput&@CRLF&"Dedcted "&$count2) InetGet("ftp://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/win32/en-US/Firefox Setup "&$count2&".exe", "firefox.exe", 1, 1) While @InetGetActive ;~ $oldoutput = GUICtrlRead($output) ;~ $bytes = @InetGetBytesRead ;~ $size = $bytes&"B" ;~ If $bytes > 1024 Then ;~ $bytes = $bytes / 1024 ;~ $size = $bytes&"KB" ;~ If $bytes > 1024 Then ;~ $bytes = $bytes / 1024 ;~ $size = $bytes&"MB" ;~ EndIf ;~ EndIf GUICtrlSetData($output,$oldoutput&@CRLF&"Downloading firefox "&$count2&" "&@InetGetBytesRead&" Is downloaded") Sleep(250) Wend EndFunc
d4rk Posted May 11, 2008 Posted May 11, 2008 WinActivate() ? [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys
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