Hi,
I have an ancient version of PrimalScript 2009!! Probably not many people still using that
In an effort to get some value out of it I'm trying to set it up as my scripting environment for Logstash, which is, more or less, Ruby.
Works okay - but I'm hitting a problem with getting PS to execute and run the code. This is extremely easy to do in Sublime Text and even Notepad++ but I can't seem to achieve what I need in PS and would appreciate some advice about whether its possible or not.
When I want to run my Logstash code I need to call "C:\<myfolder>\Logstash\bin\logstash.bat" + several simple params This executes the .bat file with the params I send, obviously one of them being the name of the Logstash script I am working on in PS at the time.. and Logstash just runs. Now in Sublime and N++ I can even capture the output from that run and see the results. The problem is that I see no way to either:-
1. Add a tool or build system in PS2009
or
2. Modify an existing tool to accept the .bat instead of the .exe
Is this even possible? I have fond memories of using PS back in the early days of Powershell and would really like to use it again, but can't seem to find a spare $400 to upgrade just now, sadly.
Any suggestions?
Thanks,
Stuart
PrimalScript build with .bat file
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: PrimalScript build with .bat file
2009 Oh my. I do not know if I remember that UI.
Tools, Options,languages, and set the script interpreter.
It should look similar to this:
Additionally, you could add the batch file to the tools browser on the left.
Tools, Options,languages, and set the script interpreter.
It should look similar to this:
Additionally, you could add the batch file to the tools browser on the left.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: PrimalScript build with .bat file
Thanks Alexander.
I can get the ruby interpreter to recognize the extension - so that is good. Hello syntax highlighting.
Adding the batch file as a tool works too. I can now execute the 'tool' and collect the output back to the built in console. Which is wonderful. Here is the "but..."...but when the tool executes it feels to me as though the tool is running in the same thread as the PS UI so everything freezes. I cannot stop the tool from running or even click anything till the Logstash run finishes. If I am running across a lot of data that can take several minutes - even though I may only need to see a couple of lines output on the console (json) to know whether or not I'm getting what I need.
Any way to configure the tool to run in a separate thread? Or even to stop the tool from executing would be more than acceptable?
Sorry to ask these questions about a product which is so old. Its just the PS UI remains so classic and pleasant to work in, I would really like to get some use out of it for this.
Thanks,
Stuart
I can get the ruby interpreter to recognize the extension - so that is good. Hello syntax highlighting.
Adding the batch file as a tool works too. I can now execute the 'tool' and collect the output back to the built in console. Which is wonderful. Here is the "but..."...but when the tool executes it feels to me as though the tool is running in the same thread as the PS UI so everything freezes. I cannot stop the tool from running or even click anything till the Logstash run finishes. If I am running across a lot of data that can take several minutes - even though I may only need to see a couple of lines output on the console (json) to know whether or not I'm getting what I need.
Any way to configure the tool to run in a separate thread? Or even to stop the tool from executing would be more than acceptable?
Sorry to ask these questions about a product which is so old. Its just the PS UI remains so classic and pleasant to work in, I would really like to get some use out of it for this.
Thanks,
Stuart
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: PrimalScript build with .bat file
Your tool already runs in a separate process.
In 2009, when you go back to the script engine dialog, you should be able to configure your tool as a "Script compiler". Look at the options in the combobox.
In 2009, when you go back to the script engine dialog, you should be able to configure your tool as a "Script compiler". Look at the options in the combobox.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.