[Source] Basic Scripting Program

Discussion in 'Programming General' started by Darthatron, Aug 27, 2008.

[Source] Basic Scripting Program
  1. Unread #1 - Aug 27, 2008 at 12:30 AM
  2. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    [Source] Basic Scripting Program

    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. :)
     

    Attached Files:

  3. Unread #2 - Aug 27, 2008 at 2:21 AM
  4. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    [Source] Basic Scripting Program

    Did you use third-party libraries for the script or do you parse it yourself? I'm on Linux, so I don't know.
     
  5. Unread #3 - Aug 27, 2008 at 6:05 AM
  6. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    [Source] Basic Scripting Program

    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.
     
  7. Unread #4 - Aug 28, 2008 at 7:45 PM
  8. drainingpower
    Joined:
    Jan 15, 2008
    Posts:
    1,166
    Referrals:
    0
    Sythe Gold:
    0

    drainingpower Guru

    [Source] Basic Scripting Program

    its pretty good, kinda reminds me of those script macroing programs xD good job
     
  9. Unread #5 - Aug 28, 2008 at 8:16 PM
  10. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    [Source] Basic Scripting Program

    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.
     
  11. Unread #6 - Aug 29, 2008 at 2:17 AM
  12. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    [Source] Basic Scripting Program

    Hint: Lua.

    Google it ^_^
     
  13. Unread #7 - Aug 30, 2008 at 5:24 AM
  14. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    [Source] Basic Scripting Program

    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
     
  15. Unread #8 - Aug 30, 2008 at 5:52 AM
  16. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    [Source] Basic Scripting Program

    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 ^_^
     
  17. Unread #9 - Aug 30, 2008 at 6:43 AM
  18. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    [Source] Basic Scripting Program

    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...
     
  19. Unread #10 - Aug 30, 2008 at 11:33 AM
  20. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    [Source] Basic Scripting Program

    Should we really call VB6 programs "from scratch".:laugh:
    I read a bit about it and to show you how useful it really is, around 40% of Adobe Lightroom is coded in Lua.
    Very nice, I'll probably keep following this as you move along.:)
     
  21. Unread #11 - Aug 30, 2008 at 1:12 PM
  22. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    [Source] Basic Scripting Program

    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. :)
     
  23. Unread #12 - Aug 31, 2008 at 7:25 AM
  24. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    [Source] Basic Scripting Program

    New version deserves to be noticed.
     
  25. Unread #13 - Aug 31, 2008 at 9:46 AM
  26. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    [Source] Basic Scripting Program

    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!!!!
     
  27. Unread #14 - Aug 31, 2008 at 5:56 PM
  28. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    [Source] Basic Scripting Program

    isn't that like a different version of a while loop?

    Add support for for loops (iteration), and do-while ^_^
     
  29. Unread #15 - Sep 1, 2008 at 4:16 AM
  30. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    [Source] Basic Scripting Program

    Yeah, I'm going to work on that when I get home. :)
     
  31. Unread #16 - Sep 13, 2008 at 5:27 PM
  32. 70-RanqeRS
    Joined:
    Aug 25, 2008
    Posts:
    101
    Referrals:
    0
    Sythe Gold:
    0

    70-RanqeRS Active Member

    [Source] Basic Scripting Program

    Pretty good. good job
     
  33. Unread #17 - Sep 13, 2008 at 5:33 PM
  34. 70-RanqeRS
    Joined:
    Aug 25, 2008
    Posts:
    101
    Referrals:
    0
    Sythe Gold:
    0

    70-RanqeRS Active Member

    [Source] Basic Scripting Program

    can i have that one plz. msn meh
     
  35. Unread #18 - Sep 14, 2008 at 7:13 AM
  36. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    [Source] Basic Scripting Program

    I never did the while loop, I got lazy. It wouldn't be difficult to make it with the information already in there.
     
< Need Direcx Tutorial/Ebook | Drag Effect? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site