Creating a Program 🔗

Click the New Program button on the programs page to create a new program.

Creating a Program (1)

You will be given the option to start from scratch or use a template.

If you choose a template, your program will be preloaded with a fully functional program. You can run/preview it as soon as it is created to evaluate what changes you need to make so that the program meets your needs. All templates come with plenty of comments that will help you understand the code in them.

Writing Your Program Directly into GuidedTrack 🔗

You can write your program directly in the GuidedTrack website using our code editor, or you can create a separate text file that you can later copy and paste into the code editor.

When using GuidedTrack's code editor, you can use the Toolbar on the left hand side to add code automatically that you can customize.

The Toolbar demonstrates how to use each keyword. It helps you find keywords, get live examples of how to use them, and read more detailed instructions.

Writing Your Program Directly into GuidedTrack (1)

Pressing the + button next to any keyword will immediately add a simple example of that keyword in action to your program, which you can then modify to fit your needs.

Pressing on the keyword name opens up editable fields for customization:

Writing Your Program Directly into GuidedTrack (2)

If you fill out the fields and click "Insert" you'll quickly add that element to your program.

You can also press the question mark (?) for additional help and information:

Writing Your Program Directly into GuidedTrack (3)

You'll notice that as you add code to your program, certain keywords will begin to change color.

Writing Your Program Directly into GuidedTrack (4)

The GuidedTrack text editor is actually very powerful stuff. There are a number of special shortcuts you can use to become an editing ninja. For example, you can use Ctrl+f (Command+f on a Mac) to bring up a box that will help you find text and Ctrl+h (Command+Option+f on a Mac) to replace text.

Make sure to Save your program before leaving the editor, otherwise you will lose your progress. If you click Preview or Run to see how it's coming along, the program will be saved automatically.

Tip #1: Indenting and unindenting multiple lines 🔗

Need to indent multiple lines at once? In GuidedTrack, simply select all the lines you wish to indent and hit tab to indent them (move them to the right) all together, or hold shift and hit tab to unindent (move them to the left) all together.

Tip #2: Comment and uncomment a block of code (toggle comments or add multiline comments) 🔗

Use Cmd+Shift+c (macOS) or Ctrl+Shift+c (Windows) to comment or uncomment the line of code where your cursor is at. If you want to comment a block of consecutive lines (i.e., make a multiline comment), highlight the block of code you want to comment all at once and use the same combination of keys.

Tip #3: Saving your program 🔗

Use Cmd+s (macOS) or Ctrl+s (Windows) to save the program you are editing.

Text editing keyboard shortcuts 🔗

