Advertisement
mixster

Untitled

Dec 28th, 2009
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. Updating of scripts
  2.  
  3. Introduction to scripting
  4. - Basics and types
  5. - Initial procedures/functions
  6. - Variables, constants, records
  7. - Modularity
  8. - Basic macroing/SRL procedures/functions
  9. - Mouse related
  10. - Keyboard related
  11. - TPA based object finding
  12. - Symbols, bitmaps and DTM's
  13. - Memory leaks
  14. - debugging
  15. - Writeln's
  16. - Try..except/finally
  17. - updating old scripts
  18. - SRL
  19. - SCAR
  20. - Ask
  21.  
  22.  
  23. Introduction to scripting
  24. This tutorial should hopefully take from being a leecher to a small contributor to the forums and this introduction aims to set standards for the rest of the tutorial.
  25.  
  26. First of all, I fully encourage you not to follow it. I hope to create an interest in scripting where by you want to learn by playing with the language rather than reading what I say as what I say can get very dull.
  27.  
  28. I do not plan on teaching you how to make macroing scripts. Instead, I plan on giving you logical skills, basic scripting skills and basic Scar & SRL knowledge. This should allow you to produce scripts, but will focus on fixing scripts.
  29.  
  30.  
  31.  
  32. - Basics
  33. A script, at the least, only requires 2 lines:
  34. [scar]begin
  35. end.[/scar]
  36. begin is the start of a grouped section of code and end shows the closing of this grouped code. If then end is followed by a . then it means that this is the end of the script - nothing else will be run when it gets this far and any code beneath it is ignored. Usually an end will have a ; after it.
  37.  
  38. A popular optional is to have a program name, which is set by doing
  39. [scar]program MyFirstScript;[/scar]
  40. but it does nothing and only affects one other thing that is quite unimportant now. There are rules to what it can be, but mainly no spaces - more depth will be given later.
  41.  
  42. For types, there is a handful of main ones. Booleans are either true or false. A real life example, "Is my foot on fire" - it either is or isn't. Chars are single letters - they can anything from 'a' to '~' or ones you can't directly see (like the enter character). Strings are just a load of characters joined together, like 'hello' or 'oh hey there!'. Integers are whole numbers, such as 7 or 42 or 69. Extended numbers are numbers that don't have to be whole, such as 4.2 and 8.007 (it can also be a whole number).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement