am632 Posted March 15, 2010 Posted March 15, 2010 Hi, I have put together this script to install avg with a small gui. Progress bar thanks to Melba23 & Sh3llC043r (http://www.autoitscript.com/forum/index.php?showtopic=111468&st=0&p=782000&#entry782000) The script works fine, and installs avg silently but it wont close itself when it finishes. Im sure its something simple but I cant figure it out. Anyway heres the code #NoTrayIcon #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <SendMessage.au3> $hGUI = GUICreate("Installing AVG 9 Free", 480, 320) GuiCtrlCreatePic("avgbackground-big.jpg",0,0, 480,320) Run("avg_free_90_790a2730.exe /HIDE /DISABLE_SCAN /NOAVGTOOLBAR") GUICtrlCreateProgress(165, 211, 150, 20, $PBS_MARQUEE) _SendMessage(GUICtrlGetHandle(-1), $PBM_SETMARQUEE, True, 100) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd if ProcessExists("avg_free_90_790a2730.exe") Then ProcessWaitClose("avg_free_90_790a2730.exe") Exit else Exit endif Also on a different matter, I couldnt find the switch to turn the scan off when avg is installing so if anyone knows it, that would also be gr8 thanks
JohnOne Posted March 15, 2010 Posted March 15, 2010 Not sure about this but have you tried the QUIT_IF_INSTALLED switch ? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
am632 Posted March 15, 2010 Author Posted March 15, 2010 Hi, tnx for the reply. I havnt tried that switch but I hav just this second sussed it. I just deleted the lines While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd and now it works fine except the close button doesnt close it - im not fussed about this tho anyway.
Juvigy Posted March 15, 2010 Posted March 15, 2010 While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then GUIDelete() Exit EndIf Wend Try this instead your own.
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