Welcome Guest.   Make a donation to an author on the site October 21, 2014, 08:39:33 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2011! Download 30+ custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: MouseLocater - automatic highlight cursor when mouse is moved again  (Read 7423 times)
rpnfan
Participant
*
Posts: 7

View Profile Give some DonationCredits to this forum member
« on: April 06, 2009, 02:14:54 PM »

Working on big and/or multiple screens one often has to search for the mouse cursor. For OS X there is a nice program called mouseLocater which is extremly helpful.

When you move the mouse the cursor is highlighted by a graphic, so it's much easier to find the current location of the cursor. This feature would be very annoying, when the mouselocator would show up every time you use the mouse. So you can define an "idle time" or "trigger delay". When the mouse was not moved for the specified time the mouselocater shows up, when you move the mouse then.

In addition you can specify how long the mouselocator graphic will show up. I know that there is a Windows feature using Ctrl-key (press and release) to show the mouse cursor. Of course I also know Skrommels MouseMark which is similar in function to the win feature. Both have the disadvantage that I must press a hotkey to enable the function. The win feature also conflicts with some autohotkey key combos I defined. So I mimicked the Win function by adapting Skrommels MouseMark to use the Press/Release Ctrl-key. But I'm still not happy with this solution.

I tried to code a similar tool like mouselocator with Autohotkey, but was not successfull so far Sad

My dream would be that (similar to mouselocator) the graphic would blend after the specified time. In the Autohotkey script collection Activaid is a function called "VolumeControl" which slowly blends the graphic (in this case of the volume control) into the background -- similar to the OS X graphic if someone has seen this.

A nice touch would be the other option of the "original" MouseLocator program to allow to turn on the graphic always or to have a yellow dot to show clicks. The latter option can be useful when giving talks and demonstrating software. I used this sometimes on the Mac. Allowing to define a hotkey will make the script or program even more useful for this who do not which that the mouselocator shows up automatically.

The one coming up with the solution for this "autolocator" will be my hero smiley

Best regards
Peter
« Last Edit: April 06, 2009, 02:34:26 PM by rpnfan » Logged
rjbull
Charter Member
***
Posts: 2,776

View Profile Give some DonationCredits to this forum member
« Reply #1 on: April 07, 2009, 05:11:32 AM »

I haven't tried this, but there's Sonar:
Quote
Sonar 4 (677Kb)
This package provides an expanded ring around the mouse pointer for users who have difficulty locating the pointer. Unlike the Windows XP version, this package places a permanent ring around the pointer. This version introduces the option to vary the colour of the Sonar ring.
June 2008 - Added the use of ALT+s to show / hide the ring when required, version now 4.1
Logged
rpnfan
Participant
*
Posts: 7

View Profile Give some DonationCredits to this forum member
« Reply #2 on: April 07, 2009, 06:24:09 AM »

I haven't tried this, but there's Sonar

Thanks for the pointer. I tried Sonar, but it will show a "sonar" circular or rectangular border around the cursor allways. This is very annoying. A ring showing up, just when "needed" is much better IMO. I have used "MouseLocator" on the Mac for a long time and I find this approach to be very nice -- especially with multi-monitor-setups.

BTW, one workaround would be to buy a Mac, install Parallels and run Windows inside OS X. Then you'll have MouseLocator still active Wink  I have tried this at work already.
Logged
Josh
Charter Honorary Member
***
Posts: 3,338



View Profile Give some DonationCredits to this forum member
« Reply #3 on: April 07, 2009, 06:52:25 AM »

What about the built in windows function which lets you tap CTRL and it highlights the cursor?
Logged

Strength in Knowledge
PhilB66
Supporting Member
**
Posts: 1,510


View Profile Give some DonationCredits to this forum member
« Reply #4 on: April 07, 2009, 07:09:03 AM »

MouseMark

Logged
rpnfan
Participant
*
Posts: 7

View Profile Give some DonationCredits to this forum member
« Reply #5 on: April 07, 2009, 12:29:12 PM »

Josh and Phil,

