TsunamiZ Posted June 19, 2009 Report Posted June 19, 2009 Anyone know how to make a macro abort if mouse moves X amount of pixels? What do I need? Thanks. Quote
stevecasper Posted June 19, 2009 Report Posted June 19, 2009 Anyone know how to make a macro abort if mouse moves X amount of pixels? What do I need? Thanks. Well... my first thought was "It can't be done." Since there are no options for aborting if mouse moves. However, if you're not looking for a specific built-in abort, you could build a somewhat complex macro that occasionally checks the mouse position. Something like this. At the beginning of the macro perform a Get Mouse Location command. Store this info in, say, %N98% and %N99%. Then, periodically, perform another Get Mouse Location command, storing the information in %N96% and %N97%. Now compare N98 to N96. I'd use something like: If N98 > N96 __Modify Integer N98 - N96 = N94 Else __Modify Integer N96 - N98 = N94 End If Do the same for N99 and N97 (saving the result to N95) Now do this (assuming 10 pixels is the threshold for the abort): If N94 > 10 __Or If N95 > 10 __Macro Stop End If Quote
paul Posted June 20, 2009 Report Posted June 20, 2009 I've done something a little similar to this in my Startup macro. If I hover my mouse over the clock in the system tray, my startup macro will stop immediately. This is useful on those occasions when I'm doing an interim boot, meaning I know I'm going to have to do another one soon. Quote
terrypin Posted June 23, 2009 Report Posted June 23, 2009 <br />I've done something a little similar to this in my Startup macro. If I hover my mouse over the clock in the system tray, my startup macro will stop immediately. This is useful on those occasions when I'm doing an interim boot, meaning I know I'm going to have to do another one soon.<br /><br /><br /><br /> With apologies for straying OT, I'm curious to know what sort of things you (and others) do in your start-up macro please? -- Terry, East Grinstead, UK Quote
paul Posted June 23, 2009 Report Posted June 23, 2009 I put programs in my startup macro that would normally be started from one of the registry areas used for that purpose, e.g. HKCU\...\Windows\Run and HKLM\...\Windows\Run. I do this because they're easier to access in a macro, and easy to prevent tunning if I want (using my hover technique). In my particular case, that's various mouse utilities, a dialogue resizer utility, a drive substitution, Executor, ClipMate, UltraEdit and Firefox (the latter two remaining permanently in memory even when I click their Close buttons). Quote
stevecasper Posted June 23, 2009 Report Posted June 23, 2009 <br /><br /><br /> With apologies for straying OT, I'm curious to know what sort of things you (and others) do in your start-up macro please? -- Terry, East Grinstead, UK I have about 10 different apps, utilites, inter- and intranet sites that all need to be opened and logged into; windows that need to be resized and repositioned, etc. So I have a "Start" short-key that starts the monotonous process. While it's running I can eat my breakfast, go through hard-copy files, run to the restroom, get a drink, whatever I need to do. Quote
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.