AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sleep bug?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Mayhem



Joined: 21 Aug 2004
Posts: 104

PostPosted: Sat Feb 26, 2005 7:20 am    Post subject: Sleep bug? Reply with quote

Does this work for you guys? It used to for me before i upgraded to the latest version.


(eg)

Code:

rest = 5
Sleep, %rest%000 ; rest for 5 seconds


I know i can do a "Sleep, 5000" .. i just have a GUI that the users can choose how many seconds to sleep for.
Back to top
View user's profile Send private message
Nemroth



Joined: 07 Sep 2004
Posts: 262
Location: France

PostPosted: Sat Feb 26, 2005 9:49 am    Post subject: Reply with quote

Code:
  rest = 5
  Suit = %rest%000
  Sleep, %Suit% ; rest for 5 seconds
works...
Helped ?
Edit :
Code:
  rest = 5
  Sleep, (rest * 1000) ; rest for 5 seconds
Works too.
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Sat Feb 26, 2005 12:07 pm    Post subject: Reply with quote

Irgendwie redet man sich den Mund fusselig Laughing

@ to whom it may concern

IMHO - to announce a bug it needs

a) a previous testing
b) sample code which makes it possible for others to have a cross check on their system
c) the willing to accept that in minimum 92% of all cases the "bug" is between the seat and the screen - and therefore to ensure that everything has been done (even to R(eview)TFM) not to put shame on yourself Wink

Conglusio: If your bug-request ends with an question mark (?) you should rethink if it would make more sense to post it first in the Support area !.

I think you'll agree that we should ensure that AHK won't get the reputation of a buggy app, caused by Support requests in the wrong area of the forum.

Thx for listening. Cool
Back to top
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Sat Feb 26, 2005 12:48 pm    Post subject: Reply with quote

i rarely visit this sub-forum as this is Chris's arena where he fights nasty bugs.. anyways, in this particular case i'm also interested to know y 'Sleep, %rest%000' is incorrect usage.. might help me sometime while debugging my scripts.
_________________
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Sat Feb 26, 2005 4:36 pm    Post subject: Reply with quote

@ Rajat
Quote:
in this particular case i'm also interested
Whould you be less interested to get this clearified if the request would have been made in the Support section ? Guess no ! Wink

<fanfare>Serenity - my hero of the day !</fanfare>

He's done each and every step to prove what seems to be a bug. Now he wanna know if others confirm his assumption. And best of all, he's requested that confirmation in the Support section. Woohoo ... Very Happy
Back to top
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sat Feb 26, 2005 5:31 pm    Post subject: Reply with quote

I was under the impression that Serenity was female...
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sat Feb 26, 2005 8:20 pm    Post subject: Reply with quote

Rajat wrote:
why 'Sleep, %rest%000' is incorrect usage
This bug was introduced when support for expressions was added. I think it's interpreting "%rest%000 as the variable whose name is "5000", rather than the number 5000. I'll try to fix it for the next release.

Thanks.
Back to top
View user's profile Send private message Send e-mail
Serenity



Joined: 08 Nov 2004
Posts: 892

PostPosted: Mon Feb 28, 2005 3:49 pm    Post subject: Reply with quote

jonny wrote:
I was under the impression that Serenity was female...


yes, thank you jonny.
_________________
"Anything worth doing is worth doing slowly." - Mae West
Back to top
View user's profile Send private message Visit poster's website
BoBo
Guest





PostPosted: Mon Feb 28, 2005 5:43 pm    Post subject: Reply with quote

Oh boy (girl) this could be the beginning ... J&S riding on the back of the GGWNt into the sunset Laughing
Back to top
Titan



Joined: 11 Aug 2004
Posts: 5049
Location: imaginationland

PostPosted: Mon Feb 28, 2005 5:57 pm    Post subject: Re: Sleep bug? Reply with quote

Mayhem wrote:
I know i can do a "Sleep, 5000" .. i just have a GUI that the users can choose how many seconds to sleep for.
An example to your original question (or how I interpreted it) for a GUI asking for a user to input the sleep interval:
Code:
Gui, Add, Text, , Delay (seconds)?
Gui, Add, Edit, vDelay
Gui, Add, Button, gSleep, OK
Gui, Show
Return

Sleep:
Gui, Submit
Delay := Delay * 1000
Sleep, %Delay%
MsgBox, Finished sleeping!
Return

GuiClose:
ExitApp


A possible better way of doing this is using an InputBox.
_________________

RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group