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 help

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

Joined: 20 Aug 2007
Posts: 66

PostPosted: Sat Apr 12, 2008 8:04 am    Post subject: Visual Basic help Reply with quote

in batch you can call the top ex.
:top and on the bottom of the batch you write
goto :top so it repeats everything over again.

is there any way to do this in visual basic (6) Question Question

thx for all answers Very Happy
Back to top
View user's profile Send private message
Psy
Grandmaster Cheater Supreme
Reputation: 1

Joined: 27 Mar 2008
Posts: 1366

PostPosted: Sat Apr 12, 2008 9:27 am    Post subject: Reply with quote

Umm... you mean something like:

Code:

If <condition> then
    <do something>
    <do another thing>
End If


You can also look into while loops, that will repeat until a condition changes or becomes true, in various different ways.
Not exactly sure what you mean mate.

But google for the tak you want to perform in VB and i'm sure you'll have some good stuff to look through.

Good luck Wink
Back to top
View user's profile Send private message
XxOsirisxX
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Oct 2006
Posts: 1597

PostPosted: Sat Apr 12, 2008 7:47 pm    Post subject: Re: Visual Basic help Reply with quote

paddyc wrote:
in batch you can call the top ex.
:top and on the bottom of the batch you write
goto :top so it repeats everything over again.

is there any way to do this in visual basic (6) Question Question

thx for all answers Very Happy


Like that you just said, it's a "jump", at VB 6 and others versions (all i been know) that could be trasnlated as "Goto" which is a command not well used at all.. but w.e

And btw, it's not reapeating the program all over again, it just jumping, which apparently, in you code, :top is at top of the program code, so it seen to be re-starting.

VB 6
Code:
Goto Top


Top:


At VB 6 as others, there are a bunch of ways to re-start. But, since VB6 is not that console application as batch is, i doubt you will find this Goto loop that usefull at all. I would recommend you to look up for "Do/While/Until" "For" "If/Then/Else/Else If"...

_________________

Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Apr 13, 2008 8:48 am    Post subject: Reply with quote

A little easier to understand example:

Code:
Private Sub Form_Load()
    Dim iNumber As Long
    iNumber = 0

AddOne:
    iNumber = iNumber + 1

AddTwo:
    iNumber = iNumber + 2

AddThree:
    iNumber = iNumber + 3

Finish:

    If iNumber = 6 Then GoTo AddOne
    If iNumber = 12 Then GoTo AddThree
    MsgBox iNumber
End Sub


First run through, the value is 6. At Finish, it compares for 6 then jums to AddOne if iNumber is 6. Runs through the additions again then checks for 6 again, at this time the value is 12 so that if will not happen. So the next if is checked against 12, which the value is 12, jumps to AddThree then finishes up as the ifs will both return false then.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
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