Selection 🔗
Action Windows / Linux Mac
Select all Ctrl-A Command-A
Select left Shift-Left Shift-Left
Select right Shift-Right Shift-Right
Select word left Ctrl-Shift-Left Option-Shift-Left
Select word right Ctrl-Shift-Right Option-Shift-Right
Select line start Shift-Home Shift-Home
Select line end Shift-End Shift-End
Select to line end Alt-Shift-Right Command-Shift-Right
Select to line start Alt-Shift-Left Command-Shift-Left
Select up Shift-Up Shift-Up
Select down Shift-Down Shift-Down
Select page up Shift-PageUp Shift-PageUp
Select page down Shift-PageDown Shift-PageDown
Select to start Ctrl-Shift-Home Command-Shift-Up
Select to end Ctrl-Shift-End Command-Shift-Down
Duplicate selection Ctrl-Shift-D Command-Shift-D
Select to matching bracket Ctrl-Shift-P Ctrl-Shift-P
Go to 🔗
Action Windows / Linux Mac
Go to left Left Left, Ctrl-B
Go to right Right Right, Ctrl-F
Go to word left Ctrl-Left Option-Left
Go to word right Ctrl-Right Option-Right
Go line up Up Up
Go line down Down Down
Go to line start Alt-Left, Home Command-Left, Home, Ctrl-A
Go to line end Alt-Right, End Command-Right, End, Ctrl-E
Go to page up PageUp PageUp
Go to page down PageDown PageDown
Go to start Ctrl-Home Command-Home, Command-Up
Go to end Ctrl-End Command-End, Command-Down
Go to line Ctrl-L Command-L
Go to matching bracket Ctrl-P Ctrl-P
Find & replace 🔗
Action Windows / Linux Mac
Find Ctrl-F Command-F
Replace Ctrl-H Command-Option-F
Find next Ctrl-K Command-G
Find previous Ctrl-Shift-K Command-Shift-G
Line operations 🔗
Action Windows / Linux Mac
Remove line Ctrl-D Command-D
Copy lines down Alt-Shift-Down Command-Option-Down
Copy lines up Alt-Shift-Up Command-Option-Up
Move lines down Alt-Down Option-Down
Move lines up Alt-Up Option-Up
Remove to line end Alt-Delete Ctrl-K
Remove to linestart Alt-Backspace Command-Backspace
Remove word left Ctrl-Backspace Option-Backspace
Remove word right Ctrl-Delete Option-Delete
Multicursor 🔗
Action Windows / Linux Mac
Add multi-cursor with mouse cursor Ctrl-Click Cmd-Click
Add multi-cursor above Ctrl-Alt-Up Ctrl-Option-Up
Add multi-cursor below Ctrl-Alt-Down Ctrl-Option-Down
Add next occurrence to multi-selection Ctrl-Alt-Right Ctrl-Option-Right
Add previous occurrence to multi-selection Ctrl-Alt-Left Ctrl-Option-Left
Move multicursor from current line to the line above Ctrl-Alt-Shift-Up Ctrl-Option-Shift-Up
Move multicursor from current line to the line below Ctrl-Alt-Shift-Down Ctrl-Option-Shift-Down
Remove current occurrence from multi-selection and move to next Ctrl-Alt-Shift-Right Ctrl-Option-Shift-Right
Remove current occurrence from multi-selection and move to previous Ctrl-Alt-Shift-Left Ctrl-Option-Shift-Left
Other 🔗
Action Windows / Linux Mac
Indent (*) Tab Tab
Outdent (*) Shift-Tab Shift-Tab
Undo Ctrl-Z Command-Z
Redo Ctrl-Shift-Z, Ctrl-Y Command-Shift-Z, Command-Y
Change to lower case Ctrl-Shift-U Ctrl-Shift-U
Change to upper case Ctrl-U Cmd-U
Overwrite Insert ---
Delete Delete Delete, Ctrl-D
* The cursor must be at the beginning of the line or at least one character on the line must be highlighted.

Using the Search Bar when you are writing a program 🔗

You can use the search bar to discover new functionality, to find reusable code and to write your programs faster. Simply type what you want to do and browse through the search results.

Search bar: keywords 🔗

Gain immediate access to all the keywords in the toolbar. For example, if you want to use the *email keyword, type "email" in the search bar and you will notice a list of results being displayed as you type.

Search bar keywords (1)

Clicking on the first result of the search will open the visual code editor for the *email keyword. All of GuidedTrack keywords can be accessed this way.

Search bar: programs 🔗

Browse the Program Library entering your search terms into the bar. If you are looking for a scale that measures the Big Five personality traits, type "big five" and you will get the list of programs in the library that do it:

Search bar programs (1)

Search bar: questions 🔗

Inject the code that generates common questions, such as a user's age, gender, year of birth, etc. This is what you see when you search for "age":

Search bar questions (1)

When you select the question you are looking for, you will see the preview of the code and have the option to insert it into your program:

Search bar questions (2)

Search bar: functions 🔗

GuidedTrack's functions are also accessible via the search bar. For instance, if you want to erase an element from a collection, type "erase" in the search bar and you will find the .erase function (to delete elements that match a given value) and .remove (to delete a given index in the collection). When you click on a search result of type "function", you can see and insert sample code on how to use it:

Search bar functions (1)

Writing Your Program in a Separate Text Editor 🔗

If you choose to write your program in a separate text editor first, we recommend one like Sublime Text . Sublime Text gives you a lot of options when writing your program, and it is easy to copy and paste your Sublime Text document directly into a GuidedTrack program. Make sure that when you indent text using the "Tab" button of your keyboard, the program generates a tab and not spaces. In the case of Sublime Text 3 , the setting translate_tabs_to_spaces needs to be set to "false".

There are even GuidedTrack syntax highlighters you can download to use with Sublime, Atom, or other text editors, so that your code is colored similarly to the way it appears on GuidedTrack.

Certain text editors, such as Microsoft Word, sometimes cause formatting errors and you may find that your indentations have been altered. If you do wish to use Microsoft Word for writing your programs we've created some recommendations to help you have the most success.


Next: