Bored? Want something to do while stuck indoors?

Discuss anything not covered in another forum (life, the universe etc.)... Please keep it PG-13 and avoid spam.
Post Reply
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Bored? Want something to do while stuck indoors?

Post by Norm »

http://www.justbasic.com/

Hello and good day to everyone at speedguide.
This is going to sound like an advertisement because, well, it is.
I'm hoping my status here as a senior member allows me the privilege of promoting this here.
And I believe there may be a few people here who could absolutely love it as much as I do.
It took the boredom of isolation away for me, and has since given me tons of things to do.

What am I talking about? I'm talking about Basic programming, like the old days of Basic, but much much better and far far faster execution. Basic as many of you know is an easy language to pick up, even for a person who has never even tried to do any programming. The old Basic was interpreted, this "Just Basic" is compiled.
I remember years ago a thread here where many members posted a few lines of Basic, so I know there are some here who can already work in the language.

A little about Just Basic -- http://www.justbasic.com/
I won't post a link to the forums. It is easy enough to find. And very helpful members there as well.

It is an IDE with color coded text to help highlight commands, variable, strings, etc.
It has a Form editor something like a trimmed down Visual Basic form editor where you can add buttons (with pictures too), check boxes, text boxes, radio buttons, group boxes, graphics boxes, list boxes, combo boxes, and a text editor (yes a built in text editor already made to add to your code if need be).
Also within the Form editor dwells a code generator to provide the code (shell) for the Form you build that helps to learn the syntax so you can just write your own once you catch on to the syntax.

In the IDE editor (where you write the code) there are options to debug your code, add external apps to the menu that you may want at hand, and to compile/Run your code. Of course there is much more to Just Basic, but I just want to provide some Basics (pun intended) to give you a good idea of it's capabilities, because they are limitless on a Windows PC, especially if you know Windows like most of us here do. Within the language of Just Basic one of the commands "Run" can pass tasks to CMD.EXE eg: run "cmd.exe /c start mspaint.exe", or use run to start one of your own projects, or any of the many Windows built in programs, and settings, plus run any exe file, not to mention editing the registry through cmd.exe etc etc etc (limitless, hear me?). There is also a built in, fairly extensive help file (html format for easy manoeuvring through it.).

You can do graphics, make games, use math as well to draw graphics, using 24 bit color, add pictures, use sprites, the list is long. One command allows mouse tracking (great for games), another scans the keyboard for input, and joystick support (gamers heaven)

You can access com ports to control external hardware.

Along with all the above and much more, links are provided to example code, forums, archives (this program is a few years old), recently (2 years ago) updated to Just basic v2.0.

Another reason I am promoting this is because, if the lack of new interest in this keeps drying up, there may never be another update. You see, the owners/developers have decided to use their time for their latest compilers, like Liberty Basic and Run Basic, which are paid for versions. Just Basic is free, and no royalties if you decide to distribute your apps and get paid for them (using JB's own dll files), and it's really all anyone would ever need to program just about anything on a Windows PC. In fact, I run it in Wine on Linux and it works just as well there too.

I ran into this gem a couple of months ago, and have already created a few programs with it that will run on any Windows machine. It's easy especially if you did some basic in "the old days", but still easy enough for the new guys\gals. My head is spinning with tons of ideas for the future.

Any way, that's that. I hope you guys like it, or at least give it a try. I think some of you will take to it like getting back on a bycycle. Be warned though, it's oject oriented, and a bit (just a bit) different than the old Basic.

Take care my friends, and if you, Philip decide to remove this post it will sadden me, but I'll understand
Sometimes rules are rules no matter who you are :)


peace out
Norm

P.S. I do NOT post this for any monetary gain, nor am I affiliated in any way with Just Basic.
I just want to share something that has got me excited, and help keep Just Basic alive that is all, and it's the truth.

If you take this down Philip, I heard someone say speedguide will be down for a month.
Ok, maybe I didn't hear that, but I heard some one might hate you if you do :D
User avatar
Easto
SG Elite
Posts: 5775
Joined: Sat Dec 02, 2000 12:00 am
Location: So. California

Post by Easto »

Norm, I'm glad you found something to help lift you out of these doldrums. I'm still searching.
User avatar
Philip
SG VIP
Posts: 11567
Joined: Sat May 08, 1999 5:00 am
Location: Jacksonville, Florida

Post by Philip »

Norm wrote: P.S. I do NOT post this for any monetary gain, nor am I affiliated in any way with Just Basic.
I just want to share something that has got me excited, and help keep Just Basic alive that is all, and it's the truth.
It's all good Normy :)
Norm wrote: If you take this down Philip, I heard someone say speedguide will be down for a month.
Ok, maybe I didn't hear that, but I heard some one might hate you if you do :D
Haha ook ;)


As to Basic, it was fun at some point in time, but I haven't touched in like 20 years, moved on to other languages. As for interpreted languages, I've used PHP for many years now, but I'd like to dabble more in Python.
Linux is user friendly, it's just picky about its friends...
Disclaimer: Please use caution when opening messages, my grasp on reality may have shaken loose during transmission (going on rusty memory circuits). I also eat whatever crayons are put in front of me.
๑۩۞۩๑
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

Philip wrote:It's all good Normy :)


Haha ook ;)


As to Basic, it was fun at some point in time, but I haven't touched in like 20 years, moved on to other languages. As for interpreted languages, I've used PHP for many years now, but I'd like to dabble more in Python.
Philip I can't even count or remember how many languages I've worked with over the years. One thing I do remember is how easy it was/is to sit down and write a fairly decent and working program in Basic, in a matter of a few minutes once you get the hang of it. It is possible to make an app like the TCP optimiser with this Just Basic.

Hey, thanks for bending the rules for me Philip.
Now that you have, I can tell you, I was only going to hate you for a day, maybe two. :)
Norm, I'm glad you found something to help lift you out of these doldrums. I'm still searching.
Easto, my old friend, it has brought me back to life. Using Just Basic along with my ole "batch files" I can do anything to Windows registry, or files etc. without even seeing that old black command window. It gives my mouse wheel a break, but now my keyboard is smoking all the time, once again. Not sure if you're a programmer, if not this is about the best and easiest way to start. Give it a shot until you find a better solution to the boredom. "Time flies when you're having fun" :)
User avatar
Easto
SG Elite
Posts: 5775
Joined: Sat Dec 02, 2000 12:00 am
Location: So. California

Post by Easto »

Norm, I dabbled in both VBA and VB but that was a long time ago. I was developing databases and other things in MS Office for our company.
User avatar
downhill
Posts: 34799
Joined: Sat Jan 15, 2000 12:00 pm
Location: My Own Private Idaho

Post by downhill »

