ScriptUO
Scripting Resources & Utilities => Stealth Client => Topic started by: Crome969 on June 23, 2014, 11:14:40 PM
-
I guess many people may think about learning scripting in pascal but since there are less samples out how to write scripts and what can stealth actual handle.So i want to start a daily small Tutorial.
If you are good in english grammar (since iam not as non native) write me your corrections via PM and i will correct those parts and add you as Editor into the Credits.
I will lock this topic and make a side thread for actual Questions (http://www.scriptuo.com/index.php?topic=12442.0).
Table of Content :
- Terminology of a Program (http://www.scriptuo.com/index.php?topic=12441.msg104157#msg104157)
- Terminology of a Unit (http://www.scriptuo.com/index.php?topic=12441.msg104159#msg104159)
- Structures and enumerations (http://www.scriptuo.com/index.php?topic=12441.msg104160#msg104160)
- Arrays (http://www.scriptuo.com/index.php?topic=12441.msg104169#msg104169)
- Conditons and Loops (http://www.scriptuo.com/index.php?topic=12441.msg104173#msg104173)
- Breaking-termonology (http://www.scriptuo.com/index.php?topic=12441.msg104174#msg104174)
- Try & Catch (http://www.scriptuo.com/index.php?topic=12441.msg104175#msg104175)
- IO-Filehandling and StringLists (http://www.scriptuo.com/index.php?topic=12441.msg104228#msg104228)
- Comments, Regions and final structure (http://www.scriptuo.com/index.php?topic=12441.msg104229#msg104229)
- Stealth Scanner(coming soon)
- Stealth Objects(coming soon)
- Stealth Properties(coming soon)
- Stealth Gumps (coming soon)
- Stealth Context Menus(coming soon)
- Stealth Connections(coming soon)
- Stealth Mobiles(coming soon)
- Stealth Journal(coming soon)
- Stealth Pathfind(coming soon)
- Stealth Vendoring(coming soon)
- Stealth Trading(coming soon)
- Stealth Events(coming soon)
-
-
-
-
-
-
-
-
-
Comments, Regions and final structure
If you mastered all previous tutorials, this final lesson will be very easy.
In Pascal you have multiple ways in order to sort\comment and structure code.
One of those are regions. Regions are used to mark a specific part of code allowing to show and hide them in order to organize your code.
You may see the spoilers here, regions work similar.A region begins with the keyword {$Region 'Name'} where you replace Name for the title of region and ends with the keyword {Endregion}
You also have multiple ways to comment or outcomment code. The most used is // where you can write comments on the line after the //.
If you want to write multiline comments or outcomment a region of code you can use (* <Comments> *) where <Comments reflect your text\code you dont want to be executed anymore.
Attention : If you outcomment code with regions you must keep sure that the begin and end keyword of regions is outcommented or not being commented. Else you will get issues with your Code.
Thats it, you learned now the very very basics of pascal, able to atleast write a few basic scripts. From now on i will start explaining Stealth related Components.Further Questions can be asked Here (http://www.scriptuo.com/index.php?topic=12442.0).