Shoby Posted July 17, 2015 Share Posted July 17, 2015 Hello Everyone,I am using Controlclick coords as a workaround to click on the datagrid contents. But wen i use my script in another PC which has less resolution than mine. The action fail to perform due to the difference in ControlClick Coords value.For sure many of them would ave faced this issue..Anyone has any idea on this issue.. Link to comment Share on other sites More sharing options...
Zobengrauzis Posted July 17, 2015 Share Posted July 17, 2015 make it so that script detects resolution, and changes the slight coordinates accordingly (@desktopheight, @desktopwidth will help you) Link to comment Share on other sites More sharing options...
Shoby Posted July 17, 2015 Author Share Posted July 17, 2015 Thanks Zobengrauzis for the reply. For example, I am using this command to access a dropdown in my own PC : ControlClick("Title","","[NAME:dgvInclusions]","left",1,1444,85)If I give my script to other user with different resolution than me ControlClick("Title","","[NAME:dgvInclusions]","left",1,1108,96)I am unable to fix this issue..Can you please explain little bit brief about the @desktop command that can be used in my case to fix the issue.. Link to comment Share on other sites More sharing options...
Zobengrauzis Posted July 17, 2015 Share Posted July 17, 2015 @desktopheigh/width will return you desktop resolution. that you can use to make switch for the coordinates to use. If @desktopheight = 1080 and @desktopwidth = XXXX then $click_x_coordinates = XX and $click_y_coordinates = YY.. got it? Link to comment Share on other sites More sharing options...
Shoby Posted July 17, 2015 Author Share Posted July 17, 2015 Ya I got it.. But if I give my script to another user who has different resolution..I have to know his resolution and the x, y coordinates...?? Is this wat u mean and put more if loop with desktop height and width conditions...Sorry if I am wrong.. Link to comment Share on other sites More sharing options...
Zobengrauzis Posted July 17, 2015 Share Posted July 17, 2015 Yes indeed. Only universal way, is to get scheme (if there is any) by wich the program makes up the coordinates (maybe its always on the 20% on X axis from desktop width and 10% from Y axis on heigh, just an example). other way could be getting height and width of that particular control, and look for cordinate scheme in itself. you can look for pixel search, too a way for universal approach, but can't help you much there, cuz not really familiar with it. 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