MostafaMohamed Posted October 24, 2012 Share Posted October 24, 2012 (edited) hello ppli want to use autoit to type in the location showed in the pic attachedim tring to send any date but i cantmy script is :WinWait("Open","Look &in:") If Not WinActive("Open","Look &in:") Then WinActivate("Open","Look &in:") WinWaitActive("Open","Your computer is not secure!") Send("C:\vdf_fusebundle.zip")the autoit windows information is :expandcollapse popup>>>> Window <<<< Title: Open Class: #32770 Position: 65, 66 Size: 561, 410 Style: 0x96C820C4 ExStyle: 0x00010501 Handle: 0x00090114 >>>> Control <<<< Class: Instance: ClassnameNN: Name: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: >>>> Mouse <<<< Position: 504, 79 Cursor ID: 0 Color: 0xBDB6BD >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Look &in: My Documents FolderView File &name: Files of &type: VDF Update File (vdf_fusebundle.zip) &Open Cancel >>>> Hidden Text <<<< Open as &read-only &Helpthe program that i manage to send data to is avira antivirus as shownplease help me Edited October 24, 2012 by MostafaMohamed Link to comment Share on other sites More sharing options...
Exit Posted October 24, 2012 Share Posted October 24, 2012 (edited) WinWaitActive("Open","Your computer is not secure!")will wait forever since the text "Your computer is not secure!" is not in this window but in the parent window. Edited October 24, 2012 by Exit App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
MostafaMohamed Posted October 24, 2012 Author Share Posted October 24, 2012 thank u for ur help i changed it to WinWait("Open","Look &in:") If Not WinActive("Open","Look &in:") Then WinActivate("Open","Look &in:") WinWaitActive("Open","Look &in:") Send("C:vdf_fusebundle.zip") that worked thank u so much Link to comment Share on other sites More sharing options...
Exit Posted October 24, 2012 Share Posted October 24, 2012 Here a more complete function for Avira Manual Update. #include <GuiMenu.au3> $myfile = @DesktopDir & "\avira_fusebundlegen-win32-en\install\vdf_fusebundle.zip" _AviraManualUpdate($myfile) Exit Func _AviraManualUpdate($VDF_file) $ApplDir = @ProgramFilesDir & "\Avira\AntiVir Desktop" If Not FileChangeDir($ApplDir) Then Exit MsgBox(262144, "AVIRA UPDATE ", "Avira program directory not found " & @LF & @LF & $ApplDir & @LF, 0) $pid = Run("avcenter.exe") $Handle = WinWait("Avira Free Antivirus", 10) If $Handle = 0 Then Exit MsgBox(262144, "AVIRA UPDATE ", "Avira control center window not found ", 0) $hMain = _GUICtrlMenu_GetMenu($Handle) $hsub = _GUICtrlMenu_GetItemSubMenu($hMain, 3) $id2 = _GUICtrlMenu_GetItemID($hsub, 2) $rc = _PostMessage($Handle, 0x111, $id2) $Handle1 = WinWait("[Class:#32770]", "VDF", 10) If $Handle1 = 0 Then Exit MsgBox(262144, "AVIRA UPDATE ", "Avira update input window not found ", 0) $rc = ControlSend($Handle1, "", "Edit1", $VDF_file) If $rc = 0 Then Exit MsgBox(262144, "AVIRA UPDATE ", "Avira update input not accepted " & @LF & @LF & $VDF_file & @LF, 0) $rc = ControlClick($Handle1, "", "Button1") If $rc = 0 Then Exit MsgBox(262144, "AVIRA UPDATE ", "Avira update failed to press 'Open' button ", 0) $Handle2 = WinWait("Updater", "", 10) If $Handle2 = 0 Then Exit MsgBox(262144, "AVIRA UPDATE ", "Avira updater window not found ", 0) $Handle2 = WinWaitNotActive("Updater", "", 600) If $Handle2 = 0 Then Exit MsgBox(262144, "AVIRA UPDATE ", "Avira updater window was not closed ", 0) Sleep(3000) $rc = ControlSend($Handle, "", "", "!{F4}") EndFunc ;==>_AviraManualUpdate Func _PostMessage($hWnd, $iMsg, $wParam = 0, $lParam = 0) Local $aResult = DllCall("user32.dll", "lresult", "PostMessageW", "hwnd", $hWnd, "uint", $iMsg, "wParam", $wParam, "lParam", $lParam) Return SetError(@error, @extended, $aResult) EndFunc ;==>_PostMessage App: Au3toCmd UDF: _SingleScript() 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