AutoHotkey Community

It is currently May 27th, 2012, 11:29 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: September 15th, 2009, 8:29 pm 
Offline

Joined: April 17th, 2009, 1:50 pm
Posts: 9
Location: Tampa, FL
Can anyone help with some code to make the SplashImage follow the mouse pointer while the image is visible?

I have a script that runs database queries in the background via vbs. While the query runs, I'd like to have an hourglass image displayed next to the mouse pointer. Right now the image just displays by default on the center of the screen.

I guess I could also try to change the regular mouse pointer to the waiting icon, but the threads I have read about this require DLL calls and may possibly screw with the pointer to the point that a reboot is required to straighten it out. So I'd like to avoid this. TIA!!!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 15th, 2009, 8:44 pm 
Offline

Joined: December 24th, 2008, 3:25 am
Posts: 1401
Location: :noitacoL
Quote:
Right now the image just displays by default on the center of the screen.

where does that image come from?

I think that if you make a splash image, even if it does follow the mouse around, it would not delete/remove the one that is forced there from the database itself. It would be its own splash image created by AHK moving around, and not a replacement to existing one generated by a different application.

This may not be 100% correct though, but reading the documentation it seems that way.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 15th, 2009, 8:45 pm 
Offline

Joined: April 8th, 2009, 7:49 pm
Posts: 6074
Location: San Diego, California
Code:
#Persistent
SetTimer, WatchCursor, 100

image=DE.gif

; Create a simple SplashImage window:
SplashImage, %image%, B
return

; This example allows you to move the mouse around to see
; the title of the window currently under the cursor:

WatchCursor:
MouseGetPos, xpos, ypos

; just to demo how to offset the image
xpos+=0 
ypos+=0

SplashImage, DE.gif, B x%xpos% y%ypos%
return

; in case of emergency, hit escape ;)
esc::exitapp


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 15th, 2009, 10:17 pm 
Offline

Joined: April 17th, 2009, 1:50 pm
Posts: 9
Location: Tampa, FL
I'll try the code that leef_me provided. THANKS!

As to where the image is coming from, it's from AHK. AHK creates the splashimage, runwaits the vbscript that queries the database, then reads the file generated by the vbscript before killing the splashimage.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group