foolove Posted November 17, 2011 Share Posted November 17, 2011 I was wondering of the best approach to getting the coordinate desktop height and width of active window I am not sure if this is the best approach my end goal is to do a series of mousclicks but make my program portable to others so it can be used with their monitor and their resolutions Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 17, 2011 Moderators Share Posted November 17, 2011 Hi, Foolove. I'm not sure I'm following, but it sounds like you want to do Mouseclicks on your app's window, but want to ensure it hits in the right area. You could always make a call to WinMove to make the window the size you would like it to be: WinMove("[CLASS:Notepad]", "", Default, Default, 300, 300) "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
foolove Posted November 17, 2011 Author Share Posted November 17, 2011 From here can I do calls to the window and use the coordinates of the given window based on size so if i give my program to another person they can use it? If so how do I call a mouse click based on the window? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 17, 2011 Moderators Share Posted November 17, 2011 You should be able to, however it is difficult to say with certainty without a clearer idea of your goal. If you could post a portion of the script you're working on, to give us an idea exactly what it is you're trying to accomplish, we would be much better suited to assist "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
foolove Posted November 17, 2011 Author Share Posted November 17, 2011 Sure HotKeySet("{ESC}", "Terminate") Func Terminate() Exit 0 EndFunc WinSetState("[CLASS:SunAwtFrame]", "", @SW_MAXIMIZE) WinWaitActive ("[CLASS:SunAwtFrame]") WinMove("[CLASS:SunAwtFrame]", "", Default, Default, 1200, 600) Send("{CTRLDOWN}") Send("{ALTDOWN}") Send("z") Send("{CTRLUP}") Send("{ALTUP}") sleep(2000) Send("{ENTER}") #cs Need a MoveMouse here in accordance to active window sleep(2000) MouseClick("Right") #ce Link to comment Share on other sites More sharing options...
foolove Posted November 17, 2011 Author Share Posted November 17, 2011 All I am trying to do is make a MouseClick program that will work on other computers that are using the same program 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