Jump to content

UmeshS

Members
  • Posts

    7
  • Joined

  • Last visited

UmeshS's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I am trying to set directory value within WinZip's unzip function/action by using ControlSend(...) on ToolbarWindows32 control. However, the control erfuses to receive any text. Other things like sending clicks seems to work on this control. Please help! See my code snippet below for reference. Thanks. Umesh ------------------------- ControlClick("Unzip", "", "[CLASS:ToolbarWindow32; INSTANCE:2]", "right") ;Right click inside control to invoke "Edit Address" option Sleep(250) ControlSend("Unzip", "", "[CLASS:ToolbarWindow32; INSTANCE:2]", "e"); Choose "Edit Address" option Sleep(250) ControlSend("Unzip", "", "[CLASS:ToolbarWindow32; INSTANCE:2]", "{DEL}") ; Delete currently selected directory -- THIS DOESN'T WORK Sleep(250) ControlSend("Unzip", "", "[CLASS:ToolbarWindow32; INSTANCE:2]", $UnzipDir & "{ENTER}") ; Enter New Directory Value String -- THIS DOESN'T WORK Sleep(250) ControlClick("Unzip", "", "[CLASS:Button; INSTANCE:4]", "left") ; Click on Unzip button WinWaitActive("Decrypt", "") ;Wait until password prompt Sleep(200) ControlSend("Decrypt", "", "[CLASS:Edit; INSTANCE:1]", "password") ; Don't hit ok yet --------------------------
  2. ------------ Here's another sample test that is failing... #Include <WinAPI.au3> Run("C:\Program Files\Google\Picasa3\Picasa3.exe") WinWaitActive ("Picasa 3") WinActivate("Picasa 3") ControlSend("Picasa 3", "", "[CLASS:Edit; INSTANCE:1]", "{SHIFTDOWN}{HOME}{SHIFTUP}{SHIFTDOWN}H{SHIFTUP}appy!") MsgBox(0, "Debug - WinAPI_GetFocus()", _WinAPI_GetFocus()) MsgBox(0, "Debug - WinAPI_SetFocus()", _WinAPI_SetFocus(WinGetHandle("Picasa 3"))) MsgBox(0, "Debug - WinAPI_GetFocus()", _WinAPI_GetFocus()) WinClose("Picasa 3") Exit
  3. Both GetFocus and SetFocus are returning 0x00000000 and subsequent @error is also 0 and hence I don't know what's going on? Why are ___Focus() calls returning 0? $wndFocus = _WinAPI_GetFocus() MsgBox(0, "Debug", "WinGetHandle(Picasa 3) returned " & WinGetHandle("Picasa 3") & @CRLF & _ "_WinAPI_GetForegroundWindow() returned " & _WinAPI_GetForegroundWindow() & @CRLF & _ "_WinAPI_SetFocus(WinGetHandle(Picasa 3)) returned " & _WinAPI_SetFocus(WinGetHandle("Picasa 3")) & @CRLF & _ "_WinAPI_SetFocus(_WinAPI_GetForegroundWindow()) returned " & _WinAPI_SetFocus(0) & @CRLF & _ "First _WinAPI_GetFocus() returned " & $wndFocus & " and Second _WinAPI_GetFocus() returned " & _WinAPI_GetFocus() ) Thanks. Umesh
  4. Has anyone tried to use _WinAPI_WaitForSingleObject() UDF to accomplish waiting for a file to complete writing (without busy waiting, i.e. polling with sleep() )? Thanks. Umesh
  5. Cool, thanks. It works.
  6. Hi, I need to detect "busy" pointer (on Vista pointer changes to animated circle) and WaitUntil mouse pointer changes the state back and forth. Please help... how do I do this? Thanks. Umesh
×
×
  • Create New...