| View previous topic :: View next topic |
| Author |
Message |
jleslie Newbie
Joined: 24 Jun 2010 Posts: 5
|
Posted: Thu Jun 24, 2010 11:03 pm Post subject: any way to "record" a script. |
|
|
kinda like the excel record a macro,
start recording, and VDS records the click, typing, (mouse movements/final grid locations?), etc, and then you can edit the script afterwards?
I have to automate the selections of a vb program that runs as an add-in for excel. its heavily mouse dependent; radio buttons need to be checked, check boxes,
without a record facility how would I go about teaching VDS the change of focus (mouse movements???) to the various "clickable" fields of the program?
It's been a while since I programmed in VDS. I go back to VDS2.2...
TIA,
Jleslie48 |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri Jun 25, 2010 6:04 am Post subject: |
|
|
I'm more than sure that VDS is capable of doing what you need, but it's been quite some time since I've last used VDS myself.
But, VDS is capable of tracking what window is active, when there's a click, enumerate the objects of the active window, get the positions of the objects on that window, coordinates of the click etc.
You'll likely have to run through the help file for these features. Once you have what you need, save the events to an internal list or a text file for when you build a playback routine.
~Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
jleslie Newbie
Joined: 24 Jun 2010 Posts: 5
|
Posted: Fri Jun 25, 2010 4:00 pm Post subject: |
|
|
I remember there being some tool that would report the current mouse position, or something in the VDS toolset, I also had a file VDSEXT10.ZIP, that I can't seem to locate.
how does one go about scripting up mouse movements? |
|
| Back to top |
|
 |
cnodnarb Professional Member


Joined: 11 Sep 2002 Posts: 766 Location: Eastman, GA
|
Posted: Sun Jul 04, 2010 8:47 pm Post subject: |
|
|
Well, you can't record mouse clicks in VDS to my knowledge.
You just have to "fiddle".
If I were you I would stick to using window commands as much as possible rather than mouse clicks.
Window activate
Window send
etc.
Just my two cents. |
|
| Back to top |
|
 |
jleslie Newbie
Joined: 24 Jun 2010 Posts: 5
|
Posted: Tue Jul 06, 2010 11:40 am Post subject: |
|
|
| cnodnarb wrote: | Well, you can't record mouse clicks in VDS to my knowledge.
You just have to "fiddle".
If I were you I would stick to using window commands as much as possible rather than mouse clicks.
Window activate
Window send
etc.
Just my two cents. |
Yes I agree, alas I have a very poorly written VBA executable that I need to automate, and I don't have any keystroke equivalents for many of the required setup checkboxes, radio buttons, etc. |
|
| Back to top |
|
 |
jrmarquart Valued Newbie
Joined: 12 Jun 2004 Posts: 28 Location: Boise, ID
|
Posted: Wed Jul 07, 2010 10:28 pm Post subject: |
|
|
You can record mouse clicks, but not natively within the VDS language. You will probably need to use the user32 library 'mouse_event'. I wrote a program using VDS a while back that does something similar to this called g-hotkey (it's written 100% in VDS) using the 'mouse_event' library - www.g-hotkey.com. Keep in mind when dealing with mouse clicks you need to worry about screen resolution settings as well. You may be better off automating an application through keystrokes instead.
Perform a search for 'mouse_event' on this forum, some of the examples may be enough to get you started writing a solution.
You might want to take a look at the G-Hotkey application and see if it does what you need. If you need a more customized solution I can help (just PM me), but it will not be for free (G-Hotkey is not open source) as it sounds like what you are asking for goes quite a bit beyond a simple message forum question and answer.  |
|
| Back to top |
|
 |
|