• Log in or sign up for an account here: https://www.sythe.org/login

[Source] Basic Scripting Program

Darthatron

Massive Troll

Retired Sectional Moderator
Visual Basic Programmers
Joined
May 22, 2006
Sythe Gold
0
Messages
1,612
Age
35
Location
The internet.
Ok, so. I got bored and made a partial scripting program, it's nowhere near completion, but someone might have use for it.

I also commented it, but not too much. :P

EDIT: Added Variables, and If Statements. >_>

EDIT2: I totally added Editing Variables, a GoTo command and a small, incomplete Command Database. :)
 

Attachments

Member of the Month Winner
Sythe's 10th Anniversary
Ok, so. I got bored and made a partial scripting program, it's nowhere near completion, but someone might have use for it.

I also commented it, but not too much. :P
Did you use third-party libraries for the script or do you parse it yourself? I'm on Linux, so I don't know.
 
I parsed it myself, using Split and Select Case. It's pretty basic, but... you know... I don't care. :P It' just an example.
 
its pretty good, kinda reminds me of those script macroing programs xD good job
 
Code:
        'If it's a comment then it skips.
        If Mid(strParam(0), 1, 1) = "'" Then GoTo SkipMe
When checking if it's a comment you should strip out whitespaces first OR check if the first NON-whitespace is an apostrophe. Checking only the first character causes it to give errors if you want to indent your comments.

You should probably just strip out whitespaces from the beginning of every line as indenting anything seems to cause errors. I was still impressed, it's quite powerful and not even that big.
 
Member of the Month Winner
Sythe's 10th Anniversary
Hint: Lua.

Google it ^_^
 
Code:
        'If it's a comment then it skips.
        If Mid(strParam(0), 1, 1) = "'" Then GoTo SkipMe
When checking if it's a comment you should strip out whitespaces first OR check if the first NON-whitespace is an apostrophe. Checking only the first character causes it to give errors if you want to indent your comments.

You should probably just strip out whitespaces from the beginning of every line as indenting anything seems to cause errors. I was still impressed, it's quite powerful and not even that big.
When I wrote it I didn't need to indent anything, due to the lack of IF Statements, and such. :P

However, it's not difficult to add indenting.

Code:
strCommand(i) = Trim(strCommand(i))
Hint: Lua.

Google it ^_^
I think I'll stick with making it from scratch, thanks though. :P

_____________

Ok, so I've added IF Statements, and now I'm trying to add Variables, which I think might be a little more difficult than anything else. :P
 
Member of the Month Winner
Sythe's 10th Anniversary
When I wrote it I didn't need to indent anything, due to the lack of IF Statements, and such. :P

However, it's not difficult to add indenting.

Code:
strCommand(i) = Trim(strCommand(i))

I think I'll stick with making it from scratch, thanks though. :P

_____________

Ok, so I've added IF Statements, and now I'm trying to add Variables, which I think might be a little more difficult than anything else. :P
Lua already has if statements, loops, etc. ;)

It is used in things like World Of Warcraft, Ragnarok and so on as a scripting engine, and is completely free and open source ^_^
 
Lua already has if statements, loops, etc. ;)

It is used in things like World Of Warcraft, Ragnarok and so on as a scripting engine, and is completely free and open source ^_^
My point is I want to see If I can do it. >_>

EDIT: I'm updating the first post with If Statements, and Variables. Still not done, you can't change the values of Variables... Yet...
 
Darthatron said:
I think I'll stick with making it from scratch, thanks though. :P
Should we really call VB6 programs "from scratch".:laugh:
Swan said:
It is used in things like World Of Warcraft, Ragnarok and so on as a scripting engine, and is completely free and open source
I read a bit about it and to show you how useful it really is, around 40% of Adobe Lightroom is coded in Lua.
EDIT: I'm updating the first post with If Statements, and Variables. Still not done, you can't change the values of Variables... Yet...
Very nice, I'll probably keep following this as you move along.:)
 
Yes well when I said "from scratch", I was clearly going insane. :p

All that is really left is Personal Functions and a GoTo command. :)
 
Member of the Month Winner
Sythe's 10th Anniversary
New version deserves to be noticed.
 
I'm going to update soon, with the "GoTo" function, and editing Variables.

Here is an example:

Code:
Dim Val 0

Loop:

If Val < 10
    MoveMouse 100 200
    MoveMouse 200 100
    Edit Val + 1
    GoTo Loop
End If

It will loop through the If statement 10 times, then end the script. ^_^

EDIT: ZOMG! UPDATE FIRST POSTZORZ!!!!
 
Member of the Month Winner
Sythe's 10th Anniversary
I'm going to update soon, with the "GoTo" function, and editing Variables.

Here is an example:

Code:
Dim Val 0

Loop:

If Val < 10
    MoveMouse 100 200
    MoveMouse 200 100
    Edit Val + 1
    GoTo Loop
End If

It will loop through the If statement 10 times, then end the script. ^_^

EDIT: ZOMG! UPDATE FIRST POSTZORZ!!!!
isn't that like a different version of a while loop?

Add support for for loops (iteration), and do-while ^_^
 
Pretty good. good job
 
can i have that one plz. msn meh
 
I never did the while loop, I got lazy. It wouldn't be difficult to make it with the information already in there.
 
Runescape Gamblingrunescape gambling
Back
Top