I was hoping you could provide some detail on the scripting for the save files?
I have made a bunch of small test files to work on, but very quickly run into problems trying to join the features in them that I'm not able to debug yet. I'm trying to figure out the problem by the detail in the error window, but no luck yet.
I've attached the file if you have a moment to look over it, but understand if you can't as I know you have other things to do with your time and I'll keep at it anyway. Error window says...
Error in line 1 position 226. 'EndElement' 'pos' from namespace 'http://schemas.datacontract.org/2004/07/MouseController' is not expected. Expecting element 'x'.
Would also love the ability to introduce a random delay instead of a fixed delay in the <tOffset></tOffset> tag.
And as far as big feature suggestions go, I'd love to have the mouse react to an image on the screen, rather than just a fixed location, as some error boxes with more text than others shift their "Yes","No","Cancel" buttons. I'd be very willing to discuss my ideas with you if this is something you'd also like to pursue.
To answer your first question, the script you attached doesn't load because the 'pos' tag in line 419/420 is missing 'x' and 'y'.
As for the random delay in the <toffset> tag, that's not a feature I'm going to add. Can't see the use for it and it would make playback very unpredictable.
If you want software that reacts to dialog boxes, have a look at http://www.autoitscript.com/site/autoit/
I'm not going to add complicated image processing for tracking dialog boxes to mousecontroller. Sorry
Last edit: Thomas Gutzler 2013-11-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Thomas, are you still around? I love the controller but yearn to do minor editing of the script. What language is that? XML I think - (Notepad++ formats it)? Is there documentation? The attached prettygood.mcd works pretty well -
left click,
down,
left click,
down,
for 11 clicks.
However I have a shaky hand with a mouse, and would like to clean up the script if I understood which lines are involved. Can I remove most of the WM_MOUSEMOVE?
It looks to me as though if I made all these <a:x>792</a:x> the same number then the mouse would move straight down instead of wobbling. Am I on the right track? Any way to make position relative instead of absolute?
Yes, the files are plain XML. I also use notepadd++ to edit them. I have to admit though, sometimes it would be easier if there were line breaks after each event :)
There is no documentation on the format but it's pretty straight forward:
You need a WM_NONE at the beginning and end.
WM_MOUSEMOVE are optional as they only move the mouse cursor - it's purely visual.
WM_LBUTTONDOWN and WM_RBUTTONDOWN are left and right mouse button. They actually do a move as well before they perform the click on the given coordinates.
The whole thing is wrapped in a <Mouseevents> tag. Each tag performs one action at given screen coordinates a:x and a:y. There is a <Tag> tag which you can put a string into. It will be shown next to the cursor if enabled in the software. The last tag is <toffset> which gives you the delay to the previous action in us.
So, you can remove all Mouseevents that perform a WM_MOUSEMOVE if you don't mind you cursor jumping around. Just be aware that you'll be losing the accumulated delays of all events, so you might have to adjust the toffset tag of the buttondown action for time critical operations.
Setting all a:x to the same number will make the mouse only move up and down.
There is no way to use relative motion. Having absolute coordinates ensures that we always end up in the right spot even if we miss a command. This makes editing easier!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you very much!
Purpose is to click on the lines in a window within a Javascript game. There are 11 lines to click. Then I have to manually go down to the next 11.
My y coords are all over the place but trial and error and averaging suggests they should increment by 21.
My remaining puzzle is about the <tOffset>232044</tOffset> things. The numbers seem to be large random numbers? Is a non-zero value required? Could I set them all to 1000? or 0?
Edit: I guess from your splendidly full explanation that this must be the delay for the mouse I/O time. So I should set it to the lowest in the BUTTON commands which looks to be about 22000? I'll experiment - done for the day now. Thanks again!
I don't recommend setting the toffset to small numbers. Like I said, the offset is in microseconds - in hindsight, that unit was probably a bit optimistic but it's done now. Setting it to 1000 would mean 1000 mouse clicks per second. That's quite superhuman :)
Depending on the webpage and the function of the button you might want to wait for more than 35ms before clicking the next button. I guess you'll find out if it doesn't do what you want.
PS: I hope you find the new file format easier on the eyes
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Very useful program, thank you.
A suggestion for a future version:
for example:
mousecontroller.exe test.mcd /exit
Other options might also be of interest, for instance - "/repeat X" - repeat the mcs X times
This functionality would permit calls from external programs, batch execution, etc., adding to the overall usefulness of the utility.
Thanks again for the program and for considering this addition.
Thanks for your suggestions.
I agree, command line options are a useful addition to the software. I have implemented a number of options, which you may find useful. Please refer to the release notes for further details: https://sourceforge.net/p/mousecontroller/discussion/general/thread/4a2dedfc/#3318
Hi, Extremely handy program, great work.
I was hoping you could provide some detail on the scripting for the save files?
I have made a bunch of small test files to work on, but very quickly run into problems trying to join the features in them that I'm not able to debug yet. I'm trying to figure out the problem by the detail in the error window, but no luck yet.
I've attached the file if you have a moment to look over it, but understand if you can't as I know you have other things to do with your time and I'll keep at it anyway. Error window says...
Error in line 1 position 226. 'EndElement' 'pos' from namespace 'http://schemas.datacontract.org/2004/07/MouseController' is not expected. Expecting element 'x'.
Would also love the ability to introduce a random delay instead of a fixed delay in the <tOffset></tOffset> tag.
And as far as big feature suggestions go, I'd love to have the mouse react to an image on the screen, rather than just a fixed location, as some error boxes with more text than others shift their "Yes","No","Cancel" buttons. I'd be very willing to discuss my ideas with you if this is something you'd also like to pursue.
Hi,
To answer your first question, the script you attached doesn't load because the 'pos' tag in line 419/420 is missing 'x' and 'y'.
As for the random delay in the <toffset> tag, that's not a feature I'm going to add. Can't see the use for it and it would make playback very unpredictable.
If you want software that reacts to dialog boxes, have a look at http://www.autoitscript.com/site/autoit/
I'm not going to add complicated image processing for tracking dialog boxes to mousecontroller. Sorry
Last edit: Thomas Gutzler 2013-11-21
Hi Thomas, are you still around? I love the controller but yearn to do minor editing of the script. What language is that? XML I think - (Notepad++ formats it)? Is there documentation? The attached prettygood.mcd works pretty well -
left click,
down,
left click,
down,
for 11 clicks.
However I have a shaky hand with a mouse, and would like to clean up the script if I understood which lines are involved. Can I remove most of the WM_MOUSEMOVE?
It looks to me as though if I made all these <a:x>792</a:x> the same number then the mouse would move straight down instead of wobbling. Am I on the right track? Any way to make position relative instead of absolute?
Thanks for any and all help!
Last edit: Coly Moore 2017-02-18
Hi,
Yes, the files are plain XML. I also use notepadd++ to edit them. I have to admit though, sometimes it would be easier if there were line breaks after each event :)
There is no documentation on the format but it's pretty straight forward:
You need a WM_NONE at the beginning and end.
WM_MOUSEMOVE are optional as they only move the mouse cursor - it's purely visual.
WM_LBUTTONDOWN and WM_RBUTTONDOWN are left and right mouse button. They actually do a move as well before they perform the click on the given coordinates.
The whole thing is wrapped in a <Mouseevents> tag. Each tag performs one action at given screen coordinates a:x and a:y. There is a <Tag> tag which you can put a string into. It will be shown next to the cursor if enabled in the software. The last tag is <toffset> which gives you the delay to the previous action in us.
So, you can remove all Mouseevents that perform a WM_MOUSEMOVE if you don't mind you cursor jumping around. Just be aware that you'll be losing the accumulated delays of all events, so you might have to adjust the toffset tag of the buttondown action for time critical operations.
Setting all a:x to the same number will make the mouse only move up and down.
There is no way to use relative motion. Having absolute coordinates ensures that we always end up in the right spot even if we miss a command. This makes editing easier!
Thank you very much!
Purpose is to click on the lines in a window within a Javascript game. There are 11 lines to click. Then I have to manually go down to the next 11.
My y coords are all over the place but trial and error and averaging suggests they should increment by 21.
My remaining puzzle is about the <tOffset>232044</tOffset> things. The numbers seem to be large random numbers? Is a non-zero value required? Could I set them all to 1000? or 0?
Edit: I guess from your splendidly full explanation that this must be the delay for the mouse I/O time. So I should set it to the lowest in the BUTTON commands which looks to be about 22000? I'll experiment - done for the day now. Thanks again!
Latest version attached.
Last edit: Coly Moore 2017-02-18
I don't recommend setting the toffset to small numbers. Like I said, the offset is in microseconds - in hindsight, that unit was probably a bit optimistic but it's done now. Setting it to 1000 would mean 1000 mouse clicks per second. That's quite superhuman :)
Depending on the webpage and the function of the button you might want to wait for more than 35ms before clicking the next button. I guess you'll find out if it doesn't do what you want.
PS: I hope you find the new file format easier on the eyes
Please see my edit in my last post above - I put it in too late.
I think I've hijacked this thread and am starting a new one.for question about wheel.
New format is great and I love that you have mentioned me. :)