Board Logo
« Setting Up External Programs »

Welcome Guest. Please Login or Register.
Jan 18th, 2018, 3:41pm


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Problems installing JB? Read the Vista/Win7 Installation FAQ

« Previous Topic | Next Topic »
Pages: 1 2  Notify Send Topic Print
 hotthread  Author  Topic: Setting Up External Programs  (Read 662 times)
thejoecole
Member in Training
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 29
xx Setting Up External Programs
« Thread started on: Jun 19th, 2017, 1:50pm »

In going through the user preferences setup... specifically adding a 3rd party editor through the Setup External Program option and I'm running into a glitch.

I can add the label for my editor (VS Code) and then browse for the program filename with no issue. I click close and then restart Just BASIC as prompted. Then from the Run menu I select VS Code, but I get an error message.

The window has crashed

We are sorry for the inconvenience! You can reopen the window to continue where you left off.

[Reopen] [Close]

I only have this issue with Just BASIC. It works fine in LB4.04 Pro and in LB 4.5.1.

Thoughts?
User IP Logged

Joe Cole
-------------------------
Just BASIC v1.01
LibertyBASIC v4.5.1
Windows 10 Home 64-bit/Linux Mint 18.2 - Intel Core i3, 2.4GHz, 8 gig RAM
-------------------------
Consumer of Caffeinated Products
Hobby Programmer Wannabe
tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: Setting Up External Programs
« Reply #1 on: Jun 19th, 2017, 2:10pm »

(find justbasic1.ini in Just Basic folder. Make a copy, just for a case)
Open
justbasic1.ini
in text editor.
Find a line calling VS Code.
Open whatever INI file in LB that works.
Fix line in JB INI file along working example from LB INI.
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
thejoecole
Member in Training
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 29
xx Re: Setting Up External Programs
« Reply #2 on: Jun 19th, 2017, 2:46pm »

Well, that's interesting...

Unfortunately it didn't work. It seems that the entry for VS Code in the Just BASIC ini file is exactly the same as what's in my LB 4.04 Pro and LB 4.5.1 ini files.

VS Code
C:\Program Files (x86)\Microsoft VS Code\Code.exe

User IP Logged

Joe Cole
-------------------------
Just BASIC v1.01
LibertyBASIC v4.5.1
Windows 10 Home 64-bit/Linux Mint 18.2 - Intel Core i3, 2.4GHz, 8 gig RAM
-------------------------
Consumer of Caffeinated Products
Hobby Programmer Wannabe
tooanalytical
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1739
xx Re: Setting Up External Programs
« Reply #3 on: Jun 19th, 2017, 3:26pm »

What?
on Jun 19th, 2017, 2:10pm, tsh73 wrote:
(find justbasic1.ini in Just Basic folder. Make a copy, just for a case)
Open
justbasic1.ini
in text editor.
Find a line calling VS Code.
Open whatever INI file in LB that works.
Fix line in JB INI file along working example from LB INI.

Again, WHAT?
User IP Logged

Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3151
xx Re: Setting Up External Programs
« Reply #4 on: Jun 20th, 2017, 01:37am »

Perhaps it is the space in the file name that is causing the problem. In this link the exe file is called code, no vs. Also you may need to pass command line arguments to get code.exe to open the file you wish in the location your project exists.

https://code.visualstudio.com/docs/editor/command-line

For starters just try code instead of vs code and see if the editor starts.


Also, what is your installation path, where does Just BASIC reside and where are your .bas projects filed? I am thinking you may need to add a command line argument to use the current directory or specify the path to a file. It may be code.exe is trying to open a file to edit within program files (x86) directory which is illegal these days.
« Last Edit: Jun 20th, 2017, 01:51am by Rod » User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: Setting Up External Programs
« Reply #5 on: Jun 20th, 2017, 07:27am »

Quote:
WHAT?

Aren't you know that external program setup is stored in JB INI file?
It was alwas like this - if there is a human-readable text INI file, you just open it in texeditor and fix.
No big deal.

So I'm really surprised at your surprise.

EDIT
AAARGH
!!I TOLD make backup copy first!!
I just opened "justbasic1.ini" in JB itsef, modified then saved. It got 0-lengthed.
So I recreated it anew - setting up external programs.
And spaces apparently not a problem, like in this piece
Code:
conText
C:\Program Files\ConTEXT\ConTEXT.exe
Error log
notepad.exe C:\progs\Just BASIC v1.01\error.log
 
« Last Edit: Jun 20th, 2017, 07:28am by tsh73 » User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3151
xx Re: Setting Up External Programs
« Reply #6 on: Jun 20th, 2017, 09:30am »

Ok, I downloaded VS Code and set it up in Just BASIC Setup dialog as an external program and clicking on Run gives me the option to run VS Code. It starts and runs just fine.

I am on Win10 with Just BASIC installed to "C:\BASIC\Just BASIC v1.01"
User IP Logged

thejoecole
Member in Training
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 29
xx Re: Setting Up External Programs
« Reply #7 on: Jun 20th, 2017, 10:41am »

The first thing I thought about was the extra spaces in the file path (shown earlier). I ruled it out as an issue since the path is the same in my LB / LBPro .ini files and it works fine in my LB instances.

VS Code was already in my system path, so changing the full path for the program filename to just "code" gave me the same result. VS Code starts - then hangs up giving me "The window has crashed" error. Selecting the "reopen" option doesn't work, so I just select "close" and exit out.

