UmeshS Posted October 26, 2010 Posted October 26, 2010 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 --------------------------
danniel9876 Posted December 2, 2014 Posted December 2, 2014 In case this could help anyone: I had the same question for setting the text of the address bar in the "Save As" dialog box in Windows 7. I fixed it by using the normal "Send" function, like in this code: ControlClick("Save As", "", "[CLASS:ToolbarWindow32; INSTANCE:3]", "right") ; Right click inside control to invoke "Edit Address" optionSleep(250) ControlSend("Save As", "", "[CLASS:ToolbarWindow32; INSTANCE:3]", "e") ; Choose "Edit Address" option Sleep(250) ;ControlSend("Save As", "", "[CLASS:ToolbarWindow32; INSTANCE:3]", "{DEL}") ; Delete currently selected directory -- THIS DOESN'T WORK Send("{DEL}") ; Delete currently selected directory ; -- THIS WORKS Sleep(250) ;ControlSend("Save As", "", "[CLASS:ToolbarWindow32; INSTANCE:3]", $targetDir & "{ENTER}") ; Enter New Directory Value String -- THIS DOESN'T WORK Send($targetDir & "{ENTER}") ; Enter New Directory Value String -- THIS WORKS Sleep(250) ; Set the target file name ControlSetText("Save As", "", "[CLASS:Edit; INSTANCE:1]", $myfilename, 1) ControlClick("Save As", "", "[CLASS:Button; TEXT:&Save;]")
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