Andre Posted February 3, 2005 Posted February 3, 2005 Hi, I've got some problems running this. The installation should be completly hidden but its not... Anyone got ideas ? expandcollapse popupOpt('SendKeyDelay',100) ; ---------------------------------------------------------------------------- Dim $WindowTitle = 'OpenVPN 2.0_rc10-gui-1.0-rc2 Setup' Dim $OpenVpnGui = 'openvpn-2.0_rc10-gui-1.0-rc2-install.exe' Dim $DefInstallDir = 'C:\Program Files\OpenVpn\' Dim $SrcFiles = 'C:\download\openvpn\' Install_OpenVpn() Func Install_OpenVpn() FileInstall('c:\download\openvpn\openvpn-2.0_rc10-gui-1.0-rc2-install.exe' ,@TempDir & '\' ,1) Run(@TempDir & '\' & $OpenVpnGui,'',@SW_HIDE) WinWaitActive($WindowTitle) Sleep(500) WinSetState($WindowTitle,'',@SW_HIDE) If StringInStr(ControlGetText($WindowTitle,'','Static1'),'It seems the package OpenVPN (OpenVPN GUI)') Then ControlClick($WindowTitle,'','Button1') ; Continue if already installed. EndIf If StringInStr(ControlGetText($WindowTitle,'','Static2'),'OpenVPN GUI is currently running.') Then ControlClick($WindowTitle,'','Button1') ; Close Gui if running EndIf Sleep(500) ; Safety delay ControlClick($WindowTitle,'','Button2') ; Next.... ControlClick($WindowTitle,'','Button2') ; Agree ControlSend($WindowTitle,'','SysTreeView321','{home}{down 2}{space}{down 3}{space}{down 7}{space}'); Select Install Options ControlClick($WindowTitle,'','Button2') ; Acknowledge Options ControlSend($WindowTitle,'','Edit1','{home}+{end}{delete}' &$DefInstallDir) ; Installation Directory ControlClick($WindowTitle,'','Button2') ; Proceed with Install $Completed = 'empty' ; Wait for files...... While $Completed <> 'Completed' $Item = ControlListView($WindowTitle,'','SysListView321','GetItemCount') $Completed = ControlListView($WindowTitle,'','SysListView321','GetText',$Item -1) Sleep(50) WEnd ControlClick($WindowTitle,'','Button2') ; Setup Completed ControlClick($WindowTitle,'','Button2') ; End Setup ;Wait for program to unload.... Sleep(500) FileDelete(@TempDir & '\' & $OpenVpnGui) EndFunc Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
sugi Posted February 3, 2005 Posted February 3, 2005 You can only hide the first window with the run command. All other windows are visible. The best you can do is wait for them and then hide them (WinSetState).
Andre Posted February 3, 2005 Author Posted February 3, 2005 Thnx now i know whats wrong... But when i wait and then hide them, is my screen then going to flicker ? Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
sugi Posted February 3, 2005 Posted February 3, 2005 Yes, because the windows will appear and then your script hides them.
Andre Posted February 3, 2005 Author Posted February 3, 2005 (edited) Any idea to solve that ? Edit : Perhaps an extended _Run function that hides all windows ? Edited February 3, 2005 by Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
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