
上QQ阅读APP看书,第一时间看更新
Time for action — opening a sample script
Opening an existing script can be done through several methods. One is through the toolbar. Follow the given steps:
- Click on the Open icon in the toolbar:
Next, you will see a file dialog where you can select a
.Monkey
file to be opened. - Navigate, within the dialog, into the
bananas
folder of Monkey's main directory.There, you have subfolders from some authors of sample scripts.
- Head to the
mak
folder, and from within that, to thefirepaint
folder. Inside, you will find thefirepaint.Monkey
file. - Select it and click on the Open button in the File dialog. Voila! Monk just opened the selected script:
- Of course, there are other ways to open a script. For example, you can double-click on a filename inside the Nav tree view.
What just happened?
You have opened your first Monkey script. Good job! Please note how the GUI has changed. In the top of Monk, you see the file path of your currently visible script. Also, for each script you open or create, Monk creates a new tab inside the code area. In our example, this tab is named firepaint.Monkey. If you have several scripts open at once, you can switch between them by clicking on the tab header or press Ctrl + the left/right key on Windows or cmd + the left/right key on OSX.