Jump to content
Sign in to follow this  
olo

Click option on window?

Recommended Posts

olo

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

Share this post


Link to post
Share on other sites
JLogan3o13

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}")
  • Like 1

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
olo

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

Share this post


Link to post
Share on other sites
olo

Got it working with a ControlComannd function. :D

Share this post


Link to post
Share on other sites
JLogan3o13

Glad you figured it out.

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
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
Sign in to follow this  

×