Page 1 of 9

[Script] CodeQuickTester - Write and run code without saving to a temporary file

Posted: 26 Jan 2015, 11:37
by GeekDude
CodeQuickTester

CodeQuickTester is a portable single-file script editor that allows you to write code, and then run it without having to save to a temporary file.

It supports many powerful features and is tightly integrated with the AutoHotkey language and community.

To learn more about what it does, look in the features section of this document.

Image
Old Image | Example script output


Features

  • Requires no external dependencies and is completely self contained (one file!)
  • Allows you to run code you've written without saving to a temporary file¹
  • Uses a pure-AHK code editing control that supports custom syntax highlighting
  • Integrates with the help file to provide always up-to-date syntax tips²
  • Provides suggestions for automatic keyword completion using built in keywords and ones pulled from your script
  • Includes tools to help you format your code, such as an automatic re-indentation tool
  • Can have multiple instances of it be run at the same time
  • Integrates with the forum and live chat³
  • Can open existing scripts from a file, from a link, or by drag and drop
  • Can quickly switch between AutoHotkey versions from a simple menu
  1. Current versions of Wine for Linux do not support this feature
  2. If running in a portable environment, make sure AutoHotkey.chm is in the same directory as CodeQuickTester
  3. Requires some additional setup



Supported Platforms

  • AutoHotkey v1.1 or the equivalent AutoHotkey_H
  • Known to work with Windows 7 and above
  • Help file integration requires Internet Explorer 8 or above


Additional Setup (Optional)

Set as the default script editor
Spoiler


Set up forum integration
Spoiler


Create a separate settings file to save your settings between updates
Spoiler


Compilation instructions
Spoiler



Related Projects

MultiTester.ahk - Create responsive desktop applications using HTML, CSS, JS, and AHK!

RichCode.ahk - A pure-AHK code editing control that supports custom syntax highlighting




Releases

The latest version can always be found on the GitHub release page.

:!: IMPORTANT :!:

Make sure to download using the link labeled CodeQuickTester_vX.Y.ahk or CodeQuickTester_vX.Y.exe.

Downloading from the link Source Code will not include critical libraries required for the script to function.

:!: IMPORTANT :!:

Re: CodeQuickTester

Posted: 26 Jan 2015, 15:44
by joedf
Nice you finally posted it!

Re: CodeQuickTester

Posted: 26 Jan 2015, 16:24
by GeekDude

Re: CodeQuickTester

Posted: 26 Jan 2015, 18:58
by joedf
But i mean your updated version :)

Re: CodeQuickTester

Posted: 26 Jan 2015, 19:06
by GeekDude
Well I'm glad you like it, though! Interesting thing about running scripts dynamically. File loops get $CONIN and $CONOUT as listed in the script's directory.

Re: CodeQuickTester

Posted: 26 Jan 2015, 23:11
by enthused
Now this is very nice and very compact too.
Thank you GeekDude

Re: CodeQuickTester

Posted: 26 Jan 2015, 23:41
by GeekDude
WARNING: It will throw errors if you try to run a script with unicode characters in it. See here.

Edit: Fixed

Re: CodeQuickTester

Posted: 26 Jan 2015, 23:49
by joedf
Lol

Re: CodeQuickTester

Posted: 27 Jan 2015, 15:47
by GeekDude
Now works with unicode (in theory). Thanks, Coco!

Re: CodeQuickTester

Posted: 28 Jan 2015, 10:39
by Coco
Simple wish: perhaps add another edit control to allow passing of command line parameters.

Re: CodeQuickTester

Posted: 28 Jan 2015, 10:40
by GeekDude
I'll throw in a floating dialog for it.

Edit: Dialog created

Re: CodeQuickTester

Posted: 28 Jan 2015, 13:59
by cyruz
Very nice! I can finally stop creating tmp.ahk & test.ahk everywhere :D :D

Re: CodeQuickTester

Posted: 28 Jan 2015, 15:32
by boiler
^ Yes, now I can out of the habit of littering my desktop with all these little test scripts I write and try from from forum posts. Love this.

Re: CodeQuickTester

Posted: 28 Jan 2015, 15:45
by GeekDude
Nevermind about my mention of $CONIN and $CONOUT. I'm just an idiot who was using those instead of CONIN$ and CONOUT$, thus causing files to actually be created and my print function to not work.

Re: CodeQuickTester

Posted: 28 Jan 2015, 23:25
by Soft
I really like this! good work

Re: CodeQuickTester

Posted: 29 Jan 2015, 10:33
by GeekDude
Thanks for the compliment!

Re: CodeQuickTester

Posted: 29 Jan 2015, 11:20
by GeekDude
Update: Removed /ErrorStdOut. Interestingly I hadn't noticed the implications of having it in there without actually handling the errors until now.

Re: CodeQuickTester

Posted: 29 Jan 2015, 11:29
by cyruz
What about an integration with your console class so that the user can redirect the output there?

Re: CodeQuickTester

Posted: 29 Jan 2015, 11:33
by GeekDude
Because that would ruin the lightweight single-file thing I'm going for. Besides, you don't actually need the console class unless you want to do crazy stuff. Simple console output can be done in two lines:

Code: [Select all] [Download] GeSHi © Codebox Plus

DllCall("AttachConsole") ; Top of script
FileOpen("CONOUT$", "w").Write("Some text") ; Wherever you want to print


However, this wouldn't really help much, seeing as there's already a pretty good built-in method of showing the user error messages.

Re: CodeQuickTester

Posted: 29 Jan 2015, 11:49
by boiler
What's the script directory? What if an app creates .ini files or something in the script directory. Where do they go? Sorry if you said that already. I couldn't find that mentioned.