My only other thought on the subject is to consider how old Just BASIC is compared to the newer versions of LB & LB Pro. It may just be a Microsoft compatibility issue. I'm not stressing over using VS Code... just playing with the JB settings.

I setup Notepad++ and Meld (a diff/merge tool) as external programs to run and have had no issues.
User IP Logged

Joe Cole
-------------------------
Just BASIC v1.01
LibertyBASIC v4.5.1
Windows 10 Home 64-bit/Linux Mint 18.2 - Intel Core i3, 2.4GHz, 8 gig RAM
-------------------------
Consumer of Caffeinated Products
Hobby Programmer Wannabe
thejoecole
Member in Training
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 29
xx Re: Setting Up External Programs
« Reply #8 on: Jun 20th, 2017, 10:54am »

Rod,
Thanks for the update! I just installed JB to a new directory C:\Basic\Just BASIC v1.01 and setup VS Code as an external program and it all runs as expected now.

It would seem moving JB to a new install directory did the trick. I had it installed in C:\Program Files (x86)\...

Amazing how changing directories worked out grin

It's curious that both of my LB / LBPro instances are in the C:\Program Files (x86)\ directory and didn't have this issue.

Thanks for the troubleshooting help!
User IP Logged

Joe Cole
-------------------------
Just BASIC v1.01
LibertyBASIC v4.5.1
Windows 10 Home 64-bit/Linux Mint 18.2 - Intel Core i3, 2.4GHz, 8 gig RAM
-------------------------
Consumer of Caffeinated Products
Hobby Programmer Wannabe
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3151
xx Re: Setting Up External Programs
« Reply #9 on: Jun 20th, 2017, 12:02pm »

It is all explained in the instal FAQ at the head of the forum. Liberty is now Windows compatible and aware of the program files protection. Just BASIC not yet, so there is a need to instal to something other than the program files directory.
User IP Logged

tooanalytical
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1739
xx Re: Setting Up External Programs
« Reply #10 on: Jun 20th, 2017, 6:29pm »

on Jun 20th, 2017, 07:27am, tsh73 wrote:
Aren't you know that external program setup is stored in JB INI file?
It was alwas like this - if there is a human-readable text INI file, you just open it in texeditor and fix.
No big deal.

So I'm really surprised at your surprise.

EDIT
AAARGH
!!I TOLD make backup copy first!!
I just opened "justbasic1.ini" in JB itsef, modified then saved. It got 0-lengthed.
So I recreated it anew - setting up external programs.
And spaces apparently not a problem, like in this piece
Code:
conText
C:\Program Files\ConTEXT\ConTEXT.exe
Error log
notepad.exe C:\progs\Just BASIC v1.01\error.log
 


I did not understand your list of instruction steps. Not clear, but how I could not say, so I could only ask "WHAT?"
User IP Logged

tooanalytical
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1739
xx Re: Setting Up External Programs
« Reply #11 on: Jun 20th, 2017, 6:31pm »

I am further confused from the referencing of VS , for Visual Studio. I thought that was for Visual BASIC, or for other Microsoft programming products.
User IP Logged

thejoecole
Member in Training
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 29
xx Re: Setting Up External Programs
« Reply #12 on: Jun 20th, 2017, 9:02pm »

Yep... VS Code (Visual Studio Code) is a Microsoft product. It's a pretty decent editor which I used for a Python class last year. I like it because it's free and also has a Linux version.

https://code.visualstudio.com/

I've been going through the book "Programming for the Absolute Beginner, 2nd edition" which uses Just BASIC and was in the section discussing all the preference options. That's how I came to adding another editor to the external programs. Normally I just use LB and JB's editor which works well.
User IP Logged

Joe Cole
-------------------------
Just BASIC v1.01
LibertyBASIC v4.5.1
Windows 10 Home 64-bit/Linux Mint 18.2 - Intel Core i3, 2.4GHz, 8 gig RAM
-------------------------
Consumer of Caffeinated Products
Hobby Programmer Wannabe
tooanalytical
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1739
xx Re: Setting Up External Programs
« Reply #13 on: Jun 20th, 2017, 10:55pm »

That or something like it may be what I should try. I am comfortable using Just BASIC in the already active Just BASIC product editor. One thing I have NOT yet done or tried, is to try using Just BASIC with a different (external) editor. I would not know what to do to set up what with what. I then read the procedure which tsh73 said, but I did not understand it. I had setup the CHM help file as an external file, but it was less tricky.

on Jun 20th, 2017, 9:02pm, thejoecole wrote:
Yep... VS Code (Visual Studio Code) is a Microsoft product. It's a pretty decent editor which I used for a Python class last year. I like it because it's free and also has a Linux version.

https://code.visualstudio.com/

I've been going through the book "Programming for the Absolute Beginner, 2nd edition" which uses Just BASIC and was in the section discussing all the preference options. That's how I came to adding another editor to the external programs. Normally I just use LB and JB's editor which works well.
User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: Setting Up External Programs
« Reply #14 on: Jun 21st, 2017, 02:00am »

re: un-clear steps
it is not "normal set-up" steps.
It is troubleshooting steps, you don't need them.

As for me, I routinely use two external editors with JB
For small programs I use JB itself
If program gets longer, I use ConTEXT (my default editor)
and if program gets big enough to warrant opening it in two windows side by side I use Notepad++.
And I did not set them in external programs - only thing I need is "Reload program on activate" checkbox set in JB Preferences.
I just fix program in external edotor - save it - switch to JB (it reloads fresh version) - and runt it.
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
Pages: 1 2  Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls