olo Posted May 9, 2013 Share Posted May 9, 2013 (edited) Hey all, Please see the picture. I want to click the desktop option. Then click something inside the what is in the desktop. Ive tried these but to no avail. WinWaitActive("[CLASS:TkWBForm]") ControlClick("[CLASS:TkWBForm]", "", "TButton1") Sleep(1000) ControlClick("[CLASS:#32770]", "Desktop", "ToolbarWindow32") Sleep(1000) ControlClick("[CLASS:#32770]", "BCU101C_DSI002" , "SysListView32") Sleep(1000) ControlClick("[CLASS:#32770]", "Open", "Button2") oloDoc1.docx Edited May 9, 2013 by olo Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 9, 2013 Moderators Share Posted May 9, 2013 Do you know the name of the file you're going after? If so, you could always just activate the window and then send the path. Something like this: WInActivate("Open", "") ControlSend("Open", "", "Edit1", "C:\Documents and Settings\<username>\Desktop\MyText.txt{ENTER}") If you're unsure what the file will be, you'll need to figure out how you're going to determine file name first. You could do the ControlSend just to the directory you want, and then click on the file, something like this: WInActivate("Open", "") ControlSend("Open", "", "Edit1", "<path to parent dir>{ENTER}") olo 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
olo Posted May 10, 2013 Author Share Posted May 10, 2013 I do know the filename but I want the file name/location address to be a variable say $file. So when I open my program and click the button. It brings me to the open window as seen in the screenshot. I want to click the desktop option in the open window. Then click the file, $file that I want. Thanks Link to comment Share on other sites More sharing options...
olo Posted May 10, 2013 Author Share Posted May 10, 2013 Got it working with a ControlComannd function. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 10, 2013 Moderators Share Posted May 10, 2013 Glad you figured it out. olo 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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