asmodehn Posted June 28, 2005 Share Posted June 28, 2005 Hi all, I am trying to compute a pixel Checksum on controls in some of my scripts. I need that because for some ActiveX controls, we may know nothing about them, but still want to detect some change in the control display or compare it with a reference checksum... So I tried to make a script which will behave in the same way that the "AutoIT window info" program to get a control, then use a hotkey (F1) to compute the checksum. The script is attached, just have a look : I am using GUIGetCursorInfo() to get the control under the mousecursor... AND my foreground window need to remain the one I create, to be able to see the info. My problem is that works perfectly when the active windowm is the foreground window, but I get nothing when the active window is not the foreground one... Can someone let me know how I can have the same behaviour regarding active - foreground window than in "AutoIT window info", and get the controlPos in them ? Thank you very much controlPixelCKSUM.au3 Link to comment Share on other sites More sharing options...
jpm Posted June 29, 2005 Share Posted June 29, 2005 To have valid info the GuiGetCursorInfo returns info just on active windows related with the GUI you create. It is impossible to get info on non active window. Perhaps with a specific logic you can activate with WinActivate the window you are looking for. Thanks for pointing out the problem, I will update the doc to have everybody aware of this active thing. Link to comment Share on other sites More sharing options...
asmodehn Posted June 29, 2005 Author Share Posted June 29, 2005 (edited) Thank you for that answer, I tried to activate the window with winactivate("title"). This works ( I get the focus as if I click on it ) but I am still unable to access the controls in it with GUIGetCursorInfo. Actually the window I am looking for is not related in any way to the GUI I created, so I guess that is the reason. I just wanted the same behaviour as AutoIT window info has with selecting a window to make it active, and get the control coords in it, while the GUI I actually created remain on the foreground... So I guess this is not possible using an AutoIT script :-/ Anyway Thanks for the hint Edited June 29, 2005 by asmodehn Link to comment Share on other sites More sharing options...
jpm Posted June 30, 2005 Share Posted June 30, 2005 Thank you for that answer,I tried to activate the window with winactivate("title"). This works ( I get the focus as if I click on it ) but I am still unable to access the controls in it with GUIGetCursorInfo.Actually the window I am looking for is not related in any way to the GUI I created, so I guess that is the reason.I just wanted the same behaviour as AutoIT window info has with selecting a window to make it active, and get the control coords in it, while the GUI I actually created remain on the foreground...So I guess this is not possible using an AutoIT script :-/Anyway Thanks for the hint <{POST_SNAPBACK}>as I say the GUI windows have to be created by GUICreate. Perhaps I was not so clear. I update the doc in this directionTHanks 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