cburbs Posted February 20, 2009 Posted February 20, 2009 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]")
Triblade Posted February 20, 2009 Posted February 20, 2009 I allways leave text outta the command. Try: ControlClick("GPL Ghostscript Setup", "", "[CLASS:Button; Instance:2]") My active project(s): A-maze-ing generator (generates a maze) My archived project(s): Pong3 (Multi-pinger)
cburbs Posted February 20, 2009 Author Posted February 20, 2009 Triblade said: I allways leave text outta the command. Try: ControlClick("GPL Ghostscript Setup", "", "[CLASS:Button; Instance:2]") I tried that and it did nothing -
Envoi Posted February 20, 2009 Posted February 20, 2009 cburbs said: 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.
cburbs Posted February 20, 2009 Author Posted February 20, 2009 (edited) Envoi said: 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 February 20, 2009 by cburbs
Envoi Posted February 20, 2009 Posted February 20, 2009 cburbs said: 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?)
cburbs Posted February 20, 2009 Author Posted February 20, 2009 Envoi said: 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.
Envoi Posted February 23, 2009 Posted February 23, 2009 cburbs said: 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.
michalss Posted November 4, 2010 Posted November 4, 2010 Hi everyone i'm kind a new to this. I have exact the same problem but i need to select "c:\Program Files\Attachmate" folder instead of V folder. Is there any way to tell it do it pls ? Regards
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