thanks for the posts, but as I explained in my original posting I know both solutions you mentioned, but I'm looking for an automatic solution. Also the windows function will conflict with some autohotkeys I've defined.

I tried to write my own script, but was not successful. I find Autohotkey in some way easy to learn and on the other side there are some places where it's not consistent (%varname% for example).
Logged
Dormouse
Supporting Member
**
Posts: 996

View Profile Give some DonationCredits to this forum member
« Reply #6 on: April 07, 2009, 12:41:56 PM »

Of course, you can use CircleDock to do this too. Again, it is a hotkey solution - but I set an otherwise redundant mouse button to exercise the hotkey and it then brings up the CircleDock. Very effective for operating CircleDock. To just locate the mouse though, it would take 2 clicks (one to bring it up and one to send it away)..
Logged
MilesAhead
Member
**
Posts: 4,937



View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: April 07, 2009, 01:03:25 PM »

Josh and Phil,

thanks for the posts, but as I explained in my original posting I know both solutions you mentioned, but I'm looking for an automatic solution. Also the windows function will conflict with some autohotkeys I've defined.

I tried to write my own script, but was not successful. I find Autohotkey in some way easy to learn and on the other side there are some places where it's not consistent (%varname% for example).

You may want to try it in AutoIt3

The syntax is easier and very close to Basic.  It has For While and Do loops and Select Case like basic.  Strings are double quoted and concatenated using the '&' operator.  It has combined operators like C++.  Variables are denoted with a dollar sign as first character.

$myName = "Miles"
$myName &= "Ahead" ; concatenation with assignment of result

The user defined library included has Timer functions and you can set handlers for Windows Messages, such as WM_MOUSEMOVE

You can use the Tooltip() function to show a ballon tip with optional icon at x,y coords, so it's easy to put it at the mouse cursor position.


Also if you download the Scite package it has Compile With Options so you can use custom icons for your executable and the Scite editor has syntax checking and automatic indenting with Tidy.  Also intelli-sense shows keywords and built in functions as you type.

I know what you mean about AutoHotKey.  You can do a lot in a few lines but sometimes I'd never be able to get a MsgBox to work if I didn't use the tool that creates it for me.  Mainly the frustration is wrapped around the fact that strings aren't usually double quoted. Every time I want to put a message that happens to have a keyword in it I feel like the thing is going to try to fire a function or something.  But it's learning curve.  undecided

« Last Edit: April 07, 2009, 01:06:02 PM by MilesAhead » Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
wr975
Charter Member
***
Posts: 369



View Profile Give some DonationCredits to this forum member
« Reply #8 on: April 08, 2009, 07:28:04 AM »


Yes, yes, yes... AutoIt is better. No doubt. But instead of explaining a working script would've been fine.  tongue


Anway, here's a quick and dirty Autohotkey Script using the freeware utility Sonar5.exe found at http://www.fxc.btinternet.co.uk. See attachment for script + Sonar5.exe.

If reactivated after no user input for 60 seconds, it'll show a mouse sonar for 5 seconds. (Lines 8 and 9). Feel free to enhance the script (like sonar only if mouse movement for 2 seconds, and so on. Anything is possible.).




* sonar_idle.zip (227.09 KB - downloaded 282 times.)
Logged
kip
Honorary Member
**
Posts: 40


View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: April 08, 2009, 10:22:00 AM »

Just try running Sonar5 and use CTRL-ALT+S to show/hide the sonar ring/square, it then hides in the system tray
Logged
wr975
Charter Member
***
Posts: 369



View Profile Give some DonationCredits to this forum member
« Reply #10 on: April 08, 2009, 11:51:53 AM »

Just try running Sonar5 and use CTRL-ALT+S to show/hide the sonar ring/square, it then hides in the system tray
Or just activate Microsoft's mouse sonar and press Control. But the idea is, to a.) show the mouse sonar without pressing a key and b.) go away after some seconds. Using Microsoft's mouse sonar in my script did not work out, as it won't display if the mouse moves.
Logged
MilesAhead
Member
**
Posts: 4,937



