Nostalius Posted June 2, 2009 Posted June 2, 2009 Hi How can i make my program to click on something i want? Are there any tutorials already? Can't find :S And also how to make my program write something that i want in any space cheers
Nostalius Posted June 3, 2009 Author Posted June 3, 2009 Start with the help file and "MouseClick"8)Im running the Game Updater, then AutoIt Window Info, then i move cursor on the button i want to be clickedPosition is: 14, 410So im doing code like this:;Run KalOnline.exeRun("KalOnline.exe");Wait 5s then run gameSleep(5000)MouseClick("left", 14, 410, 2)And it doesnt click on the button :/ , the cursor is moving somewhere on the end of screenAny ideas?
Nostalius Posted June 3, 2009 Author Posted June 3, 2009 I change the code:;Run KalOnline.exeRun("KalOnline.exe");Wait 5s then run gameSleep(5000)MouseClick("left", 14, 410, 0)but now mouse dont even move ;/
Valuater Posted June 3, 2009 Posted June 3, 2009 MouseClick("left", 14, 410, 0)Maybe cause you want "0" clicks... I don't knowWhere did you get that "0" from?Where is the Option Mode at?8)
Nostalius Posted June 3, 2009 Author Posted June 3, 2009 Where is the Option Mode at?well i dont know where to put it hmm
Valuater Posted June 3, 2009 Posted June 3, 2009 well i dont know where to put it hmmat the top of the page... use the one at the bottom of the page in the help fileMight wanna take a class in Autoithttp://www.autoitscript.com/forum/index.ph...mp;showfile=1008)
Nostalius Posted June 3, 2009 Author Posted June 3, 2009 at the top of the page... use the one at the bottom of the page in the help fileMight wanna take a class in Autoithttp://www.autoitscript.com/forum/index.ph...mp;showfile=1008)I can't understand, can you show me how the code should looks?I like to do things myself but i cant understand it, and if u show me code i will see how to do this and what im doing wrongcheers
Valuater Posted June 3, 2009 Posted June 3, 2009 did you look at the link for the class? here is how to use the option for mouse coordinates Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client ;Run KalOnline.exe Run("KalOnline.exe") WinWaitActive("") ;Wait 5s then run game Sleep(5000) MouseClick("left", 14, 410, 0) 8)
nfaustin Posted June 3, 2009 Posted June 3, 2009 Question: Is your X and Y value coordinate within a window or it is a coordinate on your desktop height and width? Opt("MouseCoordMode", 0) is use for the X and Y value coordinate within the window only. [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]
Nostalius Posted June 3, 2009 Author Posted June 3, 2009 Thx alot mate it worked now And now.. how can i get the position of "Hanin"Screenshot:because it doesnt show any position in window info
Valuater Posted June 3, 2009 Posted June 3, 2009 Question:Is your X and Y value coordinate within a window or it is a coordinate on your desktop height and width?Opt("MouseCoordMode", 0) is use for the X and Y value coordinate within the window only.Is your X and Y value coordinate within a window ... Yes, or it is a coordinate on your desktop height and width? NoOpt("MouseCoordMode", 0) is use for the X and Y value coordinate within the window only.... yes, that is what you want.Actually, if it is a button and you have the Autoit Window Info, You should be using ControlCommand() or ControlClick()... But you dont look at the info for learning that I linked to8)
Valuater Posted June 3, 2009 Posted June 3, 2009 (edited) Abuse... why do I allow it??? Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client While 1 $pos = MouseGetPos() ToolTip("X = " & $pos[0] & @CRLF & "Y = " & $pos[1], 10, 10, "Thanks... Valuater", 1) Sleep(50) WEnd 8) Edited June 3, 2009 by Valuater
Nostalius Posted June 3, 2009 Author Posted June 3, 2009 Thx alot mateMy Code looks like this now:Opt("MouseCoordMode", 0)Run("KalOnline.exe")Sleep(2000)MouseClick("left", 14, 410, 2, 0)Sleep(9000)MouseClick("left", 440, 507, 2, 0)It should click on server name Hanin, but it doesnt and the application is closing (my program), its not on tray anymoreand btw do you have msn mayby?
stampy Posted June 3, 2009 Posted June 3, 2009 Abuse... why do I allow it???I think it's some sort of secret fetish of yours lol
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