Excel VBA move cursor position

April 1, 2013 at 06:46:18
Specs: Windows XP
I wanted to create a macro that would give orders to the cursor to click and do some commands.
For example... in my office everyone uses 19" screens with resolution 1280 x 1024.
I want to give orders like "position cursor at x' 120 y' 200 and click"
First of all I want to know if it is even posible...
And secondly I want to know if anyone knows a good tutorial. Thanks in advance

See More: Excel VBA move cursor position

Report •

#1
April 1, 2013 at 07:28:22
What problem are you attempting to solve?

How To Ask Questions The Smart Way


Report •

#2
April 1, 2013 at 07:41:27
So far Ive been using a screen scrape to pull information from a program called Attachment extra. Its very simple cause all the date has a grid and for example I would pull info as "ClosingDate = myscreen.getstring(13, 48, 8)"
Meaning Row 13, Column 48, 8 characters from that position.
But I need to pull info from another program that does not follow the same rules... meaning there isnt a grid.
I just need to know if it is even posible to move the cursor with the "screen resolution" directions. Thanks

Report •

#3
April 1, 2013 at 08:54:05
First of all, merging terminal emulation with a word processor? Does this company also offer a combination floor wax and desert topping?

With that out of the way, when I read your question, I can't shake a Raymond Chen quote: "[You] 'solved' half of the problem and only need your help with the other half—the half that doesn't make any sense." I wish I could say that was the case, but can't even say that much because you're being so secretive. What's so special about the coordinates (120, 200) (roughly the top left corner)? Would this workflow break if Word wasn't maximized? Or if a pop-up, well, pops? Or if someone rearranged their menu bar? Or if Alt (or Ctrl) is stuck down? Is this other program accessed though another terminal?

How To Ask Questions The Smart Way


Report •

Related Solutions

#4
April 1, 2013 at 09:18:40
My english is not great.... but I think you are making fun of my question... not cool.
Everyone uses a virtual desk, connected to a server. Basically ALL computers are the same. Same programs, same shortcuts, same alignment.
So whatever works for me, should work for them.
120, 200 was just an example... the process would require a lot of if conditions and switching between programs... but before I even start thinking about it... I want to know if it is even posible to give instructions where to place the cursor giving it screen positions, clicking, veryfying and things like that. I just cant find anything like that online. Thanks

Report •

#5
April 2, 2013 at 05:13:44
The title of a blog post I linked to was titled, "Before you develop a solution, make sure you really understand the problem." That's what I'm doing; I'm trying to understand the problem. By understanding the workflow involved, I can give you a helpful answer, because answering your question in a vacuum does you a disservice.

To answer your question (in a vacuum), it's a lot like driving on the wrong side of the road. There's nothing physically stopping you from doing it, and it might get you to where you're going, but you should probably pick a different route.

How To Ask Questions The Smart Way


Report •

Ask Question