View Profile WWW Give some DonationCredits to this forum member
« Reply #11 on: April 08, 2009, 12:32:39 PM »

Yes, yes, yes... AutoIt is better. No doubt. But instead of explaining a working script would've been fine.  tongue

The OP wanted or at least attempted to program it.  I provided some pointers in the right direction.  I don't see how doing it all for the person gets them there.
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
wr975
Charter Member
***
Posts: 369



View Profile Give some DonationCredits to this forum member
« Reply #12 on: April 08, 2009, 03:54:35 PM »

This is "Coding Snacks": Someone requests a program, another one codes it. It's not "Programming School".  The thread starter can learn from the source code and make it better.

I don't see how doing it all for the person gets them there.

That's where we disagree. I got interested in Autohotkey because years ago I requested a coding snack and Skrommel coded it for me. This was very helpful. I studied the source code, got interested in Autohotkey, started writing my own simple scripts and now do own tiny script applications with GUIs doing a lot of things. Telling me "Hey, use Autoit. It has For While and Do loops and Select Case like basic" back then would've been not helpful at all.

IMHO, if you want people to get interested in AutoIt, praising its benefits is nice, but posting applications ("See how easy it is done?") would be more effective.
Logged
MilesAhead
Member
**
Posts: 4,937



View Profile WWW Give some DonationCredits to this forum member
« Reply #13 on: April 08, 2009, 04:34:11 PM »

This is "Coding Snacks": Someone requests a program, another one codes it. It's not "Programming School".  The thread starter can learn from the source code and make it better.

I don't see how doing it all for the person gets them there.

That's where we disagree. I got interested in Autohotkey because years ago I requested a coding snack and Skrommel coded it for me. This was very helpful. I studied the source code, got interested in Autohotkey, started writing my own simple scripts and now do own tiny script applications with GUIs doing a lot of things. Telling me "Hey, use Autoit. It has For While and Do loops and Select Case like basic" back then would've been not helpful at all.

IMHO, if you want people to get interested in AutoIt, praising its benefits is nice, but posting applications ("See how easy it is done?") would be more effective.

I don't see how your approach of telling the OP to use a utility that doesn't fulfill the requirements is more helpful than mine.  If  you insist
on posting working code then please do so, instead of seeking to control others.
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
rpnfan
Participant
*
Posts: 7

View Profile Give some DonationCredits to this forum member
« Reply #14 on: April 08, 2009, 05:16:00 PM »

Just came home from work and found your post smiley


Anway, here's a quick and dirty Autohotkey Script using the freeware utility Sonar5.exe found at http://www.fxc.btinternet.co.uk. See attachment for script + Sonar5.exe.

Thank you very much for the time to program the "Auto-Sonar" script. This basically works :-) It has some drawbacks -- for example pressing Win-key after the idleTime will also activate Sonar, also scrolling with the mouse will also activate the sonar and block scrolling for the "sonartime". I'll lock into the source to understand it and think/hope I can change it according to my wishes. The working example script will get me going smiley

P.S.: Regarding my aim to post this wish. I want the program, and do not neccessarily want to work out a solution by myself. But of course I can not expect someone to write a solution, although I will be glad when someone does. I already tried to write this little program, but failed so far. I'm pretty busy at work and in the short time between with my family and kids, so even if I would like to spend more time on learning to use Autohotkey I'm here mostly interested in a working solution, where it doesn't matter that much to me where the solution comes from. I'm willing to invest my own time, but unfortunatelly time is limited and even if I would like to do many interesting and good things I can't do them all... ohmy  So I'm reallly grateful for your help you've given me here, as I have already spent quite some time to figure a solution out by myself smiley

