Forums list
New topics
Topics list
Search
Help
Login
Register

Messages 1 - 10 of 11
First | Prev. | 1 2 | Next | Last 

Topic: «Keyboard Macro » on forum: Beta Testing   Views: 23283
 
Greg Webb
Advanced user
 
Posts: 133
Joined: 06/05/2007
Posted: 12/02/2007 17:27:42
 
 
I'm very keen to explore 'Run Keyboard Macro'. The first application I have in mind requires a mouse click at a specific coordinate relative to the window. I've looked but can't locate such a feature. I'm wondering if there is one and I haven't found it?
 
Top
Alexey Fadeyev
Administrator

Moderator
 
Posts: 1427
Joined: 09/30/2005
Posted: 12/03/2007 11:24:04
 
 
I suppose you know our program quite well so it's true - there's no such to emulate mouse clicks. I think it's not very hard to implement, we just didn't receive enough requests for this feature.

Also I'd like to say that in most cases mouse click can be emulated by a certain sequence of keystrokes (for example, Tab-Tab-Tab-Space-Enter). Maybe, your case also have a pattern like this. Or does it nevertheless require the pure mouse action? If you describe your task in details I think we could tell more exactly will AWM help you right now or not.
 
Top
Greg Webb
Advanced user
 
Posts: 133
Joined: 06/05/2007
Posted: 12/05/2007 05:38:09
 
 
Alexey,

I'm familiar with the use of keystrokes to emulate mouse strokes but my first application for Run Keyboard Macro requires a step that I haven't been able to emulate so far.

I run TaskManager (TaskMgr.exe) at startup with the Processes tab showing (see attached). This enables me to see what's happening during the long arduous startup process. When TaskManager starts I want to click twice on the CPU column header. This sorts the list of processes in descending order of processor use, which lets me see what is taking the most CPU at any one time.

So far I haven't found a keystroke that gets me to the CPU 'button'. It would be great if you could unearth a trick to do this.

I thought of using the Accessibility mouse keys but the problem is that you don't know where the mouse is.

 
Top
Alexey Fadeyev
Administrator

Moderator
 
Posts: 1427
Joined: 09/30/2005
Posted: 12/09/2007 04:27:47
 
 
Greg,

I have to confess that there's no "emulate mouse with keyboard" solution for the case you specified. I suppose we will consider the possibility to extend the Run Macro feature with the ability to emulate mouse clicks as well so it could be used in situations as you described.
 
Top
Greg Webb
Advanced user
 
Posts: 133
Joined: 06/05/2007
Posted: 12/09/2007 05:54:16
 
 
Thanks for the info. I think a mouse click function would be useful for Macro Keys in Window Manager.

I encountered the TaskManager application because I was looking for a real example to test Macro keys. Now that I've found it I look forward to the solution.
 
Top
Jeffrey R. Broido
Registered user

Bona fide, old fart, retro hippie.
 
Posts: 44
Joined: 12/12/2007
Posted: 12/14/2007 16:05:17
 
 

Alexey,

Let me second the motion.  The first attempt I made to test the macro function was to accept an ICQ peer-to-peer chat.  I was able to <Tab> to the "Accept" button, but <Enter> didn't work in this case (nor does a genuine Enter keyboard keypress).  In other words, without a mouse, the particular dialog cannot be used.  This, of course, is a problem with ICQ but I can think of a number of other examples which would require clicking somewhere other than the default button.

Regards,
Jeff Broido
Vista Ultimate, 64-bit, Retail build
Quad Intel Xeon CPU


______________________________________
NO STATEMENTS FLAGGED IN THIS ASSEMBLY
 
Top
Alexey Fadeyev
Administrator

Moderator
 
Posts: 1427
Joined: 09/30/2005
Posted: 12/14/2007 23:54:12
 
 
Jeffrey,

Thank you for your feedback, and nice to see you here! :)

As for the ICQ issue, I'd like to suggest using the <Space> keystroke instead of <Enter> - general dialog buttons reply to this keystroke as well.

As for the mouse clicks emulating, I've encountered a problem on the second thought. Let's imagine there exists such an ability in AWM. But how would you like to specify where the emulated click should occur? It's easy to say in human language "I want to click on the CPU column header" but how to instruct AWM where this column header is? :) Please consider possibilities of different desktop resolutions, various Windows Appearance settings and non-standard display DPIs...

Please understand me right: I don't want you to make my job. :) I just want to know your opinion (as a quite experienced PC and AWM user) on how this could be specified in most clear, intuitive and easy way.

Thank you!
 
Top
Greg Webb
Advanced user
 
