Rohith Posted March 31, 2009 Share Posted March 31, 2009 (edited) Hello All, I am a newbee to AutoIT and found it very interesting. I was trying to use this tool and automate few tasks. I am able to perform most of the task except a few. Problem1 : I have a control where I need to get the text location and click on that text with in the specified control. Is there a function where I can get the text location(x1,y1 and x2,y2 values of pixels) with in the specified Control and perform the click action on the required pixel? Problem2 : For the ControlTreeView, we do nto have an option for right clicking the mouse on the required Item as we have a contextual menu to the Item. Is there any work around for the same? Edited March 31, 2009 by Rohith Link to comment Share on other sites More sharing options...
Fi0da Posted March 31, 2009 Share Posted March 31, 2009 If the location of the text is always in the same place on the screen, you can use the tool AutoItWindow in "Extras" to obtain the coordinator of the table and so use the MouseClick command. But if the text message appears as a randomly like a drop item, I think that should determine the color of the letter and use the PixelSearch. If your problem is not that, wait a few minutes we have some very good guys who always help the students I read ... I update ... I learn ... Link to comment Share on other sites More sharing options...
Rohith Posted April 1, 2009 Author Share Posted April 1, 2009 Thanks for the prompt reply FiOda . Yes, the texts which is search for varies in its position and other thing i need to take care is that it runs smooth on other computers also (as the monitor sizes changes). So, it would be better if I can get the position of the required text during run time and click on the same. Link to comment Share on other sites More sharing options...
Richard Robertson Posted April 1, 2009 Share Posted April 1, 2009 As for trying to right click something, that should always open a context menu. Right clicking isn't meant for general use. Link to comment Share on other sites More sharing options...
Rohith Posted April 2, 2009 Author Share Posted April 2, 2009 OH... OK.. i understand. Is there a way to open this contextual menu? Link to comment Share on other sites More sharing options...
Richard Robertson Posted April 2, 2009 Share Posted April 2, 2009 Simulating a right click is the most direct way to do it. You could instead read the control's information and find its context menu data and display the menu manually. I find that solution to be much more complicated though. Link to comment Share on other sites More sharing options...
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