Menu

Mouse Wheel

Coly Moore
2017-02-18
2017-02-23
  • Coly Moore

    Coly Moore - 2017-02-18

    Hi Thomas,

    As in my https://sourceforge.net/p/mousecontroller/discussion/general/thread/6143cfe1/#14ab I'm editing my mcd file to do operation in a Facebook game (Diggy's Adventure).

    There is a frame which shows 11 lines on my laptop. These lines toggle "Add to Custom List". Every so often it is desirable to clear the list. With a few thousand entries on the list, manually clearing by toggling each line one by one is tedious. With my .MCD file I can at least do it 11 lines at a time.

    However when doing it manually I click a line, then rotate mouse wheel down to get to the next. The screen position doesn't change but the list moves.

    Mouse Recorder 1.8.1.1 sends the wheel event but it doesn't work right. List doesn't move. I'm guessing this is because it doesn't have wParam. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms645617(v=vs.85).aspx Apparently the param should be a multiple of WHEEL_DELTA.

    I would need to fiddle with the param to match the pixel distance of one rotate on my monitor. But I don't even know how to put the param in.

     

    Last edit: Coly Moore 2017-02-18
  • Coly Moore

    Coly Moore - 2017-02-18

    Here is a script

     

    Last edit: Coly Moore 2017-02-18
  • Coly Moore

    Coly Moore - 2017-02-18

    Oh well. Turns out this wouldn't do me any good as the real life wheel doesn't bring up the item below the bottom of the frame. I'll have to synthesize it by clicking the frame's scrollbar and moving it down.
    So I don't need anything more. Thank you again for all your help, really appreciated.

     
  • Thomas Gutzler

    Thomas Gutzler - 2017-02-18

    Hi,

    The mouse wheel isn't logged in 1.8.1.1, so it won't work. Unfortunately, I'm on laptop only at the moment and I don't have a mouse with me so I can't try it out. So you'll have to work with me on this one. I've added support for catching, logging and replaying the mousewheel but it's untested. Would you try the attached executable with a wheel scroll and send me the mcd file?

     
  • Coly Moore

    Coly Moore - 2017-02-18

    Wheeled down on this Chrome page, playback did nothing I'm afraid.

    (Edit: Incidentally for my purpose logging doesn't matter as I only want to play back a doctored script. Ymmv)

     

    Last edit: Coly Moore 2017-02-18
  • Coly Moore

    Coly Moore - 2017-02-19

    Sort of related: Windows scrollbar. I selected this Chrome window scrollbar and moved down with left button down. Playback is wierd! When I select scrollbar and play back it strangely jumps in and out of full screen (Why???)

    Edit: Sorry. F11 is full screen hotkey. :(

     

    Last edit: Coly Moore 2017-02-19
  • Thomas Gutzler

    Thomas Gutzler - 2017-02-19

    Hmm, all the deltas are 0.
    Can you try the attached?

     
  • Coly Moore

    Coly Moore - 2017-02-19

    No, that does nothing. However my own scrollbar.mcd, attached in my last post above, works fine for scrollbar now that I changed playback to F8.

    P.S. Latest download of MouseController_1.8.1.1.exe installs 1.8.1.0 with reminder update available. There is no way to get 1.8.1.1

     

    Last edit: Coly Moore 2017-02-19
    • Thomas Gutzler

      Thomas Gutzler - 2017-02-19

      Are you sure you're running the right executable?
      When you install 1.8.1.1 it goes into C:\Program Files (x86)...
      You have to manually delete the previous version and then use the start menu shortcut

       
  • Thomas Gutzler

    Thomas Gutzler - 2017-02-19

    What about the .exe I attached 5 posts up?
    All the mouse wheel stuff won't work in 1.8.1.1. I want to get that working before I release a new version.

     
  • Coly Moore

    Coly Moore - 2017-02-19

    OK, that gives me 1.8.1.1. Good. Works well for my new script for toggling those items.

    Now testing wheel:
    Nope. Playback just does mouse moves, no scroll. I still think WM_MOUSEWHEEL needs a parameter. I believe it would come before pos, or thereabouts.

    <MouseEvents>
    <Delta>0</Delta>
    <MouseMsg>WM_MOUSEWHEEL</MouseMsg>
    <Tag></Tag>
    <pos xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Drawing">
    <d3p1:x>435</d3p1:x>
    <d3p1:y>219</d3p1:y>
    </pos>
    <tOffset>423421</tOffset>
    </MouseEvents>

    Script attached.

     
    • Thomas Gutzler

      Thomas Gutzler - 2017-02-19

      The new parameter for the mouse wheel is <Delta>. It's in the right position in the script but all delta values are zero because something is going wrong when the event is captured.
      However, if you edit the file and replace the 0 with multiples of 120 (120, 240, ...) it should scroll.
      Positive for down, negative for up.

       
  • Coly Moore

    Coly Moore - 2017-02-19

    This doesn't play back well. (I have deleted a lot of trailing MOUSE_MOVEs that were recorded after the MOUSE_WHEELs were done and before I could end recording.). This is a very confusing business. I've been using Facebook page in Chrome to wheel down on. Might be a bad choice.

    It seems as though perhaps the <pos> in each wheel command are screwing up the scroll effect?

     
    • Thomas Gutzler

      Thomas Gutzler - 2017-02-22

      Sorry, took me a while to respond, I had real work to do.
      Your badwheel.mcd is missing the Delta tags for the scrolling.
      I put them in, adjusted the toffset to slow it down and it works fine on this page. It scrolls down 3 time and then up 3 times.
      I'm attaching the modified mcd file and the executable again for you to try.

       
  • Coly Moore

    Coly Moore - 2017-02-23

    As it happens, a storm knocked out the electricity and I've been limited to my cell phone since Tuesday. Now that I have my pc again, back to the wheel.

     

    Last edit: Coly Moore 2017-02-23
  • Coly Moore

    Coly Moore - 2017-02-23

    I guess that is the wrong .exe? As neither your new badwheelTG.mcd nor a new recording does anything at all in my Chrome.

     
  • Coly Moore

    Coly Moore - 2017-02-23

    OK, got your .exe.loaded. Your badwheelTG.mcd works perfectly. However a new recording plays back mouse moves but no scrolling. File attached. Deltas are 0. Shouldn't the .exe put in non-zero numbers?

     

    Last edit: Coly Moore 2017-02-23
    • Thomas Gutzler

      Thomas Gutzler - 2017-02-23

      You got it working, great!
      I haven't had the time to fix recording. Like I said, I don't have a mouse with scroll wheel, that makes debugging difficult. I see if I can find one somewhere. Once that's fixed I'll make a new release.
      Thanks for the testing

       
  • Coly Moore

    Coly Moore - 2017-02-24

    Testing is least I could do in partial exchange for all your help. Please let me know if anything else I can test.

     

    Last edit: Coly Moore 2017-02-25
  • Thomas Gutzler

    Thomas Gutzler - 2017-04-17

    Coly,
    I found some time and a scroll mouse, so I was able to fix the remaining bug that left the Delta values at 0. Updating to version 1.9.0.0 should give you fully functioning recording/playback of scroll events. At least, it works for me.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.