05-08-2006, 02:02 PM
>> Get handle of control under mouse:
>> int handle=child(mouse)
>> If using filter function, it would be f.hwnd2.
OK, very good.
Now, is there a way of getting from handle some sort of unique name that I can use it to identify that particular control. What I am doing right now is that the user has to provide an initialization click (I use a wheel (middle button) click for this) on the control to tell my suite of macros where the control is located during this instance of running the program. Of course, if I then resize the FreeHand application window, I will then have to again provide the initialization click so that I know where to simulate mouse clicks on the editable field and paste text into it.
Btw, it's about time I told you what I am trying to do. FreeHand 9 does not come with a wheel zoom. This is important to me. So your QM offers an excellent tool for 'creating' all the events by rolling the wheel. So, for example, when I wheel forward, I catch this event and add a percentage to the current Zoom factor (e.g., 100 + 25) held in a global variable and the macro generates a click on the Zoom field and then writes there the new Zoom value, in the case of the example, this being now 125. I have four of these macros: Zoom In Fine (+25%), Zoom Out Fine (-25%), Zoom In Coarse (+100%), Zoom Out Coarse (-100%), and the Init macro I already mentioned.
tia
avraham
>> int handle=child(mouse)
>> If using filter function, it would be f.hwnd2.
OK, very good.
Now, is there a way of getting from handle some sort of unique name that I can use it to identify that particular control. What I am doing right now is that the user has to provide an initialization click (I use a wheel (middle button) click for this) on the control to tell my suite of macros where the control is located during this instance of running the program. Of course, if I then resize the FreeHand application window, I will then have to again provide the initialization click so that I know where to simulate mouse clicks on the editable field and paste text into it.
Btw, it's about time I told you what I am trying to do. FreeHand 9 does not come with a wheel zoom. This is important to me. So your QM offers an excellent tool for 'creating' all the events by rolling the wheel. So, for example, when I wheel forward, I catch this event and add a percentage to the current Zoom factor (e.g., 100 + 25) held in a global variable and the macro generates a click on the Zoom field and then writes there the new Zoom value, in the case of the example, this being now 125. I have four of these macros: Zoom In Fine (+25%), Zoom Out Fine (-25%), Zoom In Coarse (+100%), Zoom Out Coarse (-100%), and the Init macro I already mentioned.
tia
avraham
