AutoHotkey Community

It is currently May 27th, 2012, 3:38 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: November 2nd, 2005, 11:01 am 
Offline

Joined: May 26th, 2004, 12:20 pm
Posts: 61
Hey Lazlo,

I can't get your scripts to work properly. They work the first time round, but thats it. For instance, change the beginning of your latest script to:
Code:
SystemCursor(0)
MsgBox INVISIBLE CURSOR

SystemCursor(1)
MsgBox VISIBLE AGAIN

SystemCursor(0)
MsgBox INVISIBLE CURSOR

SystemCursor(1)
MsgBox VISIBLE AGAIN

Here, the cursor disappears for the first INVISIBLE CURSOR msgbox, reappears for the first VISIBLE AGAIN msgbox, but then stays visible for the next two msgboxes.

Can you confirm that on your system the cursor disappears both times?

Thanks,

Ant.

[p.s. Great work both of you, by the way!]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 2nd, 2005, 8:18 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
You are right, it only worked once:
MSDN for SetSystemCursor wrote:
The system destroys hcur by calling the DestroyCursor function. Therefore, hcur cannot be a cursor loaded using the LoadCursor function. To specify a cursor loaded from a resource, copy the cursor using the CopyCursor function, then pass the copy to SetSystemCursor.
I updated the last script, to make first a copy of the cursor and let that be destroyed. Also, we need enough room for the copy, but I don't know for sure, how much. I assume 32*32 words, 32*32*4 = 4096 bytes, plus change. (For some reason CopyCursor did not work, so I used CopyImage, as Shimanov.)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2006, 5:02 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
This is such a great script that its long overdue to be included in the documentation. I've added it to the DllCall page and also mentioned it on the MouseMove page.

Thanks to both of you.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 11th, 2007, 11:26 am 
Offline

Joined: October 5th, 2006, 8:45 am
Posts: 476
can you tell me please if I can change the appearance of I-Beam cursor when it is over a specific control?

and what are the available appearances

I want to do this because I-Beam hides characters when I type sometimes..

thanks


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 18th, 2009, 5:20 am 
Sorry guys,
How can I write a script to toggle between cursor to hourglass?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 18th, 2009, 5:35 am 
http://www.autohotkey.com/forum/topic35600.html


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: bobbysoon, Google Feedfetcher, Wicked, Yahoo [Bot] and 12 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