Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Visual Basic Sleep function?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
gmaster1440
Master Cheater
Reputation: 0

Joined: 26 Jun 2006
Posts: 365
Location: a,b,c++

PostPosted: Sat Aug 11, 2007 8:34 am    Post subject: Visual Basic Sleep function? Reply with quote

Is there anyway that i can create a sleep/pause between commands in visual basic? Kinda like this:

swf.SetVariable("test", test)
Sleep("3000")
swf.SetVariable("test2", test)

_________________
c++ pointers...
Back to top
View user's profile Send private message
UnLmtD
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 894
Location: Canada

PostPosted: Sat Aug 11, 2007 8:43 am    Post subject: Reply with quote

You can use Sleep, it's exported by kernel32. Then use it like this "Sleep 100". Here I found something on the internet.

Code:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub Command1_Click()
  Debug.Print "Started - " & Time()
  Sleep 1000
  Debug.Print "Ended - " & Time()
End Sub

_________________
Back to top
View user's profile Send private message
XTrinityX
Expert Cheater
Reputation: 0

Joined: 18 May 2006
Posts: 123
Location: Connecticut

PostPosted: Sat Aug 11, 2007 8:58 am    Post subject: Reply with quote

Threading.Thread.Sleep()
Back to top
View user's profile Send private message AIM Address
muffinman177
Master Cheater
Reputation: 0

Joined: 09 Dec 2006
Posts: 377
Location: Drury Lane

PostPosted: Mon Aug 13, 2007 5:45 pm    Post subject: Reply with quote

How long would Sleep 1000 be? 10 seconds?
Back to top
View user's profile Send private message
XTrinityX
Expert Cheater
Reputation: 0

Joined: 18 May 2006
Posts: 123
Location: Connecticut

PostPosted: Mon Aug 13, 2007 9:36 pm    Post subject: Reply with quote

1000 would be one second.

The parameter for sleep is in milliseconds. 1000 milliseconds = 1 second.

~XTrinityX
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites