nick21 Posted January 25, 2009 Posted January 25, 2009 I am making a AutoInstall exe file to auto install some program I have. I know that Send ("!n") can trigger it to click the next button, but now I come to the FINISH button where Send ("!f") does not work, what command would I be able to to use to have it click that.Yeah I know I can do a mouse click function but I would have to yet the X,Y cor. but I wanted it just to auto click that button.Is there an Instance, with/Class command I could use or something.Here is the info:Class: ButtonInstance: 4ClassnameNN: Button4ID: 1Text: Finishany help would be great,thanks,nick
Pain Posted January 25, 2009 Posted January 25, 2009 (edited) Send is unreliable, use ControlSend and ControlClick. Btw hold down alt and one of the letters will get a underscore, alt + this letter is the shortkey. Finish doesn't use to have a shortkey but it's the default button so Send("{ENTER}") should work. Edited January 25, 2009 by Pain
nick21 Posted January 25, 2009 Author Posted January 25, 2009 Send is unreliable, use ControlSend and ControlClick. Btw hold down alt and one of the letters will get a underscore, alt + this letter is the shortkey. Finish doesn't use to have a shortkey but it's the default button so Send("{ENTER}") should work. I am trying to learn some code so I am trying it this way. What am I doing wrong?? From AutoIt Window Viewer >>>> Control <<<< Class: Button Instance: 4 ClassnameNN: Button4 ID: 1 Text: Finish Position: 323, 319 Size: 75, 23 ControlClick Coords: 28, 4 Style: 0x50010001 ExStyle: 0x00000004 Handle: 0x002C00F4 I am trying this code: ControlClick("My Window", "", "[CLASS:Button; TEXT:Finish; INSTANCE:2]") Here is my edit: Controlclick ("3D program", "InstallShield Wizard Complete", "[CLASS:Button; TEXT:Finsih; INSTANCE:4]")
zero57 Posted January 25, 2009 Posted January 25, 2009 (edited) I am making a AutoInstall exe file to auto install some program I have. I know that Send ("!n") can trigger it to click the next button, but now I come to the FINISH button where Send ("!f") does not work, what command would I be able to to use to have it click that. Yeah I know I can do a mouse click function but I would have to yet the X,Y cor. but I wanted it just to auto click that button. Is there an Instance, with/Class command I could use or something. Here is the info: Class: Button Instance: 4 ClassnameNN: Button4 ID: 1 Text: Finish any help would be great, thanks, nick The Send("") isn't always great. This is why they made MouseClick and MouseMove. So im going to tell u how to get the coords for MouseClick/MouseMove. First: Open up Autoit Window Info by Start > All Programs > Autoit V3 > Autoit Window Info Second: U could move the window info around if the window is blocking the button, and Click the "Mouse" tab. Third: Move ur mouse over the button, Notice that there is a word called "Position", well beside it HAS UR COORDS!!!! E.G.: My mouse coords is "446, 531" Fourth: U could just write the position on the paper, OR The copy and paste way . Copy and Paste Way: Hold Alt and keep on pressing Tab until the thing says "Autoit Window Info" This will keep ur position until u click outside the window info. Now, Click the "Summary" Tab, and scroll down a bit until u see the Position word. Use ur mouse and Copy the coords, in this case i just copied my coords "446, 531" and pasted it into my script. E.G.: MouseClick("left", 446, 531) OR MouseMove(446, 531) MouseClick("Left") Hope this helps Edited January 26, 2009 by zero57 [font="Arial Black"][u]zero57[/u][/font]
PsaltyDS Posted January 26, 2009 Posted January 26, 2009 I am trying to learn some code so I am trying it this way. What am I doing wrong?? From AutoIt Window Viewer >>>> Control <<<< Class: Button Instance: 4 ClassnameNN: Button4 ID: 1 Text: Finish Position: 323, 319 Size: 75, 23 ControlClick Coords: 28, 4 Style: 0x50010001 ExStyle: 0x00000004 Handle: 0x002C00F4 I am trying this code: ControlClick("My Window", "", "[CLASS:Button; TEXT:Finish; INSTANCE:2]") Here is my edit: Controlclick ("3D program", "InstallShield Wizard Complete", "[CLASS:Button; TEXT:Finsih; INSTANCE:4]") Just drop the text and try: ControlClick("3D program", "InstallShield Wizard Complete", "[CLASS:Button; INSTANCE:4]") Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Authenticity Posted January 26, 2009 Posted January 26, 2009 (edited) Rofl, thanks for the short tutorial, but if the window is moved by the user you're going to click something else in this position. ControlClick is more reliable the Send or MouseClick in this cases. @nick21: From what I can see it's actually Button4. You can always preform mouse click amount of pixel up and left from the bottom right corner of the window because dialogs usually aren't resizeable, there are quite few more ways to accomplish this task. Edited January 26, 2009 by Authenticity
nick21 Posted January 26, 2009 Author Posted January 26, 2009 @ PsaltyDS Thank you that worked like a charm. Thanks to everyone in helping me out.
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