Jump to content

Control Click Help


cburbs
 Share

Recommended Posts

I am trying to script an install of a program. It needs to do a browse to a few folders as the default "Install to Directory" is not correct.

I tried the following but it does nothing -

ControlClick("GPL Ghostscript Setup", "This installsGPL", "[CLASS:Button; TEXT:Browse; Instance:2]")

post-28253-1235142206_thumb.jpg

Link to comment
Share on other sites

I tried that and it did nothing -

Does this do anything?

ControlClick("GPL Ghostscript Setup", "", "[ID:204]")

If you capture the return value of the ControlClick(), is it returning a 1 or 0? Just curious if AutoIt thinks it's clicking it, but Ghostscript isn't responding for some reason.

Link to comment
Share on other sites

Does this do anything?

ControlClick("GPL Ghostscript Setup", "", "[ID:204]")

If you capture the return value of the ControlClick(), is it returning a 1 or 0? Just curious if AutoIt thinks it's clicking it, but Ghostscript isn't responding for some reason.

I had to change the 2nd set of quotes so it would see the screen it was on -

Now I am trying to make it browse the folder and I can't get it to select the item -

I need to double click on it so I can browse somemore -

ControlClick("Select Folder", "", "[CLASS:ListBox; INSTANCE:1]")

sleep (1000)

Send("v")

This opens up browse and goes to the folder I need that begins with a "V". I need to double click on this item to continue.

I can't add any more pic files to my posting as I ran out of space.

Edited by cburbs
Link to comment
Share on other sites

I had to change the 2nd set of quotes so it would see the screen it was on -

Now I am trying to make it browse the folder and I can't get it to select the item -

I need to double click on it so I can browse somemore -

ControlClick("Select Folder", "", "[CLASS:ListBox; INSTANCE:1]")

sleep (1000)

Send("v")

This opens up browse and goes to the folder I need that begins with a "V". I need to double click on this item to continue.

I can't add any more pic files to my posting as I ran out of space.

I'm not really sure what the issue is now. Do you just need to send a double-click to the control? If so just pass a 2 as the "clicks" parameter when calling ControlClick(). Please post your code if you have other questions. Sometimes it's easier to understand intentions by reading code than by reading sentences. (Unfortunately?)
Link to comment
Share on other sites

I'm not really sure what the issue is now. Do you just need to send a double-click to the control? If so just pass a 2 as the "clicks" parameter when calling ControlClick(). Please post your code if you have other questions. Sometimes it's easier to understand intentions by reading code than by reading sentences. (Unfortunately?)

WinWaitActive("GPL Ghostscript Setup", "Requires 25 Mbytes disk space.")

; selects the browse button on screen

ControlClick("GPL Ghostscript Setup", "", "[CLASS:Button; INSTANCE:2]")

;Jumps to ListBox to change folder install

ControlClick("Select Folder", "", "[CLASS:ListBox; INSTANCE:1]")

sleep (1000)

Send("v") ;selects the V folder I need

sleep (1000)

ControlClick("Select Folder", "", "[CLASS:ListBox; INSTANCE:1]["",2]")

Where is the click twice need to go? I believe I have it wrong in the last ControlClick...everything works until that last line.

Link to comment
Share on other sites

WinWaitActive("GPL Ghostscript Setup", "Requires 25 Mbytes disk space.")

; selects the browse button on screen
ControlClick("GPL Ghostscript Setup", "", "[CLASS:Button; INSTANCE:2]")

;Jumps to ListBox to change folder install
ControlClick("Select Folder", "", "[CLASS:ListBox; INSTANCE:1]")
sleep (1000)
Send("v");selects the V folder I need
sleep (1000)
ControlClick("Select Folder", "", "[CLASS:ListBox; INSTANCE:1]["",2]")

Where is the click twice need to go? I believe I have it wrong in the last ControlClick...everything works until that last line.

Yeah, that last line doesn't look right. It looks like you're telling your script to double-click the whole listbox, not just one item. Since you've already used "v" to get the folder you need selected, could you try just sending and {ENTER} instead of trying to double-click?

Hope this helps.

Link to comment
Share on other sites

  • 1 year later...

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...