How can I make PrimalScript execute [fill in script language here]?
- Written by Alexander Riedel
- Last Updated: 22 April 2016
- Created: 18 April 2013
- Hits: 8550
One question keeps popping up in our support forums and inboxes: How can I make PrimalScript execute my AutoIt, HTML, PigLatin <fill in any other script language here> script?
This is fairly simple as long as you know what the actual language engine is. We will use AutoIt and HTML as an example for this post.
If you load one of the AutoIt examples and just press Ctrl+F5 to run the script you get an error message.
Since AutoIt, unlike Windows Script Host or PowerShell, changes the executable name of the engine for each major version, you’ll have to go in and change the name accordingly. You do that at File – Options – Environment – Languages.
Select AutoIt3 from the list and edit the engine name to Autoit3.exe or Autoit3_x64.exe if you want to run your scripts in 64 bit mode.
Now try and run it. Still won’t work, right? We played a little trick on you to illustrate the need for a full path to a script engine versus just having to enter the executable name. If the folder where the engine resides is not in the PATH environment variable then you need to specify the fully qualified path to the executable here: C:\Program Files (x86)\AutoIt3\Autoit3_x64.exe
And there you go:
Simple enough. Now on to HTML. If you only want to preview your HTML files in one browser, e.g. Internet Explorer, that is pretty simple. Go to the same options page, select HTML and navigate to the iexplore folder.
And there it is:
If you need to test your HTML pages with a variety of browsers, we suggest a different approach. Just use the Tools Browser to create a new group called “Browsers” and add all your usual suspects.
Now you can go and add your browsers to that group:
Make sure to enclose the $File$ parameter in quotes, otherwise you get an error if your pathname contains spaces.
Now if you press each of these icons with your HTML file active, it will show up in the corresponding browser.
This article and screenshots apply to PrimalScript v6.5.143 and newer. Screenshots may vary per version.