Whoa hey Norm!!!!!
The tools of conquest do not necessarily come with bombs and explosions and fallout. There are weapons that are simply thoughts, attitudes, and prejudices to be found only in the minds of men. For the record, prejudices can kill and suspicion can destroy and a thoughtless, frightened search for a scapegoat has a fallout all of its own for the children and the children yet unborn and the pity of it is that these things cannot be confined to the Twilight Zone.
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

downhill wrote:Whoa hey Norm!!!!!
Good to see you're still around downhill :thumb:
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

So, has ANYONE tried it yet?
Anyone?

Come on Humbolt, you tried it didn't you :D
User avatar
Philip
SG VIP
Posts: 11567
Joined: Sat May 08, 1999 5:00 am
Location: Jacksonville, Florida

Post by Philip »

I am too burned out looking at code, I've been moving a few sites to a new server and switching functions from PHP 5 to 7.
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

Philip wrote:I am too burned out looking at code, I've been moving a few sites to a new server and switching functions from PHP 5 to 7.
ok, you get a pass.

I've been busy writing new code, wiping out the partition with that new code by mistake, building a mobile PC out of a raspberry pi, Building a new workshop here for word working, metal working, glass etc. And on top of that I've been busy posting ads in forums :D

And, I'm 64 years old now, not a young punk anymore lol
User avatar
Philip
SG VIP
Posts: 11567
Joined: Sat May 08, 1999 5:00 am
Location: Jacksonville, Florida

Post by Philip »

Norm wrote:ok, you get a pass.

I've been busy writing new code, wiping out the partition with that new code by mistake, building a mobile PC out of a raspberry pi, Building a new workshop here for word working, metal working, glass etc. And on top of that I've been busy posting ads in forums :D

And, I'm 64 years old now, not a young punk anymore lol
No vaccine for you! JK :)
User avatar
YeOldeStonecat
SG VIP
Posts: 51158
Joined: Mon Jan 15, 2001 12:00 pm
Location: Somewhere along the shoreline in New England

Post by YeOldeStonecat »

Wow...memories. I took a Basic class back in high school, did it on the first big Apple computers, saving data on cassettes, and later the 5.25" floppy disks.

Later on, I loved the game "Gorilla Basic"....in the Win3 days.
MORNING WOOD Lumber Company
Guinness for Strength!!!
User avatar
Philip
SG VIP
Posts: 11567
Joined: Sat May 08, 1999 5:00 am
Location: Jacksonville, Florida

Post by Philip »

YSCat!
It's been ages
User avatar
YeOldeStonecat
SG VIP
Posts: 51158
Joined: Mon Jan 15, 2001 12:00 pm
Location: Somewhere along the shoreline in New England

Post by YeOldeStonecat »

Philip wrote:YSCat!
It's been ages
I was down your way for a while. Had to drive back from FL....took 3x days, all the return flights last weekend got cancelled..and the rescheduled flights kept backing up for days. So...we kidnapped our rental car..and just drove north...all the way back to CT.

I put almost 2,100 miles on in 14x days.
We were down there in Anna Maria Island as usual (typically down there 3-4 times a year). Did a few drives south to Nokomis, Englewood, Placida, Boca Grande, Cape Haze. Was supposed to hit Bokelia/Matlacha, but didn't make it.

Couple of days in Clearwater Beach, and then...northbound! Drove by Jax...hear me beep?
MORNING WOOD Lumber Company
Guinness for Strength!!!
User avatar
Philip
SG VIP
Posts: 11567
Joined: Sat May 08, 1999 5:00 am
Location: Jacksonville, Florida

Post by Philip »

That's a lot of driving, heh.
Should've stopped for a brew.. Maybe next time - St. Augustine is great, it's like 40 min from me.

The beaches are pretty down south of Tampa Bay, it's much more breezy here on the East coast though.
Linux is user friendly, it's just picky about its friends...
Disclaimer: Please use caution when opening messages, my grasp on reality may have shaken loose during transmission (going on rusty memory circuits). I also eat whatever crayons are put in front of me.
๑۩۞۩๑
User avatar
YeOldeStonecat
SG VIP
Posts: 51158
Joined: Mon Jan 15, 2001 12:00 pm
Location: Somewhere along the shoreline in New England

Post by YeOldeStonecat »

Philip wrote: Should've stopped for a brew.. Maybe next time - St. Augustine is great, it's like 40 min from me.
Would have loved to, if it was just the wife and I. But had our daughter and her best friend that usually comes with us on vaca in FL....so...had to make fast time for the drive.
MORNING WOOD Lumber Company
Guinness for Strength!!!
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

YeOldeStonecat wrote:Wow...memories. I took a Basic class back in high school, did it on the first big Apple computers, saving data on cassettes, and later the 5.25" floppy disks.

Later on, I loved the game "Gorilla Basic"....in the Win3 days.
Lucky you. My first was a TRS-80 color computer from Radio Shack.
No storage at all for about a year. Had to leave it on, or lose it. An old friend at the mine had a Vic 20, same deal, but he managed to make a cassette recorder himself, and then added different gears to get it spinning faster. He was quite an electronics guy back then. We swapped code and rewrote for each others PC's
Those were the days :)

Let x =

As if x needed permission lol

ah gees, I forgot to say hi. Maybe I should wait till you wake up from the long sleep you're about to have.
Good to see you YeOlde :)
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

edieearth wrote:Wow, thanks for sharing. I am a new one of this forum but have already found a lot of interesting information. I'll probably check this link. I am interested in programming, especially cybersecurity. I would like to understand how spy and hacking apps are working and how to create my own spy app. I am speaking about something like these SMS trackers [ sms-tracker ] but I am not sure that it is possible for me to create something similar but it would be great to start with something primitive will be amazing. Maybe you can recommend me something to move in this direction, I'll be very glad. And I'll post my results on this forum if it is acceptable:)
If you are new to programming I would suggest downloading and installing Just Basic v2.0 and reading the tutorial and the help files, at least to some extent so you have a bit of knowledge of how it works. All languages have their quirks and syntax (spelling) to deal with.

My first project with JB 2 was to make a project organizer for JB 2.
With JB a user can convert the .bas file (JB source file) into a .tkn file for faster execution. In ordere to "run" this file on another PC without JB installed there are a few files it needs (dll files and sll files plus the runtime engine). Since I was writing quite a few programs I didn't want to go around collecting these dependant files every time I wrote a new program, so I made a program to do that for me. I will post this program code for you to have a look at because it uses many of the features of JB and will help you, learn the code syntax, checking file existence, creating files, deleting files, copying files, reading files along with a few other things like making a window with buttons and menus.

Take the code and play with it. Change one thing at a time and see how it affects the program.
This code should work on Win XP to Win 10 and also on Linux if WINE is installed.
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

