Tutorial 3: Hello World

This tutorial assumes that you already installed KonsolScript, and was able to prove that everything works fine.

Assuming you are using Windows 7, right-click anywhere on your Desktop or on your working directory. Then select New-> KonsolScript Document as shown in photo below.

If successful, you should already have a file temporarily named “New KonsolScript Document.ks” which you can rename, of course.

In this tutorial, let’s rename it to helloworld.ks.

The file has nothing written on it, yet. So, open Notepad from Start Menu, as shown in photo below.

Now, drag helloworld.ks to the Notepad application. You will know that you are ready to write codes in helloworld.ks if you see its name in Notepad’s title bar as shown below.

That means you can copy and paste this sample code.

function main() {
  //more code to follow
}

function cleanrender() {
  //?
}

function mousemove() {
  Screen:PrintString("hi, I'm KonsolScript!")
}

Save the file, via File -> Save.

Finally, double-click helloworld.ks to run your very first KonsolScript code. It will do nothing for now, but you can move your mouse over it.

So, what’s happening? I will explain in the next tutorial. So, read on! 🙂

~creek23


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *