# \[Tool\] - Online Choicescript Tester

**URL:** <https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174>\
**Category:** ChoiceScript Help\
**Created:** [March 2, 2013, 3:52pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174 "2013-03-02T15:52:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [March 2, 2013, 3:52pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/1 "2013-03-02T15:52:09Z")

</div>

**UPDATE**  
I no longer update or actively support the Online Choicescript Tester.  
Please see the [Choicescript IDE](http://www.choiceofgames.com/forum/discussion/2796/tool-choicescript-development-environment) instead.

* * *

I’ve wanted to do something like this for a while now, but only just got around to it.  
It’s a very simple tool in both design and purpose - it basically allows you to copy and paste choicescript code into a textbox on a web page and ‘run’ that code straight away in your browser, saving you the hassle of opening up your text editor and messing around with files or making fresh copies of choicescript.

It’s really intended for just quickly testing out simple code, perhaps an example someone posted in a thread or some standalone stuff on the wiki (my mini-scenes system will run in it for e.g.: [http://choicescriptdev.wikia.com/wiki/System\_mini-scenes](http://choicescriptdev.wikia.com/wiki/System_mini-scenes)).

It really is just a tool of convenience I wanted for personal use, but I thought I may as well share it with everyone else too.

It has its limitations of course, you can’t set (and thus, use) global variables, scene navigation (\*finish, \*goto\_scene etc). Apart from that, it uses a proper a up to date version of CS to run the code, I’ve just changed where it sources the code from, so everything should work just fine (and has for me so far).

If you’re curious and want some examples, feel free to copy and paste the following code snippets into the tester (it runs fine even with the pre tag generated line breaks, though formatting is unavoidably weird).

## **Capitalization**

```

*temp var
*set var "capitalization is cool"

${var}
$!{var}
$!!{var}

```

* * *

## **A Simple Loop**

```

*temp n
*set n 0

*label loop
*set n + 1
${n}
*if (n < 10)
 *goto loop

```

* * *

## **A Choice**

```

What is your favourite colour?
*fake_choice
  #Red
  #Blue
  #No! Yell-

Very good.

```

* * *

And here’s the link: [https://dl.dropbox.com/u/7840892/CJW/choicescript/tools/online-cs-tester/mygame/input.html](https://dl.dropbox.com/u/7840892/CJW/choicescript/tools/online-cs-tester/mygame/input.html)

---

<div class="post-metadata">

**Author:** ![hyperguy](https://avatars.discourse-cdn.com/v4/letter/h/e9c0ed/32.png) [@hyperguy](https://forum.choiceofgames.com/u/hyperguy)\
**Post date:** [March 2, 2013, 4:02pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/2 "2013-03-02T16:02:05Z")

</div>

Sick u rock

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [March 2, 2013, 4:28pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/3 "2013-03-02T16:28:16Z")

</div>

@hyperguy Thanks, is it useful?

Also I forgot the pre tags on the loop snippet:

```

*temp n 
*set n 0 

*label loop 
*set n + 1 
${n} 
*if (n < 10) 
 *goto loop 

```

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [March 2, 2013, 6:47pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/4 "2013-03-02T18:47:21Z")

</div>

I added an option to automatically remove blank lines, so it handles copy and pasta from the forums better (the pre tags add extra line breaks).

If anyone has any further ideas for additions or adjustments, please do let me know! 🙂

---

<div class="post-metadata">

**Author:** ![lordirishdas](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirishdas/32/381_2.png) [@lordirishdas](https://forum.choiceofgames.com/u/lordirishdas)\
**Post date:** [March 2, 2013, 7:05pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/5 "2013-03-02T19:05:44Z")

</div>

You rock as always.

---

<div class="post-metadata">

**Author:** ![fantom](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fantom/32/8537_2.png) [@fantom](https://forum.choiceofgames.com/u/fantom)\
**Post date:** [March 3, 2013, 1:29am UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/6 "2013-03-03T01:29:15Z")

</div>

@CJW You a web developer or something? You seem really good at this code stuff.

---

<div class="post-metadata">

**Author:** ![HoraceTorys](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/horacetorys/32/22825_2.png) [@HoraceTorys](https://forum.choiceofgames.com/u/HoraceTorys)\
**Post date:** [March 3, 2013, 3:13am UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/7 "2013-03-03T03:13:54Z")

</div>

That is very nifty, thank you.

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [March 3, 2013, 5:52am UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/8 "2013-03-03T05:52:51Z")

</div>

@lordirishdas @HoraceTorys Thanks!

## @fanntom An aspiring one, perhaps. Thank you for the vote of confidence! 🙂

Would anyone prefer this if it displayed the game and code side by side, as opposed to opening the game in a new window?

---

<div class="post-metadata">

**Author:** ![archene](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/archene/32/198592_2.png) [@archene](https://forum.choiceofgames.com/u/archene)\
**Post date:** [March 10, 2013, 12:39am UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/9 "2013-03-10T00:39:17Z")

</div>

@CJW It would be good if the code was shown on the bottom and the game opened above it.

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [March 12, 2013, 3:19pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/10 "2013-03-12T15:19:41Z")

</div>

@archene There’s a side-by-side version [here](https://dl.dropbox.com/u/7840892/CJW/choicescript/tools/online-cs-tester%20-%20copy/mygame/input.html) now. I’m not sure having the text below it would look as good, if you had a lot of lines of code you’d be constantly scrolling back and forth.

---

<div class="post-metadata">

**Author:** ![Caddmuss](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/caddmuss/32/424_2.png) [@Caddmuss](https://forum.choiceofgames.com/u/Caddmuss)\
**Post date:** [March 26, 2013, 6:39pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/11 "2013-03-26T18:39:04Z")

</div>

This is fabulous.

Way easier to test ideas with this. And map out ChoiceScript stuff in general.

Bookmarking it for sure.

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [March 28, 2013, 11:16am UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/12 "2013-03-28T11:16:00Z")

</div>

@Caddmuss - Thanks! Glad you like it.  
Please let me know if you have any suggestions for improvement! 🙂

---

<div class="post-metadata">

**Author:** ![FairyGodfeather](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairygodfeather/32/16709_2.png) [@FairyGodfeather](https://forum.choiceofgames.com/u/FairyGodfeather)\
**Post date:** [March 28, 2013, 11:50pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/13 "2013-03-28T23:50:28Z")

</div>

I love this tool.

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [March 29, 2013, 10:17am UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/14 "2013-03-29T10:17:50Z")

</div>

@FairyGodfeather  
I’m really glad people are finding this useful! I thought for a while that I was the only one… x)  
Again, please do let me know if you think of any potential improvements!

---

<div class="post-metadata">

**Author:** ![Caddmuss](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/caddmuss/32/424_2.png) [@Caddmuss](https://forum.choiceofgames.com/u/Caddmuss)\
**Post date:** [March 30, 2013, 2:27am UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/15 "2013-03-30T02:27:16Z")

</div>

Without really thinking, I’d say something like integrating your syntax highlighter into it, but that would be like gilding a lily. This is perfect the way it is.

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [March 30, 2013, 1:10pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/16 "2013-03-30T13:10:58Z")

</div>

@Caddmuss That’s definitely something I’ll consider, thanks for the feedback! 🙂

---

<div class="post-metadata">

**Author:** ![FairyGodfeather](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairygodfeather/32/16709_2.png) [@FairyGodfeather](https://forum.choiceofgames.com/u/FairyGodfeather)\
**Post date:** [October 8, 2013, 4:28pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/17 "2013-10-08T16:28:53Z")

</div>

I’m bumping this because it’s such a useful tool. I find it extremely helpful for doing small sections of code.

The side by side version isn’t working anymore though. Can that be fixed?

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [October 8, 2013, 4:53pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/18 "2013-10-08T16:53:08Z")

</div>

My bad, I restructured my dropbox a while back and never updated the link! Here you go 🙂  
[https://dl.dropboxusercontent.com/u/7840892/CJW/choicescript/tools/online-cs-tester-side-by-side/mygame/input.html](https://dl.dropboxusercontent.com/u/7840892/CJW/choicescript/tools/online-cs-tester-side-by-side/mygame/input.html)

Thanks for the bump, always good to know when things are proving useful! 😃

Edit: The side by side one seems borked, I’ll look into (sorry!)…  
Edit2: And fixed, though I’m not sure how up-to-date the testers are so if anyone experiences any problems using the new commands, please let me know and I’ll update them!

---

<div class="post-metadata">

**Author:** ![Caddmuss](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/caddmuss/32/424_2.png) [@Caddmuss](https://forum.choiceofgames.com/u/Caddmuss)\
**Post date:** [October 9, 2013, 12:02am UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/19 "2013-10-09T00:02:09Z")

</div>

Yay, the 2nd version’s fixed. I noticed it went offline a while back, but since the original was working, I just used that one.

---

<div class="post-metadata">

**Author:** ![FairyGodfeather](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairygodfeather/32/16709_2.png) [@FairyGodfeather](https://forum.choiceofgames.com/u/FairyGodfeather)\
**Post date:** [October 16, 2013, 10:00pm UTC](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174/20 "2013-10-16T22:00:16Z")

</div>

Bumping this thread back to the main page since I just linked it to a couple of people. The choicescript tester is amazing! I think it’s one of the most valuable tools for coding out there.

[Next page](https://forum.choiceofgames.com/t/tool-online-choicescript-tester/1174.md?page=2)