'New Release of Version v.1.2.3-W March 31 2021 W = Windows 10 L = Linux\WINE
'#####################################################################
' Visit the Just Basic forums @ https://justbasiccom.proboards.com/ for more
' information on Just Basic or this program and many more, and learn
' more about programming with the 'easy to learn' Just Basic v2.0 language.
'#####################################################################
' Title$ = "Project Organizer v.1.2.3-W for Just Basic v2.0"
'Author xxgeek - a member of the Just Basic Forums
'##################################################################
' PP$ = "Purpose = To manage the projects created with Just Basic v2.0"
' Currently = It creates a directory named Just Basic Projects by default(user can change)
' in a directory of the users choice to store each project. Then it creates a directory in the
' Projects dir each time it is RUN using the name of the BAS file selected by the user
' selected (minus the .bas). It then gathers the necessary .DLL and .SLL, files and the
' jbrun2.exe runtime file, copies them to the new project dir and renames jbrun2.exe to the
' name of the .BAS file (minus the .bas) It also creates the TKN file in the new project folder.
' Allows user to add Folders to each project - bmp, media, apps or users choice name and
' Allows user to add files to each of these Folders. Allows user to add files to the root of the New project Folder.
' Allows user to remove the Source Code (.bas) from the new Project Dir.
' User can Run the new project, browse the project folder or the Just Basic Projects Folder.
' Allows user to open iexpress.exe to make self extracting exe installer
' Keeps memory of a log of User choice of Just Basic Projects Folder Path PO.ini' while also
'allowing user to change it. Thank you to all the members of the Just Basic Forums for
' your generosity and insightful helpful posts that made this possible. Special Mentions go
'to [tsh73] for getting me started with making the TKN , [B+], [Rod], [cundo], [bluatigro],
' [Enzo],[xcoder],[honky],[ntech] and some I may have forgotten, for their solicited and
' unsolicited posts on the forums that helped with learning the JB code syntax and structure,
' and of course Carl Gundel for giving away free of charge such a great program as Just Basic v2.0.
' Thank You Carl.
' Dream Plans = a whole slew of tools, abilities like downloading files (freeware etc). Using
' Windows to provide apps at our finger tips, like MSpaint, Notepad, Run, 3D Builder. Using
' Windows Registry to do things like change Windows settings on the fly, create shortcuts,
' change screen resolution etc etc etc), Also, I have seen code on these forums like a Sprite Maker, a Search Engine for the
' help files, a Code generator etc, etc that could be added.
'#########################################################


[restart]
titlebar "Project Organizer v.1.2.3-W for Just Basic v2.0"
'if user DestPath$ is logged already, use it
if fileExists(DefaultDir$, "PO.ini") then gosub [LogCheck]
if projects$ <> "" and DestPath$ <> "" then [checkjbpath]
if projects$ <> "" and DestPath$ = "" then [start] else a = a + 1
if projects$ = "" and DestPath$ = "" then a = a + 1


'projects$ = Default Just Basic Projects Folder (User Can Change Name When P.O. is Run First Time or if \ when user changes \ edits it)
projects$ = "Just Basic Projects" ' Default Name if user wants to use it
prompt "Name Your Just Basic Projects Folder" + chr$(13) + "Default is Just Basic Projects";projects$
if projects$ = "" then notice "No Name Given P.O. Closing" : end


[start]
res=fileExists(DefaultDir$,"PO.ini")
if res then [GetDestPath]
'PO.ini can be found in the Same Folder Project Organizer is Started From After First Run
'check for PO.ini file
open "PO.ini" for output as #log
if projects$ <> "" then #log projects$
if DestPath$ <> "" then #log DestPath$
close #log


if DestPath$ = "" then [GetDestPath] else a = a + 1
'Copy Projects Folder Path from PO.ini to become DestPath$ (Projects Folder)
ini$ = "PO.ini"
open ini$ for output as #logDestPath
if projects$ <> "" then #logDestPath$, projects$
if DestPath$ <> "" then #logDestPath, DestPath$
close #logDestPath
if DestPath$ = "" then a = a + 1 else [checkjbpath]


