terrypin Posted July 1, 2016 Report Share Posted July 1, 2016 I'd much appreciate a Windows 10 user trying this please, as it has me stumped. The following simple macro on my new PC runs glacially slowly. Takes nearly 10 seconds. Mouse Move: 10, 600 Relative to Screen // Move to arbitrary position near left of screen Repeat Start (Repeat 500 times) Mouse Move: 1, 0 Relative to Last Position // With the Get Pixel Colour command added, the mouse moves glacially slowly. Get Pixel Color from Beneath the Mouse into %N[1]% Delay: 1 milliseconds End Repeat Without the Get Pixel Color, it's over in a flash as you'd expect. Quite a lot of my macros use this command, so it's potentially serious for me. EDIT: Hmm, I added a file to my post but it didn't show up. Trying again. -- Terry, East Grinstead, UK TestSlowCommand.mex Quote Link to comment Share on other sites More sharing options...
acantor Posted July 1, 2016 Report Share Posted July 1, 2016 Another approach is to check the pixel colour at (x, y) rather than under the mouse pointer: // Check every pixel along a horizontal path from (100, 200) to (400, 200) // Variable Set Integer %x% to 100 Variable Set Integer %y% to 200 Repeat Start (Repeat 300 times) Get Pixel Color at (%x%, %y%) Relative to Current Window into %PixelColour% If Variable %PixelColour% Equals "123456" Text Box Display: Pixel colour found at %x%, %y% Macro Stop Else Variable Modify Integer %x%: Increment End If End Repeat Text Box Display: Pixel colour was not found This method runs faster, although I haven't tried it in Windows 10. While debugging these scripts, I usually include a mouse move command in the loop just to ensure the math is right, and then comment it out or delete it after the macro is working. Quote Link to comment Share on other sites More sharing options...
Cory Posted July 1, 2016 Report Share Posted July 1, 2016 It takes about 9 seconds on my machine. How fast is it on your old machine? Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 1, 2016 Author Report Share Posted July 1, 2016 Cory: If your question was to me ... "Takes nearly 10 seconds." And on my old PC..."it's over in a flash as you'd expect." Say ½ sec. I've sent a possible bug report. -------------------- Alan: Thanks, I agree, that's usually my preferred method too. But it's not so convenient in this particular macro because on detecting the specified colour (a vertical border) the mouse cursor drags it to a required position. I'll try re-writing it though, and report back. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
amonaghan Posted July 1, 2016 Report Share Posted July 1, 2016 I'm getting just under 9 seconds on my Windows 10 Intel i7 machine. Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 2, 2016 Author Report Share Posted July 2, 2016 Prompt response from Insight: "We are seeing the same thing - about 8 - 9 seconds. This also occurs in Windows 7. We think this is a change in the behavior of Windows. We don't have any type of fix for this. Sorry." Disappointing. I wonder if there are other commands that have suffered in Windows 10? I'm only now beginning to edit and test hundred of macros written under XP. Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 2, 2016 Author Report Share Posted July 2, 2016 I'm getting just under 9 seconds on my Windows 10 Intel i7 machine. Same here, with same PC spec. As you see from my last post, looks like we're stuck with it. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
rberq Posted July 2, 2016 Report Share Posted July 2, 2016 Prompt response from Insight: "We are seeing the same thing - about 8 - 9 seconds. This also occurs in Windows 7. We think this is a change in the behavior of Windows. We don't have any type of fix for this. Sorry." I use ME3 with Windows 7. I routinely set Mouse Speed to 30ms in most macros -- seems to work well in most situations. With that setting, the test macro takes 9 or 10 seconds, like others are seeing. With Mouse Speed 0ms, the macro runs for half a second. If I eliminate the "Delay 1 Milliseconds" command inside the loop, execution is almost instantaneous. Including the Get Pixel Color, or removing it, has no noticeable effect on timing. Mouse Speed: 0 Milliseconds Mouse Move Screen 10, 600 Repeat Start (Repeat 500 times) Mouse Move Position 1, 0 Get Pixel: Under Mouse into %N1% Delay 1 Milliseconds (so what is this for, anyhow?) Repeat End Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 2, 2016 Author Report Share Posted July 2, 2016 Interesting feedback. Sounds like Insight are wrong about Win 7 suffering from the same problem as Win 10 then. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 2, 2016 Author Report Share Posted July 2, 2016 I think I have a solution! By running ME Pro in XP (SP3) compatibility mode, the test macro was restored from 9 seconds to its sub-second speed. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
amonaghan Posted July 2, 2016 Report Share Posted July 2, 2016 I just did some quick comparisons in the various compatibility modes and the sluggishness starts from Win7 onward to Win10. I understand that these are compatibility modes and not the full kernel version of the OS, so it may be different in versions prior to Win10. I also agree the line rberq mentions, seems to be redundant here and does slow macro down. Interesting, if not a bit frustrating, as I don't particularly wish to run the product in compatibility mode. Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 2, 2016 Author Report Share Posted July 2, 2016 Yes, I should really have removed that delay from my test macro. (Although it can only alter the duration by about half a second.) I usually include it in macros that look for a cursor change, which fail if the cursor moves too quickly. Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
amonaghan Posted July 2, 2016 Report Share Posted July 2, 2016 Yes, I assumed that that was what the delay was for. I tend to do that to to edge on the side of caution. Ooft! Two double words in the one post. Sorry, Quote Link to comment Share on other sites More sharing options...
Cory Posted July 2, 2016 Report Share Posted July 2, 2016 FTR I tried disabling all the Windows Desktop visual effects and it didn't improve the performance. Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 15, 2016 Author Report Share Posted July 15, 2016 I found that even using Get Pixel Color at instead of Get Pixel Colour Beneath Mouse was also very slow. (This is without resorting to XP comaptibility mode.) -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Cory Posted July 15, 2016 Report Share Posted July 15, 2016 That sucks. I gave up on pixel scanning many years ago so I had no idea it wasn't working properly. I wish I could have warned you. Quote Link to comment Share on other sites More sharing options...
rberq Posted July 15, 2016 Report Share Posted July 15, 2016 I set up a similar pixel color scan for my wife's older Windows Vista machine, and the scan was painfully slow because the machine itself is a lot slower. But I found that incrementing mouse position 6 pixels each time though the loop, instead of 1, was adequate to find the button I was scanning for, and SURPRISE made the search 6 times faster. Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 16, 2016 Author Report Share Posted July 16, 2016 Trouble is that I use pixel hunting mostly to find edges. Panes, windows, etc, so that I can then drag it. And the colour I'm seeking is often only 1 or 2 px, wide. So that limits the increment accordingly. Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 16, 2016 Author Report Share Posted July 16, 2016 I asked in the AutoHotkey forum whether AHK scripts were also slower and the answer appears to be Yes. I was pointed to this explanation:"PixelGetColor, PixelSearch and ImageSearch are all slower when desktop composition is enabled. Desktop composition can be disabled on Windows 7 (i.e. by using the classic theme instead of Aero). It cannot be disabled on Windows 10." -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
rberq Posted July 16, 2016 Report Share Posted July 16, 2016 "PixelGetColor, PixelSearch and ImageSearch are all slower when desktop composition is enabled. Desktop composition can be disabled on Windows 7 (i.e. by using the classic theme instead of Aero). It cannot be disabled on Windows 10." Quote Link to comment Share on other sites More sharing options...
amonaghan Posted July 16, 2016 Report Share Posted July 16, 2016 It appears to be true, unfortunately https://msdn.microsoft.com/en-us/library/windows/desktop/hh848042.aspx. Quote Link to comment Share on other sites More sharing options...
acantor Posted July 18, 2016 Report Share Posted July 18, 2016 That's bad news. I chose the Classic theme in XP, Vista, and Win 7. I find Aero themes harder to read because of suboptimal colour contrasts. And animated effects bore me; the novelty wears off quickly. Microsoft software products are looking more and more cartoonish! Quote Link to comment Share on other sites More sharing options...
Cory Posted July 18, 2016 Report Share Posted July 18, 2016 I agree. I don't mind having a pretty look for those who are into it. But there are very few things that make Windows easier to use or more efficient. And certainly it only slows down performance and in rare cases causes functional problems, especially with legacy apps. My desktop is like a work truck. I don't need to to be blingy, I need it to function. But it seems MS decided to make 22" polished alloy rims standard equipment and there's no option for the plain, cheap, and effect steel wheels anymore. Quote Link to comment Share on other sites More sharing options...
rberq Posted July 18, 2016 Report Share Posted July 18, 2016 I agree. I don't mind having a pretty look for those who are into it. But there are very few things that make Windows easier to use or more efficient. And certainly it only slows down performance and in rare cases causes functional problems, especially with legacy apps. My desktop is like a work truck. I don't need to to be blingy, I need it to function. But it seems MS decided to make 22" polished alloy rims standard equipment and there's no option for the plain, cheap, and effect steel wheels anymore. +1 MS saw all those books called Windows for Dummies, and decided to make it dumber. Hiding the file extensions, automatically routing files into "standard" folders like Music, Pictures, Videos, Downloads, and worst of all "Documents" in all their variations, replacing Control Panel icons with vague lists ... Did they really think people were too stupid to organize files into folders, all by themselves? So as Windows has become more reliable it has become more opaque and clumsy to control -- like replacing your sports car's rack-and-pinion steering with some heavy-duty rubber bands hooked to the tie rods. No Macro Express for Linux??? Rats! Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 18, 2016 Author Report Share Posted July 18, 2016 I'm particularly disappointed in the unreadability of the title text in Windows 10, for inactive windows. I'm still looking for some way to change the colour. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.