On an unrelated note. I've seen you're german speaking. I came up with a script for german keyboard users which is especially interesting if you touch-type ("blind maschineschreiben"). If you're interested you can test it. I came up with a new improved german keyboard layout which only _adds_ chars and functions to the keyboard but does not alter or remove the default ones. Extremly handy to speed up daily work in general and especially when coding or using special chars like []{}\ and so on often. I'm using it for over a year now with great success. I will be writing an article to introduce this keyboard layout, but before submitting the article to a computer magazine I'm looking for beta-testers if the article is good to understand and if the keyboard layout should be modified. My wish is that this keyboard layout is so good and general usable, that it can become some sort of standard as an improved german keyboard layout. Therefore I call it "DeutschlandPlus keyboard layout", because it just _adds_ functions and doesn't change any of the default keys on a german keyboard. So if somebody wants to test it or has an idea where to look for beta-testers I'm open to suggestions.
Logged
wr975
Charter Member
***
Posts: 369



View Profile Give some DonationCredits to this forum member
« Reply #15 on: April 08, 2009, 06:23:23 PM »

Hi, as told, it was just a quick hack. I've updated it a bit.

  • If you press SHIFT+WINDOWS+S it'll always show the mouse sonar until you press SHIFT+WINDOWS+S again.
  • If you press SHIFT+WINDOWS+1 you'll disable it.
  • If you press SHIFT+WINDOWS+2 you'll enable it.
  • After the idle time, it'll only show the mouse sonar if you moved the mouse 300 pixels (line 10). Pressing a key or using the scroll wheel won't activate it.

I guess that's most of your requests. :-)


Following requests...

> the graphic would blend after the specified time.
> to have a yellow dot to show clicks

are waaaaaaaaaay too difficult for me. Perhaps Skrommel or someone else adapts MouseLocator and implements all your requests.



Quote
I came up with a script for german keyboard users

Thanks for the offer, but I'm not really interested in learning a new keyboard layout. (Old dog, new tricks...) Wink I'm sure you can find some beta testers here: http://www.essential-freebies.de.


New source code:
« Last Edit: April 08, 2009, 07:01:06 PM by wr975 » Logged
skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #16 on: April 08, 2009, 06:48:55 PM »

 smiley Try MovingMouse!

Helps locate the mouse when it's moved after being inactive for a while.

Just edit the waitfor, hideafter and tag to configure the settings.

Skrommel


[copy or print]
;MovingMouse.ahk
; Helps locate the mouse when it's moved after being inactive for a while
;Skrommel @ 2009

waitfor=10            ;How many seconds to wait before tagging the mouse
hideafter=5           ;How many seconds to tag the mouse
tag=>> OVER HERE <<  ;Text to display next to the mouse

#SingleInstance,Force
#Persistent,On
#NoEnv
SetWorkingDir,%A_ScriptDir%

CoordMode,Mouse,Screen

SetTimer,MOVED,1000
inactive=0
Return


MOVED:
oldmx:=mx
oldmy:=my
MouseGetPos,mx,my
If (mx=oldmx And my=oldmy)
  inactive+=1
Else
{
  If (inactive>waitfor)
  {
    SetTimer,HIDE,% hideafter*1000
    SetTimer,SHOW,100
  }
  inactive=0
}
Return


SHOW:
  ToolTip,%tag%
Return


HIDE:
SetTimer,HIDE,Off
SetTimer,SHOW,Off
ToolTip,
Return
Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
rpnfan
Participant
*
Posts: 7

View Profile Give some DonationCredits to this forum member
« Reply #17 on: April 19, 2009, 02:25:42 PM »

Hi wr975 and Skrommel,

thank you both for your great little programs. I was (still am a bit) ill -- so the longer delay in answering. I test both programs. I think wr975's solution is still sometimes generating wrong "sonars". I tried to hack both solutions, but none of my hacks was better in the end. Currently I'm using Skrommels solution, but will come back later to try to improve upon one of your solutions.

Thanks alot for your help!
Peter
Logged
Catherine Sea
Participant
*
Posts: 10


View Profile Give some DonationCredits to this forum member
« Reply #18 on: May 22, 2009, 05:22:23 AM »

Thank you.


Catherine Sea
http://www.scmsoftwareconfigurationmanagement.com/
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.059s | Server load: 0.17 ]