'ask user for choice of Projects Folder Location using FolderDialog window
[GetDestPath]
res = fileExists(DefaultDir$,"PO.ini")
if res then open "PO.ini" for input as #ini
while eof(#ini) = 0
x = x + 1
line input #ini, logged$(x)
log$ = logged$(x)
if left$(log$,2) = ":" then DestPath$ = log$ else projects$ = log$
wend
close #ini
if DestPath$ <> "" then [checkjbpath]
DestPath$ = FolderDialog$("Select Drive or Folder for JB Projects Folder)")
if right$(DestPath$, 1) = "" then DestPath$ = left$(DestPath$, len(DestPath$) - 1)
If DestPath$ = "" then notice "No Path Given = No Path Made (closing P.O.)" : end
'log the Chosen Path for JB Projects Folder
gosub [logDestPath]


a = a + 1 'I love adding 1 to a :D


[checkjbpath]
'check Just Basic v2.0 Default Install Dir for existence
JBpath$ = "c:\Program Files (x86)\Just Basic v2.0"
res=pathExists(JBpath$)
'if Just Basic v2.0 is NOT installed to it's Default Install Dir, get Path from User
if res then [go] else notice " Just Basic v2.0 was not installed to the default install folder."+chr$(13)+"Hit [ok], then Select the Folder Just Basic v2.0 is Installed"
JBpath$ = FolderDialog$("Select the Folder Where You Installed Just Basic v2.0")
if JBpath$ = "" then notice "No path given - closing Project Organizer" : end
'remove traling \ from Path given from FolderDialog function
'if right$(JBpath$, 1) = "" then JBpath$ = left$(JBpath$, len(JBpath$) - 1)


'check existence and JBPath$
res=pathExists(JBpath$)
if res then a = a + 1 else notice " Just Basic v2.0 was not was not found in ";JBpath$;" Restart JB Project Organizer - Try Again":end
[go]
JBexe$ = "jbasic.exe"
JBruntime$ = "jbrun2.exe"
DllList$="vbas31w.sll vgui31w.sll voflr31w.sll vthk31w.dll vtk1631w.dll vtk3231w.dll vvm31w.dll vvmt31w.dll"


'Checking all paths and file locations for existence (dll's, sll's, jbasic.exe, and jbrun2.exe)
res=fileExists(JBpath$,JBexe$)
if res then a = a + 1 else notice JBexe$;" Does not exist in ";JBpath$;" Closing P.O." : end
res=fileExists(JBpath$,JBruntime$)
if res then a = a + 1 else notice JBrun$;" Does not exist in ";JBpath$;" Closing P.O." : end
res=fileExists(JBpath$,"vbas31w.sll")
if res then a = a + 1 else notice " vbas31w.sll Does not exist in ";JBpath$;" Closing P.O." : end
res=fileExists(JBpath$,"vgui31w.sll")
if res then a = a + 1 else notice " vgui31w.sll Does not exist in ";JBpath$;" Closing P.O." : end
res=fileExists(JBpath$,"voflr31w.sll")
if res then a = a + 1 else notice " voflr31w.sll Does not exist in ";JBpath$;" Closing P.O." : end
res=fileExists(JBpath$,"vthk31w.dll")
if res then a = a + 1 else notice " vthk31w.dll Does not exist in ";JBpath$;" Closing P.O." : end
res=fileExists(JBpath$,"vtk1631w.dll")
if res then a = a + 1 else notice " vtk1631w.dll Does not exist in ";JBpath$;" Closing P.O." : end
res=fileExists(JBpath$,"vtk3231w.dll")
if res then a = a + 1 else notice " vtk3231w.dll Does not exist in ";JBpath$;" Closing P.O." : end
res=fileExists(JBpath$,"vvm31w.dll")
if res then a = a + 1 else notice " vvm31w.dll Does not exist in ";JBpath$;" Closing P.O." : end
res=fileExists(JBpath$,"vvmt31w.dll")
if res then a = a + 1 else notice " vvmt31w.dll Does not exist in ";JBpath$;" P.O. Closing":end


' setup a Window for User to Select a .bas File to Make a Project with
nomainwin
WindowWidth = 600
WindowHeight = 320
UpperLeftX=INT((DisplayWidth-WindowWidth)/2)
UpperLeftY=INT((DisplayHeight-WindowHeight)/2)
BackgroundColor$ = "lightgray"
ForegroundColor$ = "black"


'add some text ,some buttons, and a menu to the Window
statictext #main.header, "Project Organizer v.1.2.3-W for Just Basic v2.0", 130, 20, 590, 35
statictext #main.1, "Select a .bas file from your Just Basic v2.0 source collection", 10, 50, 590, 25
statictext #main.2, "Provide a Path to a Folder or Drive to put your Projects Folder", 10, 70, 590, 25
statictext #main.3, "Project Organizer moves DLL's \ SLL's \ jbrun2.exe to the New Project Folder", 10, 105, 590, 25
statictext #main.4, "Project Organizer renames the jbrun2.exe to Selected .bas file (removes.bas)", 10, 120, 590, 25
statictext #main.5, "Project Organizer makes the TKN file in the New Project folder ", 10, 135, 590, 25
statictext #main.info, "Select a working Just Basic Source Code File (.bas)", 115, 175, 590, 25
statictext #main.jbforums, "Visit the Just Basic Forums @ https://justbasiccom.proboards.com/", 125, 260, 590, 20
button #main.default, "Select File", [defaultClick],UL 170, 205, 135, 35
button #main.cancel, "Cancel", [cancelClick],UL 320, 205, 135, 35
menu #main, "Options", "Make TKN File ONLY", [tknonly], "Default Path to Just Basic Projects (You Type Path)", [editini], "Default Path to Just Basic Projects (Use FolderDialog))", [fdiaginiedit], "Exit Project Organizer", [quit.main]
menu #main, "Tools", "Check ANY .bas File for # of Lines", [lines], "Change Default Folder for Projects (You type the path)", [editini], "Default Path to Just Basic Projects (Use FolderDialog)", [fdiaginiedit], "Exit Project Organizer", [quit.main]
menu #main, "Help", "Help", [help], "About", [about]


'open the Window, and set some Fonts for each statictext, and buttons
open "Project Organizer v.1.2.3-W for Just Basic v2.0" for window_nf as #main
#main, "trapclose [quit.main]"
#main, "font Arial 10 bold"
#main.header, "!font Arial 10 bold"
#main.1, "!font Arial 10 bold"
#main.2, "!font Arial 10 bold"
#main.3, "!font Arial 10 bold"
#main.4, "!font Arial 10 bold"
#main.5, "!font Arial 10 bold"
#main.info, "!font Arial 10 bold"
#main.jbforums "!font Arial 8 bold"
#main.cancel, "!font Arial 10 bold"
#main.default, "!font Arial 10 bold"
#main.default, "!setfocus"
wait


' Use the filedialog function to allow user to select a source file (.bas)
[defaultClick]
filedialog "Open \ Select a Just Basic Source File (.bas) ", DefaultDir$; "\*.bas", fname$
if fname$ = "" then notice "No file selected, P.O. will now close" : close #main : end
for var1 = len(fname$) to 1 step -1
if mid$(fname$, var1, 1) = "" then var2 = var1 -1 : var3 = var2 - ((len(fname$))) : exit for
next var1
var3 = abs(var3)
orig$ = left$(fname$, var2)
fname0$ = right$(fname$, var3 -1)
for var4 = len(fname0$) to 1 step -1
if mid$(fname0$, var4, 1) = "." then var5 = var4 -1 : var6 = var5 - ((len(fname0$))) : exit for
next var4
var6 = abs(var6)
fnamenobas$ = left$(fname0$, var5)
' fname$ = Full Path of User Selected .bas file (including the filename.bas)
' fname0$ = Name of the Selected .bas File Only - eg ; filename.bas
' fnamenobas$ = Name of the Selected .bas File (without the .bas) - eg: filename


[begin]
'change text of main dialog window as the show begins
#main.header, "Creating Dirs, Copying Files to Project Dir"


' define DestPathU$ as the JB Projects Path Plus then Path of the Current Project Name
DestPathU$ = DestPath$;"";projects$


'define Destpath1$ as JB Projects\Current Project Folder
DestPath1$=DestPathU$;"";fnamenobas$


'Make Folders for Just Basic Projects and Current ProjectName
res = mkdir(DestPathU$)
res = mkdir( DestPath1$)


'make sure Folders were actuaally created
res=pathExists(DestPathU$)
if res then a = a + 1 else notice "Just Basic Projects Folder was NOT Created in ";DestPath$:close #main : end
res=pathExists(DestPath1$)
if res then a = a + 1 else notice "New Folder";fnamenobas$;" was NOT Created in ";DestPath1$:close #main : end
if fileExists(DestPath1$, fname0$) then kill DestPath1$;"";fname0$


'copy the project .bas file to this projects dir
open fname$ for input as #fname
open DestPath1$;"";fname0$ for output as #1
print #1, input$(#fname, lof(#fname));
close #fname
close #1


'check if the current project .bas file was copied to new dir
res=fileExists(DestPath1$,fname0$)
if res then a = a + 1 else notice fname0$; " Was not copied to ";DestPath1$;" P.O. will now close" : close #main : end
'################################################################################
'Create the TKN file. A good time to cross your fingers :D
'Getting to this pont cost me a new wig & 2 bottles of Rogain :D
RUN JBpath$;"";JBexe$;" -T -A ";DestPath1$;"";fname0$
'loop until TKN File is saved, and exists in the new project Folder
do
res = fileExists(DestPath1$,fnamenobas$;".tkn")
if res then exit do
scan
loop until res
'################################################################################


if fileExists(DestPath1$, JBruntime$) then kill DestPath1$;""; JBruntime$
'copy jbrun2.exe to Current Project Folder
open JBpath$;"";JBruntime$ for input as #file
open DestPath1$;"";JBruntime$ for output as #1
print #1, input$(#file, lof(#file));
close #file
close #1


'rename jbrun2.exe to name of User Selected .bas File - .bas +.exe
if fileExists(DestPath1$, fnamenobas$ + ".exe") then kill DestPath1$;"";fnamenobas$ + ".exe"
'Just Basic can't create\rename a file that exists, so if it does already exist - kill it (delete it)
name DestPath1$;"";JBruntime$ as DestPath1$;"";fnamenobas$ + ".exe"


'Copy the needed DLL and SLL files from Just Basic dir to New Project Dir
w$ = ""
i = 0
while 1
i = i + 1
w$=word$(DllList$,i)
if w$="" then exit while
from$=JBpath$;"";w$
to$=DestPath1$;"";w$
if fileExists(DestPath1$,w$) then kill DestPath1$;"";w$
open from$ for input as #file
open to$ for output as #1
print #1, input$(#file, lof(#file));
close #file
close #1
wend


'verify dll's sll's and 'jbrun2.exe' were copied to current project folder, and jbrun2.exe renamed
if res then a = a + 1 else notice " jbrun2.exe Does not exist on the given path -> ";JBpath$;"";JBruntime$;" J.B.P.O. will now close":end
res=fileExists(DestPath1$,"vbas31w.sll")
if res then a = a + 1 else notice " vbas31w.sll Was not created in --> ";DestPath1$;" J.B.P.O. will now close":end
res=fileExists(DestPath1$,"vgui31w.sll")
if res then a = a + 1 else notice " vgui31w.sll Was not created in --> ";DestPath1$;" J.B.P.O. will now close":end
res=fileExists(DestPath1$,"voflr31w.sll")
if res then a = a + 1 else notice " voflr31w.sll Was not created in --> ";DestPath1$;" J.B.P.O. will now close":end
res=fileExists(DestPath1$,"vthk31w.dll")
if res then a = a + 1 else notice " vthk31w.dll Was not created in --> ";DestPath1$;" J.B.P.O. will now close":end
res=fileExists(DestPath1$,"vtk1631w.dll")
if res then a = a + 1 else notice " vtk1631w.dll Was not created in --> ";DestPath1$;" J.B.P.O. will now close":end
res=fileExists(DestPath1$,"vtk3231w.dll")
if res then a = a + 1 else notice " vtk3231w.dll Was not created in --> ";DestPath1$;" J.B.P.O. will now close":end
res=fileExists(DestPath1$,"vvm31w.dll")
if res then a = a + 1 else notice " vvm31w.dll Was not created in --> ";DestPath1$;" J.B.P.O. will now close":end
res=fileExists(DestPath1$,"vvmt31w.dll")
if res then a = a + 1 else notice " vvmt31w.dll Was not created in --> ";DestPath1$;" J.B.P.O. will now close":end


'check new Project exe and tkn files for existence in Current Project Folder (quit P.O. if not)
res=fileExists(DestPath1$,fnamenobas$;".exe")
if res then a=a+1 else notice "jbrun2.exe not copied or renamed - EXITING ": close #main : end


'##################################################################
'Close the main Window - Make Window with Menus to add folders\files\buttons for Run Project, Make exe, Browse,
'Remove source File From Current Project Folder
[include]
close #main
WindowWidth = 600
WindowHeight = 320
UpperLeftX=INT((DisplayWidth-WindowWidth)/2)
UpperLeftY=INT((DisplayHeight-WindowHeight)/2)
BackgroundColor$ = "lightgray"
ForegroundColor$ = "black"
statictext #include.header, "See Menus Above to Add Files or Folders", 10, 35, 350, 35
statictext #include.jbforums, "Visit https://justbasiccom.proboards.com/", 145, 240, 450, 35


' Add text and buttons
button #include.remsource, "Remove Source File", [remsource],UL 185, 160, 180, 35
button #include.back, "Back", [back],UL 10, 290, 90, 35
button #include.browseN, "Browse this Project Folder", [browseN],UL 30, 100, 230, 35
button #include.browseP, " Browse Just Basic Projects Folder", [browseP],UL 280, 100, 280, 35
button #include.makeinst, "Make Installer (Iexpress)", [makeinst],UL 385, 160, 200, 35
button #include.run, "Run Your Project", [run],UL 15, 160, 150, 35
menu #include, "Options", "Run Current Project", [run], "Make Installer (iexpress)", [makeinst], "Remove Source File (.bas)", [remsource], "Open any .bas File, check for # of lines", [lines], "Back to Main Menu", [back], "Exit Add Files/Folders Restart Program", [exit]
menu #include, "Create Folders and Add Files", "Create bmp Folder Add bmp Files (.bmp)", [bmpf], "Create Media Folder Add Media Files (.wav)", [medf], "Create Apps Folder Add App Files (*.*)", [appf], "Name a Folder Add Files to it (*.*)", [userf], "Add Files to the Root of Project Folder (*.*)", [rootf]
menu #include, "Browse", "New Project Folder", [browseN], "Your Chosen BAS File Folder", [orig], "Just Basic Projects Dir", [browseP]
menu #include, "Defaults", "Change JB Projects Default Folder (You Type The Path)", [editini], "Change Just Basic Projects Default Folder (Use FolderDialog)", [fdiaginiedit], "Kick Windows in Head Relieve Stress :D ", [kickhard]
menu #include, "Help", "Help", [help], "About", [about]


'Set Font's for this window, statictext, and buttons
open "Options For This New Project" for window_nf as #include
#include, "trapclose [quit.include]"
#include, "font Arial 10 bold"
#include.header, "!font Arial 10 bold"
#include.remsource, "!font Arial 10 bold"
#include.back, "!font Arial 10 bold"
#include.browseN, "!font Arial 10 bold"
#include.browseP, "!font Arial 10 bold"
#include.makeinst, "!font Arial 10 bold"
#include.run, "!font Arial 10 bold"
wait


'make the TKN File ONLY was Selected
[tknonly]
'When Creating a TKN File it is Created in Same Folder as the .bas File Selected.
notice "creating TKN File ONLY"+chr$(13)+ "The TKN File will be created in the Same Dir as Selected .bas File"+chr$(13)+fname$+chr$(13)+" Just hit [ENTER] or Click [OK] when the 'Save To' Window Appears. If the Default Location is Not Selected, this Organizer Cannot track the TKN File's Location. You're on your own."
filedialog "Open \ Select JB Source File ", DefaultDir$; "\*.bas", fname$
if fname$ = "" then notice "No file selected, P.O. will now close" : close #main : end
RUN JBpath$;"";JBexe$;" -T -A ";fname$
TKNPath$ = GetPath$(fname$)
TKNname$ = GetFilename$(fname$)
TKNname$ = left$(TKNname$,len(TKNname$)-3)
TKNname$ = TKNname$;".tkn"
message$ = chr$(13);chr$(13);" If you saved the TKN File to the Location the FileDialog 'Save' window defaulted to, the TKN File will be there, else if you saved it elsewhere, Program Organizer cannot know it's location. The Act of making the TKN File rests in the hands of jbasic.exe, and this Organizer is not informed of what jbasic.exe or the Users Choice of Location to Save the TKN"
message$ = GetMessage$(message$)
res = fileExists(TKNPath$,TKNname$)
if res then notice "The TKN File WAS Created in ";TKNPath$ : wait
if res <> 0 then notice "The TKN File was NOT Created in the Default Location, but May have been Created Where the USER Saved it."
wait


'just a joke to relieve some stress
[kickhard]
notice "OUCH!! I DESERVE MANY MORE - You OWE me!! "
wait


'Report the number of lines in a bas File Selected in filedialog
[lines]
dim line$(50000)
filedialog "Open a Source File (.bas) ", DefaultDir$; "\*.bas", fname$
if fname$ = "" then notice "No file selected, P.O. will now close" : close #main : end
for var1 = len(fname$) to 1 step -1
if mid$(fname$, var1, 1) = "" then var2 = var1 -1 : var3 = var2 - ((len(fname$))) : exit for
next var1
var3 = abs(var3)
orig$ = left$(fname$, var2)
fname0$ = right$(fname$, var3 -1)
for var4 = len(fname0$) to 1 step -1
if mid$(fname0$, var4, 1) = "." then var5 = var4 -1 : var6 = var5 - ((len(fname0$))) : exit for
next var4
var6 = abs(var6)
fnamenobas$ = left$(fname0$, var5)
[linescurrent]
file$ = fname$
open file$ for input as #1
while eof(#1) = 0
line input #1, line$(x)
spaces$ = line$(x)
if spaces$ = "" then y = y + 1
x = x +1
wend
close #1
message$ = chr$(13);chr$(13);" ";fname0$;chr$(13);chr$(13);" ";x-y;" lines of code";chr$(13);" ";y;" lines of spaces ";chr$(13);" ";x;" lines in total"
message$ = GetMessage$(message$)
wait


'Make a bmp Folder in the Current Project Folder Automatically when 'add bmp file' is pressed
' then Ask For .bmp File to Add to it. Same Goes for media, apps folders being Created in Projects Folder
[bmpf]
bmp$ = "bmp"
filedialog "Open a bmp File - (.bmp)", DefaultDir$;"";"*.bmp", FullPathbmpFile$
if FullPathbmpFile$ = "" then notice "No Folder Chosen = No Folder or File Copied" : wait
bmpFile$ = FullPathbmpFile$
bmpFile$ = GetFilename$(bmpFile$)
if fileExists(DestPath1$;"";bmp$,bmpFile$) then confirm "!!! WARNING !!! !!! WARNING !!! !!! WARNING !!!"+chr$(13)+"File already exists"+chr$(13)+"Do you want to OverWrite this File?";WellDoYouPunk$
if WellDoYouPunk$ <> "yes" then wait
open FullPathbmpFile$ for input as #file
res = mkdir( DestPath1$;"";bmp$)
open DestPath1$;"";bmp$;"";bmpFile$ for output as #1
print #1, input$(#file, lof(#file));
close #file
close #1
res=fileExists(DestPath1$;"";bmp$,bmpFile$)
if res then notice bmpFile$;" Was copied to ";DestPath1$;"";bmp$ else notice bmpFile$;" Was not copied to ";DestPath$;"";bmp$
wait


'Make media Folder Automatically, add media File (.wav) using filedialog function
[medf]
media$ = "media"
filedialog "Open a media File - (.wav)", DefaultDir$;"";"*.wav", FullPathmediaFile$
'If user uses Cancel Button in filedialog Window bypass File Copy, inform user no file created
if FullPathmediaFile$ = "" then notice "No Folder Chosen = No Folder or File Copied" : goto [nomedia]
mediaFile$ = FullPathmediaFile$
mediaFile$ = GetFilename$(mediaFile$)
if fileExists(DestPath1$;"";media$, mediaFile$) then confirm "!!! WARNING !!! !!! WARNING !!! !!! WARNING !!!"+chr$(13)+"File already exists"+chr$(13)+"Do you want to OverWrite this File?";WellDoYouPunk$
if WellDoYouPunk$ <> "yes" then wait
open FullPathmediaFile$ for input as #file
res = mkdir( DestPath1$;"";media$)
open DestPath1$;"";media$;"";mediaFile$ for output as #1
print #1, input$(#file, lof(#file));
close #file
close #1
res=fileExists(DestPath1$;"";media$,mediaFile$)
if res then notice mediaFile$;" Was copied to ";DestPath1$;"";media$ else notice mediaFile$;" Was not copied to ";DestPath1$;"";media$
wait


'Make apps Folder Automatically, add File (.exe etc) using filedialog function
[appf]
apps$ = "apps"
filedialog "Open an Executable File (.exe 'etc')", DefaultDir$;"";"*.*", FullPathappFile$
if FullPathappFile$ = "" then notice "No Folder Chosen = No Folder or File Copied" : wait
appFile$ = FullPathappFile$
appFile$ = GetFilename$(FullPathappFile$)
if fileExists(DestPath1$;"";apps$, appFile$) then confirm "!!! WARNING !!! !!! WARNING !!! !!! WARNING !!!"+chr$(13)+"File already exists"+chr$(13)+"Do you want to OverWrite this File?";WellDoYouPunk$
if WellDoYouPunk$ <> "yes" then wait
open FullPathappFile$ for input as #file
res = mkdir( DestPath1$;"";apps$)
open DestPath1$;"";apps$;"";appFile$ for output as #1
print #1, input$(#file, lof(#file));
close #file
close #1
res=fileExists(DestPath1$,appFile$)
if res then notice appFile$;" Was copied to ";DestPath1$;"";apps$ else notice appFile$;" Was not copied to ";DestPath1$;"";apps$
wait


'Make User Choice Foldername Automatically, Add File to it Using filedialog Function
[userf]
prompt "Give the folder a name" + chr$(13) + "Type any Name for this Folder";userDir$
if userDir$ = "" then notice "No Path Given = No Folder Created" : wait
filedialog "Add a File to Folder that was Just Created", DefaultDir$;"";"*.*", FullPathuserFile$
if FullPathuserFile$ = "" then notice "No File Chosen = No File Copied" : wait
userFile$ = FullPathuserFile$
userFile$ = GetFilename$(userFile$)
if fileExists(DestPath1$;"";userDir$, userFile$) then confirm "!!! WARNING !!! !!! WARNING !!! !!! WARNING !!!"+chr$(13)+"File already exists"+chr$(13)+"Do you want to OverWrite this File?";WellDoYouPunk$
if WellDoYouPunk$ <> "yes" then wait
open FullPathuserFile$ for input as #file
res = mkdir( DestPath1$;"";userDir$)
open DestPath1$;"";userDir$;"";userFile$ for output as #1
print #1, input$(#file, lof(#file));
close #file
close #1
res=fileExists(DestPath1$;"";userDir$, userFile$)
if res then notice userFile$;" was added to ";DestPath1$;"";userDir$ else notice userFile$;" Was not added to ";DestPath1$;"";userDir$
wait


'Give User Option to Add File to the root Folder of their Current Project
[rootf]
filedialog "Add Files to root of New Project Dir", "c:\*.*", FullPathrootFile$
if FullPathrootFile$ = "" then notice "No File Chosen = No File Copied" : wait
rootFile$ = FullPathrootFile$
rootFile$ = GetFilename$(rootFile$)
if fileExists(DestPath1$, rootFiile$) then confirm "!!! WARNING !!! !!! WARNING !!! !!! WARNING !!!"+chr$(13)+"File already exists"+chr$(13)+"Do you want to OverWrite this File?";WellDoYouPunk$
if WellDoYouPunk$ <> "yes" then wait
open FullPathrootFile$ for input as #file
open DestPath1$;"";rootFile$ for output as #1
print #1, input$(#file, lof(#file));
close #file
close #1
res=fileExists(DestPath1$,rootFile$)
if res then notice rootFile$;" Was added to ";DestPath1$ else notice rootFile$;" Was not added to ";DestPath1$
wait


'code for removing the .bas source file from the Current Project Folder
[remsource]
delFile$ = "yes"
prompt "Delete the source code file? - You Sure?" + chr$(13) + "Does not affect Original .bas file";delFile$
if delFile$ = "" then wait
res=fileExists(DestPath1$,fname0$)
if left$(delFile$, 1) = "y" or left$(delFile$, 1) = "Y" and res then kill DestPath1$;"";fname0$
res=fileExists(DestPath1$,fname0$)
if res then notice fname0$;" Has not been removed from ";DestPath1$ else notice fname0$;" Has been removed from ";DestPath1$
wait


'go back to main menu (user can select a new .bas file and Start again)
[back]
close #include
goto [start]
wait


'Start iexpress.exe (a built in Windows Install Maker = Self Extracting exe File)
[makeinst]
res=fileExists("c:\windows\system32","iexpress.exe")
if res then run "iexpress.exe" else notice "Cannot find file --> iexpress.exe in c:\windows\system32"+chr$(13)+"Known issue for users of WINE in Linux"+chr$(13)+"Check WINE Tricks for Adding IExpress(after each update)"
wait


'open Windows explorer to the Just Basic Projects Folder
[browseP]
run "explorer.exe ";DestPathU$
wait


'open Windows explorer to the Current Project Folder
[browseN]
run "explorer.exe ";DestPath1$
wait


'Run the current project
[run]
res=fileExists(DestPath1$,fnamenobas$;".exe")
if res then run DestPath1$;"";fnamenobas$;".exe" else notice fnamenobas$;" Does Not Exist in ";DestPath1$
wait


'Browse the Folder of the Selected .bas File
[orig]
run "explorer ";orig$
wait


[help]
notice "For Help - Read this BAS file (Ten Times)"
wait


[about]
notice, "About file coming in future zip version"
wait


'done with adding folders\files etc - close P.O.
[exit]
close #include
end


[cancelClick]
close #main
end


'done with adding folders\files etc
[quit.include]
close #include
end


'close main window and exit program
[quit.main]
close #main
end


'Change Just Basic Projects Path (using folderdialog window)
[fdiaginiedit]
DestPath$ = FolderDialog$("Select a Drive or Folder for JB Projects Dir - Note: Only Drives & Folders Show Below (No Files)")
if DestPath$ = "" then notice "No Path given = No Path Saved" : wait
open "PO.ini" for output as #iniedit
print #iniedit, projects$
print #iniedit, DestPath$
close #iniedit
'Remove trailing \ from Path returned from FolderDialog Function
if right$(DestPath$, 1) = "" then DestPath$ = left$(DestPath$, len(DestPath$) - 1)
wait


'Change Just Basic Projects Path (typed into prompt Window by user)
[editini]
prompt "Change JB Projects Default Folder Path" + chr$(13) + "Type a New Default Path" ; iniedit$
if iniedit$ = "" then notice "No Path given = No Path Saved" : wait
if right$(DestPath$, 1) = "" then DestPath$ = left$(DestPath$, len(DestPath$) - 1)
open "PO.ini" for output as #ini
#ini, projects$
#ini, DestPath$
close #ini
wait


'make a log(PO.ini) of users choice of Just Basic Projects path in same folder
'as this program is running from or started from.
[logDestPath]
If DestPath$ = "" then notice "No Path Given = No Path Made" : return
ini$ = "PO.ini"
open ini$ for output as #log
if projects$ <> "" then #log, projects$
if DestPath$ <> "" then #log, DestPath$
close #log
return


'check if PO.ini exists, if it does, and it holds a Path then use it's contents
' as the User Choice Path (DestPath$) and projects Dir Name (projects$) upon 'return'
[LogCheck]
res=fileExists(DefaultDir$,"PO.ini")
if res then a = a + 1 else open "PO.ini" for output as #ini : #ini, projects$ : #ini, DestPath$ : close #ini
open "PO.ini" for input as #ini
while eof(#ini) = 0
line input #ini, logged$
x = x + 1
if logged$ = "" then close #ini : return
if left$(logged$, 2) = ":" then DestPath$ = log$
if x = 1 then projects$ = logged$
if x = 2 then DestPath$ = logged$
'remove trailing "" from path given by folderdialog
if right$(DestPath$, 1) = "" then DestPath$ = left$(log$, len(log$) - 1)
wend
close #ini
return


'subroutine for making pauses
sub pause mil
t=time$("ms")+mil
while time$("ms")<t
scan
wend
end sub


'function for checking file existence
function fileExists(path$, filename$)
dim info$(0, 0)
files path$, filename$, info$()
fileExists = val(info$(0, 0)) 'non zero is true
end function


'function for checking folder existence
function pathExists(path$)
pathExists = (mkdir(path$)=183)
end function


'functions for making the folder dialog window
function FolderDialog$(caption$)
WindowWidth = 600
WindowHeight = 370
UpperLeftX=INT((DisplayWidth-WindowWidth)/2)
UpperLeftY=INT((DisplayHeight-WindowHeight)/2)
BackgroundColor$ = "lightgray"
ForegroundColor$ = "black"
gosub [FolderDlgGetDrives]
statictext #folderdlg.S, "Note: - Only Drives and Folders Appear Below - No Files Appear", 45, 15, 550, 25
statictext #folderdlg.S, "Select a Drive or a Folder From the List", 175, 40, 300, 25
statictext #folderdlg.D, " (Double Click Drive Letters and Folders to Select or Navigate)", 85, 70, 395, 15
listbox #folderdlg.list, FolderList$(, [FolderDlgSelect], 22, 90, 550, 130
button #folderdlg.default, "Ok", [FolderDlgOk], UL, 190, 293, 85, 35
button #folderdlg.B, "Back", [FolderDlgBack], UL, 490, 45, 80, 30
button #folderdlg.C, "Cancel", [FolderDlgCancel], UL, 290, 293, 85, 35
textbox #folderdlg.text, 42, 225, 510, 30
statictext #folderdlg.path, "Selected Drive or Folder Path Appears Here", 130, 258, 400, 20
open caption$ for dialog_modal as #folderdlg
#folderdlg, "trapclose [FolderDlgCancel]"
#folderdlg.default, "!font Arial 10 bold"
#folderdlg, "font Arial 10 bold"
#folderdlg.S, "!font Arial 10 bold"
#folderdlg.path, "!font Arial 10 bold"
#folderdlg.list, "font Arial 10 bold"
#folderdlg.C, "!font Arial 10 bold"
#folderdlg.D, "!font Arial 8 bold"
#folderdlg.text, "!font Arial 10 bold"


wait
[FolderDlgSelect]
#folderdlg.list, "selection? temp$"
if temp$ <> "" then
level = level+1
folder$ = folder$; temp$; ""
#folderdlg.text, folder$
gosub [FolderDlgGetDir]
#folderdlg.list, "reload"
end if
wait
[FolderDlgBack]
if level > 0 then
level = level-1
if level = 0 then
folder$ = ""
gosub [FolderDlgGetDrives]
else
i = len(folder$)-1
while mid$(folder$, i, 1) <> "" and mid$(folder$, i, 1) <> ""
i = i-1
wend
folder$ = left$(folder$, i)
gosub [FolderDlgGetDir]
end if
#folderdlg.text, folder$
#folderdlg.list, "reload"
end if
wait
[FolderDlgGetDrives]
c = 1
while word$(Drives$, c) <> ""
c = c+1
wend
redim FolderList$(c)
for i = 1 to c
FolderList$(i) = word$(Drives$, i)
next i
return
[FolderDlgGetDir]
files folder$, info$(
s = val(info$(0,0))
t = val(info$(0,1))
redim FolderList$(t)
for i = 1 to t
FolderList$(i) = info$(i+s, 1)
next i
return
[FolderDlgOk]
#folderdlg.text, "!contents? FolderDialog$"
If right$(FolderDialog$,1) = "" then FolderDialog$ = left$(FolderDialog$, len(FolderDialog$) - 1)
[FolderDlgCancel]
close #folderdlg
end function


'function to separate folderpath from filename.ext - returns filename.ext
function GetFilename$(fileName$)
i = len(fileName$)
while mid$(fileName$, i, 1) <> "" and mid$(fileName$, i, 1) <> ""
i = i-1
wend
GetFilename$ = mid$(fileName$, i+1)
end function


'function to separate path from filename, returns path
function GetPath$(fileName$)
i = len(fileName$)
while mid$(fileName$, i, 1) <> "" and mid$(fileName$, i, 1) <> ""
i = i-1
wend
GetPath$ = left$(fileName$, i)
end function


'function to make messages
function GetMessage$(message$)
WindowWidth = 350 : WindowHeight = 200
UpperLeftX=INT((DisplayWidth-WindowWidth)/2)
UpperLeftY=INT((DisplayHeight-WindowHeight)/2)
BackgroundColor$ = "lightgray" : ForegroundColor$ = "black"
statictext #textmessage.text, "", 0, 0, 350, 350
button #textmessage.button, "OK", [quit], UL, 140, 110, 55, 35
open "Information Message - Tips for User" for window as #textmessage
#textmessage.button, "!setfocus"
print #textmessage, "trapclose [close]"
#textmessage, "font Arial bold 8"
#textmessage.text, message$
#textmessage.button, "!font Arial bold 10"
wait
[close]
close #textmessage : exit function
scan
wait
[quit]
scan
close #textmessage : exit function
end function


'th th th th th that's all folks :D - for now!
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

I see the code tags don't work here. Sorry about the long post of code above.

Just a little note for anyone who downloaded and installed Just Basic......

I have created a new Help Lab/Project organizer for Just Basic.
It will make learning Just Basic v2.0 a breeze.

You can download it at github https://github.com/xxgeek/Just-Basic-v2 ... -Organizer

Hotkeys are the underlined Characters - Just alt + the character - eg: alt + s starts the help search engine (be sure to provide a search word first)
Add your own Listings to any of the categories (RadioButtuns) - Paste your code etc into the large texteditor - no need to save - it's automatic
When [Make new Project] or the MyProjects RadioButton is selected, and or you click the [BAS<2>EXE] button, an automatic entry is made to the MyPtrojects categorie.
When [Programs RadioButton] is selected, and you click the [BAS<2>TKN] button, an automatic entry is made to the Programs categorie.
You will be prompted with a message if you are in the wrong categorie.
Unpack the SpriteCreator zip file into the same folder to use the SpriteCreator when pressing [SpriteCreator] button.
Have fun.
No help file yet, if you need anything, just ask me.
Working on a Huge help file for future, and a more robust version zipped up with lots of examples etc.

This took me a year to write, (over 2600 lines of code) so I hope it helps someone.....
I wish it was available when I started with Just Basic.

Open Just Basic >File>Open> and point to the .bas file in the downloaded folder.(after unzipping)
jbHelp.jpg
Attachments
jbHelp.jpg
User avatar
Easto
SG Elite
Posts: 5775
Joined: Sat Dec 02, 2000 12:00 am
Location: So. California

Post by Easto »

Quite impressive!
User avatar
Norm
SG VIP
Posts: 14195
Joined: Tue Mar 27, 2001 12:00 pm

Post by Norm »

Easto wrote:Quite impressive!
Thanks Easto, it was well worth the effort.

It automates saving all my code projects, and automates making the EXE files.
Having it on github makes updating a breeze as well.

Lots of views on this thread. I wonder if anyone has tried Just Basic yet.

I also made the same thing for Liberty Basic.
Anyone wanting it can just google xxgeek, and link should be on the 1st page. Or go to github and search for LibertyBasic and select the link with xxgeek in the title.
Post Reply