Jump to content
Macro Express Forums

Mouse Cursor commands don't work?


Recommended Posts

I'm getting erratic and inconsistent results from the If Mouse Cursor commands. I'm sure I've occasionally successfully used these commands before, perhaps in ME 3, so I suspect it may be either this particular version of ME Pro or some change on my PC. Therefore I would appreciate feedback from others please.

 

I've written a couple of simplified test macros, one for the I-Beam and the other for the V-Split, otherwise identical. Simply place the mouse cursor above the 'test zone', where you know it should encounter one of these types as it moves downward, and start the macro. (I've been doing so from the Script Editor with F9, but of course any method should give same results.)

 

I get:

- Macro stops to report a 'find' when there plainly isn't one, i.e. the cursor is still a normal Arrow

- Macro sails past an I-Beam or V-Split without stopping.

 

Experimenting with longer delays didn't solve the problem.

 

 

// Macro moves mouse cursor down vertically until it changes to an I-beam

// Assumes mouse cursor is not initially an I-Beam and is at chosen start point before running macro.

Repeat Start (Repeat 500 times)

If Mouse Cursor: Beam

Break

End If

Mouse Move: 0, 1 Relative to Last Position

Delay: 1 milliseconds

End Repeat

Get Mouse Position into (%MouseX%, %MouseY%) Relative to Screen

Text Box Display: Result

 

<COMMENT Value="Macro moves mouse cursor down vertically until it changes to an I-beam"/>

<COMMENT Value="Assumes mouse cursor is not initially an I-Beam and is at chosen start point before running macro."/>

<REPEAT START Start="1" Step="1" Count="500" Save="FALSE"/>

<IF MOUSE CURSOR Cursor="2"/>

<BREAK/>

<END IF/>

<MOUSE MOVE Option="\x03" X="0" Y="1" _PROMPT="0x000A"/>

<DELAY Flags="\x02" Time="1"/>

<END REPEAT/>

<GET MOUSE POSITION Option="\x00" X="%MouseX%" Y="%MouseY%"/>

<TEXT BOX DISPLAY Title="Result" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Cursor has changed to V-Split at %MouseX%, %MouseY%\\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>

 

 

And here's the code for the V-Split finder:

 

 

<COMMENT Value="Macro moves mouse cursor down vertically until it changes to a V-Split"/>

<COMMENT Value="Assumes mouse cursor is not initially a V-Split and is at chosen start point before running macro."/>

<REPEAT START Start="1" Step="1" Count="500" Save="FALSE"/>

<IF MOUSE CURSOR Cursor="12"/>

<BREAK/>

<END IF/>

<MOUSE MOVE Option="\x03" X="0" Y="1" _PROMPT="0x000A"/>

<DELAY Flags="\x02" Time="1"/>

<END REPEAT/>

<GET MOUSE POSITION Option="\x00" X="%MouseX%" Y="%MouseY%"/>

<TEXT BOX DISPLAY Title="Result" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Cursor has changed to V-Split at %MouseX%, %MouseY%\\f1 \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>

Edit: Just tried this in ME 3 and it worked correctly. So it's either ME Pro generally or this particular version. Will report back.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I'm getting consistent results, Terry. Utter garbage! In either macro, the mouse will move varying amounts, never landing where it should, and displaying a result that is manifestly false.

 

Good find.

 

Perhaps we shouldn't be so surprised. I still have a Firefox problem where the Mouse Locator utility registers no mouse movement whatever in part of the toolbar area.

Link to comment
Share on other sites

I'm getting consistent results, Terry. Utter garbage! In either macro, the mouse will move varying amounts, never landing where it should, and displaying a result that is manifestly false.

 

Good find.

 

Perhaps we shouldn't be so surprised. I still have a Firefox problem where the Mouse Locator utility registers no mouse movement whatever in part of the toolbar area.

 

Thanks for the confirmation. I got same results in two versions of ME Pro, while ME 3 works correctly.

 

I've reported to ISS, referring them to this thread for details.

 

Leaves me wondering what other obscure and not-so-obscure bugs have yet to emerge. :(

 

And, as it's another 'mouse cursor motion' issue, I suspect it may be linked with that mystery about AWC, last discussed in

http://pgmacros.invisionzone.com/index.php?showtopic=3864

As far as AWC's author Steve Murphy is concerned, that was never satisfactorily resolved; he believed the problem was down to ME Pro, not AWC.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Last 2 weeks I've been working on a macro that uses the Wait For Cursor commands. I submit a form, wait 200mS or so and then wait for the cursor to change to an arrowhead. IE after a short delay it waits for the hour glass to go away. I can not say for sure but it appeared that in many cases it ignored the fact that it was still an hour glass and tried to move ahead. But I was working in an unreliable Java window and one can not say for certain if the cursor monetarily blinked or something. But it sounds like if you do have a reproducible bug that this could be the source of my problem as well. And I know this basic 'wait for' tactic worked in previous versions of MEP.

 

You know I have had good results recording screen videos with the new version of SnagIt which might make an idea I had a reality and that is to log all commands down to the mS and compare to the video of what is happening on the quickly changing screen. Hmmm... If I get a chance later this week I might try that and if I do I will let you know the results.

Link to comment
Share on other sites

I haven't yet found an example where If Mouse Cursor works reliably for any cursor type in MEP (as distinct from ME3 where they all work OK).

 

Easy ones to try (with the macro I provided up-thread) are the various commonplace Size cursors, like Size NS or Size WE. Those appear in many applications. All produce meaningless and inconsistent results with the adapted macro.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

  • 4 months later...
I haven't yet found an example where If Mouse Cursor works reliably for any cursor type in MEP (as distinct from ME3 where they all work OK).

I'm using ME3, trying for the first time to use IF MOUSE CURSOR. My macro moves the mouse across the screen, waiting for the icon to change from an arrow to the pointing hand when it reaches a clickable web address.

When I code IF MOUSE CURSOR NOT ARROW, the change is detected. However, if I code IF MOUSE CURSOR IS POINTING HAND, I never get a hit even though I can see the icon change.

 

Is there some setting in Windows Control Panel that might fix this, or have some of you had trouble with the mouse cursor in ME3 as well as MEP?

 

 

 

Edit: Never mind! I changed it to IF MOUSE CURSOR IS INTERNET NAVIGATE and now it's happy.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...