Jump to content

Click option on window?


Recommended Posts

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")

olo

Doc1.docx

Edited by olo
Link to comment
Share on other sites

  • Moderators

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}")

"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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...