Posts: 133
Joined: 06/05/2007
Posted: 12/15/2007 01:13:00
 
 
Alexy,

Quote
Please consider possibilities of different desktop resolutions, various Windows Appearance settings and non-standard display DPIs...

This is what I would do:
1.  Work in pixels because, I believe, pixels are related to monitor physical characteristics.

Create a function called 'MouseClick'. MouseClick has four parameters:

1. Origin (in mathematical sense). Select origin from a corner of current window - top-left, top-right, bottom-left, bottom right. Top-left and bottom-right are the most important. If we can only have one, then top-left.
2. X (horizontal) coordinate in pixels. Plus for right, minus for left.
3. Y (vertical) coordinate in pixels. Plus for DOWN, minus for up. This is contrary to mathematical view but is common among programs that work with screen coordinates.
4. Number of clicks. Single or Double.

Extensions of this would click and drag to a second coordinate BUT I DON'T think you have to go there for the WM Macro Key application.

How does the user know the coordinate of a position within a window? A quick implementation would be to let the user use another utility to measure the coordinate of the desire position. One doesn't spring to mind but I could take a look. Obviously this would be an interim solution.

More advanced methods would include a feature in WM like the 'show window' called 'show coordinate'. Click on the desired position of a window and the coordinates are shown, and or copied to the clipboard, and or recorded somewhere on the WM window.

Over to you.
 
Top
Alexey Fadeyev
Administrator

Moderator
 
Posts: 1427
Joined: 09/30/2005
Posted: 12/17/2007 02:49:47
 
 
Greg,

Thank you very much for such a detailed response. Anyway, I still see there the problems I mentioned in my previous post. Specifying X,Y coordinates in pixels means absolute values which may lead to incorrect results if user changes window's font size or display DPI: in such case the target visual element very likely will be displaced from its original position within the window, and provided coordinate values will point to a wrong place.

Unfortunately, currently I see no reasonable solution for this problem...
 
Top
Greg Webb
Advanced user
 
Posts: 133
Joined: 06/05/2007
Posted: 12/17/2007 06:33:39
 
 
Alexey wrote:

Quote
Specifying X,Y coordinates in pixels means absolute values which may lead to incorrect results if user changes window's font size or display DPI

This is not my area of expertise but this is how I see it.

DPI. My main monitor is 1440x900. Normally I have the pixel size set the same - 1440x900. That means there is a one 'display pixel' for each 'internal representation of a pixel'. If I change the screen resolution to 800x600 then the displayed information is larger and less fits on the screen. In fact each internal representation of a pixel is now shown on 1440/800 by 900/600 display pixels, roughly 2x2 pixels (1.8 and 1.5 rounded). There's probably other factors that come into play from the system changing windows sizes to the max that can occur at the new screen resolution and pixel rendering by display components.

Font size. Changing the font size only affects font size according to the control panel. I need to reboot to see the effects of changed font size so I'll leave this aside for the moment.

How could a WM mouse click function handle this?

1. Changing the display resolution not only changes the number of display pixels used to display an internal representation of a pixel. In my experiment I note that it has permanently changed some window sizes (to match the maximum displayable at the new resolution), all my desktop icons have been rearranged. The message here is that if you change the resolution you are going to have a number of things not be the same and therefore possibly no longer work. Hence one could argue that a mouse click defined for Macro Keys is only valid for the screen resolution it was first 'recorded' or first specified for.

2. A similar argument could be made for changing font size. A Macro Keys mouse click is only defined for the  font size it was 'recorded' at.

3. There is a precedent for limited functionality. Command Prompt Windows Support does not support all WM features.

4. Recording resolution and font size at time of defining the mouse click. These details could be displayed on the Startup page to show what the mouse click is valid for.

5. Knowing the relationship between internal representation of a pixel and display resolution enables an approximate location to be calculated.

In Summary,

The mouse click function could record the relationship between internal representation of a pixel and display resolution and use this to approximate locations at non-standard display resolution. The mouse click function could be defined for standard display resolutions and font-size but not guaranteed outside these limitations.

This is my best effort given that I don't really know what information is available to the programmer.

If I knew more, lots more, I might have tried to describe a system that used an internal virtual representation of the display space and used conversions from virtual locations to real locations based on differences in the internal representation of a pixel and the display resolution.

==Greg
 
Top

Messages 1 - 10 of 11
First | Prev. | 1 2 | Next | Last 

User(s) reading this topic
Number of guests: 1, registered members: 0, in total hidden: 0


Forums list
New topics
Topics list
Search
Help
Login
Register