AutoHotkey Community

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: October 4th, 2005, 11:56 am 
Offline

Joined: July 24th, 2005, 4:29 am
Posts: 27
Location: Rheinland
Hi,

the button colour is not restored after flashing but stays inverted until you activate the task:
Code:
Gui, Show, NoActivate, Test
Gui, Flash


Code:
Gui, Flash, Off
has no effect, too.

Icfu


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 4th, 2005, 12:21 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
"Gui Flash" relies on a built-in operating system feature whose behavior is a little strange. I think you can solve this by doing a second Gui Flash after sleeping a while. Here is a working script that demonstrates this:
Code:
Gui, Show, NoActivate, Test
Loop 6  ; Use an even number.
{
     Gui Flash
     Sleep 500  ; It's quite sensitive to this value; altering it may change the behavior in unexpected ways.
}
return

GuiClose:
ExitApp
I'll update the example in the help file.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 4th, 2005, 12:48 pm 
Offline

Joined: July 24th, 2005, 4:29 am
Posts: 27
Location: Rheinland
Thank you for the explanation, I had misinterpreted the Flash command as it seems.

If you need two
Code:
Gui, Flash
commands embedding a not too small Sleep value to get one complete flashing cycle, what is the sense of
Code:
Gui, Flash, Off
then?

I am confused, really somewhat "strange"... ;)

Is the "Off" maybe a hardcoded
Code:
Sleep, 300
Gui, Flash
command? If this is the case maybe it's a good idea to update to Sleep, 500 too to correct the timing problems.

Icfu


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 5th, 2005, 1:39 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
"Off" calls the OS function I mentioned in a different mode. I know it doesn't seem to serve much purpose; it's there only for completeness in case it is actually useful on some operating systems.

Here's the actual info about it at MSDN: FlashWindow


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 5th, 2005, 1:45 am 
Offline

Joined: July 24th, 2005, 4:29 am
Posts: 27
Location: Rheinland
Thanks again, no questions left. :)

Icfu


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 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