English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 19 January 2020, 22:24   #41
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Me again. I have used new bat file and I don't get any errors but BB doesn't run?

One thing that I wonder is are you expecting BB to be in a particular path? The WinUaeArexx command seems to use the path as set for the project but I don't see how it knows where the Blitz basic program file is stored.

Also, is the name of the BB program file supposed to be Blitzbasic2? Mine is just called Blitz2.
Havie is offline  
Old 19 January 2020, 22:29   #42
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
https://drive.google.com/file/d/1JkS...ew?usp=sharing

The Dopus screen shows the file structure of my programming disk (DH1).

Blitz basic is stored in the Blitz2 folder.

Maybe this will help?

Nearly there...

Last edited by Havie; 19 January 2020 at 22:38.
Havie is offline  
Old 20 January 2020, 08:13   #43
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 556
Quote:
Originally Posted by Havie View Post
One thing that I wonder is are you expecting BB to be in a particular path?
Quote:
Originally Posted by Havie View Post
https://drive.google.com/file/d/1JkS...ew?usp=sharing

The Dopus screen shows the file structure of my programming disk (DH1).

Blitz basic is stored in the Blitz2 folder.

Maybe this will help?

Nearly there...
About the path to Blitz Basic 2. You need to set the correct path in the 'blitzbasic2.rexx' script. It seems I have forgotten to add that to the instructions, sorry about that. Change the two paths at lines 21 and 22:

Code:
  IF EXISTS('System:Programs/Blitz2/Blitz2') THEN DO
    ADDRESS COMMAND 'Run >NIL: System:Programs/Blitz2/Blitz2'
to

Code:
  IF EXISTS('Blitz2:Blitz2') THEN DO
    ADDRESS COMMAND 'Run >NIL: Blitz2:Blitz2'

Last edited by MickGyver; 20 January 2020 at 09:19.
MickGyver is offline  
Old 20 January 2020, 09:21   #44
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 556
Version 0.5

I uploaded a new version with these improvements:
  • Changed the path of the BB2 executable in the blitzbasic2.rexx script to 'Blitz2:Blitz2', instead of the 'hardcoded' path that needed user editing.
Use same download link:
http://gamephase.net/files/linked/AtomBB2.zip
MickGyver is offline  
Old 20 January 2020, 20:43   #45
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Hello again - good news, Blitz now runs!!!

I have two final problems:
1. Nag box doesn't disappear (I have Nagaway copied into c: )
2. I get a file can't load error.

I can see light at the end of the tunnel...
Havie is offline  
Old 25 January 2020, 17:37   #46
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
I have had a bit more of a fiddle.

So program compiles fine (have tested it by manually loading into Blitz).
Winuae runs and Blitz Basic starts.
Nag box does not disappear and I get error in Blitz saying unable to load program.

I have checked Firewall settings and gone through mountlist, arexx file and user-startup and all looks ok.

Any other suggestions - it seems so close...
Havie is offline  
Old 25 January 2020, 19:18   #47
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 556
Quote:
Originally Posted by Havie View Post
I have had a bit more of a fiddle.

So program compiles fine (have tested it by manually loading into Blitz).
Winuae runs and Blitz Basic starts.
Nag box does not disappear and I get error in Blitz saying unable to load program.

I have checked Firewall settings and gone through mountlist, arexx file and user-startup and all looks ok.

Any other suggestions - it seems so close...
Hmm, if you want, I could try and help you over Skype or another video chat where you can share the screen. I will send you a PM!
MickGyver is offline  
Old 26 January 2020, 18:36   #48
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Had a long chat with Mick yesterday and made a lot of progress. The main issue was that I had confused the Windows folder with the Amiga virtual folder - I thought they were two separate folders but should just be one!

Atom went a big bonkers (probably because I messed up the config file) so have started from the beginning today.

I have one problem left and everything else works!

When I press F5, it opens a command window and shows the correct folder but does not run run.bat. If I manually type run.bat then everything works fine including the nag box going away and compiling and running of the program. I have copied the config file and changed [username] and even copied Micks one form here but to no avail.

So...just need to sort out the running of run.bat and I'm there!

One last bit of help please Mick.
Havie is offline  
Old 26 January 2020, 18:37   #49
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Config file (before you ask).

Code:
"atom-shell-commands":
		commands: [
			{
				name: "BB2: Show Help"
				command: "C:\\Users\\Havie\\.atom\\packages\\language-blitzbasic2\\tools\\BB2Doc.exe"
				arguments: [
					"{CurWord}"
				]
				options:
					keymap: "f1"
			}
			{
				name: "BB2: Compile and Run"
				command: "cmd"
				arguments: [
					"/C"
					"start"
					"{FileDir}\\run.bat"
				]
				options:
					cwd: "{FileDir}"
					keymap: "f5"
			}
			{
				name: "BB2: Create Compile and Run Script"
				command: "robocopy"
				arguments: [
					"C:\\Users\\Havie\\.atom\\packages\\language-blitzbasic2\\tools"
					"{FileDir}"
					"run.bat"
					"/XC"
					"/XN"
					"/XO"
				]
				options:
					cwd: "{FileDir}"
					keymap: "ctrl-f5"
			}
		]
Havie is offline  
Old 26 January 2020, 18:59   #50
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Don't know what I did but now it works except I get the following error:

'Error input redirection is not supported, exiting the process immediately.'
Havie is offline  
Old 27 January 2020, 21:34   #51
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
I have finally got it working. Thanks to Mick for giving up his time to help me. We left it that I had to type run.bat manually and everything would run but after a bit more trial and error tonight I have discovered that to make it work completely I needed to add and additional {FileDir} command. Why I don't know but it works!!!

Now back to some programming. I have one game just about done but I want to check it and then release it.

Code:
  name: "run.bat"
        command: "cmd"

        arguments: [
          "/C"
          "start"
          "{FileDir}"
          "{FileDir}\\run.bat"
        ]
        options:
          cwd: "{FileDir}"
          keymap: "f5"
Havie is offline  
Old 27 January 2020, 21:59   #52
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 556
Quote:
Originally Posted by Havie View Post
I have finally got it working. Thanks to Mick for giving up his time to help me. We left it that I had to type run.bat manually and everything would run but after a bit more trial and error tonight I have discovered that to make it work completely I needed to add and additional {FileDir} command. Why I don't know but it works!!!

Now back to some programming. I have one game just about done but I want to check it and then release it.

Code:
  name: "run.bat"
        command: "cmd"

        arguments: [
          "/C"
          "start"
          "{FileDir}"
          "{FileDir}\\run.bat"
        ]
        options:
          cwd: "{FileDir}"
          keymap: "f5"
Yes!
MickGyver is offline  
Old 27 January 2020, 22:27   #53
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Now - the really last thing is to get the symbols list working. Could you post your symbols-list.regex.coffee file so I can compare to mine. Here's mine:

# TO TEST REGEX
# https://regexper.com/

module.exports =
text:
html:
regex:
commentaire_html: /^[^\S\n]*<!-- ! (.+)-->/gmi
structure: /^[^\S\n]*<(?:(?:head|body|section)(?:(?:[^<]*)aria-label="([^"]+)")|(head|body|section))/gmi
entete: /^[^\S\n]*<h[1-9][^>]*>(?:(?!{{|{#|<\?php)([^<]*)|[^<]*)<\/h[1-9]>/gmi
anchor: /^[^\S\n]*<[^>]*id=["']+([\w]+)["'][^>]*>/gmi
php:
regex:
commentaire: /^[^\S\n]*(?:\/\/|#) ! (.+)/gmi
commentaire_multi: /^[^\S\n]*\/\* ! (.+)[^\/]*\*\//gmi
class: /^[^\S\n]*class ([\w]+)/gmi
methode_statique: /^(?:final|abstract|private|protected|public|[^\S\n])*static\sfunction\s?((?:&\s?)?[\w]+ *\([^\)]*\))/gmi
function: /^(?:final|abstract|public|[^\S\n])*function\s?((?:&\s?)?[\w]+ *\([^\)]*\))/gmi
private_function: /^[^\S\n]*private[^\S\n]+function\s?((?:&\s?)?[\w]+ *\([^\)]*\))/gmi
protected_function: /^[^\S\n]*protected[^\S\n]+function\s?((?:&\s?)?[\w]+ *\([^\)]*\))/gmi
todo: /(?:\/\*|\/\/)[ ]*todo\:[ ]*(.+?)[ ]*(?:\*\/|\r\n|\n)/gmi
fixme: /(?:\/\*|\/\/)[ ]*fixme\:[ ]*(.+?)[ ]*(?:\*\/|\r\n|\n)/gmi
hack: /(?:\/\*|\/\/)[ ]*hack\:[ ]*(.+?)[ ]*(?:\*\/|\r\n|\n)/gmi
blade:
regex:
commentaire: /^[^\S\n]*(?:{{--) ! ([^}]+) --}}(?:\r\n|\n)/gmi
blade_section: /^[^\S\n]*(?:@section\(['\s]*)([^'\(\)]+)/gmi
twig:
regex:
commentaire: /^[^\S\n]*(?:{#) ! ([^}]+) #}(?:\r\n|\n)/gmi
twig_block: /^[^\S\n]*(?:{% block ['\s]*)([^']+)[']?\s%}/gmi
vue:
regex:
commentaire: /^[^\S\n]*\/\/ ! (.+)/gmi
commentaire_multi: /^[^\S\n]*\/\* ! (.+)[^\/]*\*\//gmi
vue_template: /^[^\S\n]*<(?:(?:template)(?:(?:[^<]*)lang="([^"]+)")|(template))/gmi
vue_script: /^[^\S\n]*<(?:(?:script)(?:(?:[^<]*)lang="([^"]+)")|(script))/gmi
vue_style: /^[^\S\n]*<(?:(?:style)(?:(?:[^<]*)lang="([^"]+)")|(style))/gmi
tex:
latex:
regex:
latex_chapter: /^\\chapter\*?\{([^\}]+)\}/gmi
latex_section: /^\\section\*?\{([^\}]+)\}/gmi
latex_subsection: /^\\subsection\*?\{([^\}]+)\}/gmi
latex_subsubsection: /^\\subsubsection\*?\{([^\}]+)\}/gmi

source:
sass:
regex:
commentaire: /^[^\S\n]*\/\/ ! (.+)/gmi
commentaire_multi: /^[^\S\n]*\/\* ! (.+)\*\//gmi
scss_mixin: /^[^\S\n]*(?:\=([^\(]+)\()/gmi
function: /^[^\S\n]*(?:@function\s+([^\(]+)\s*\()/gmi
css:
regex:
commentaire: /^[^\S\n]*\/\/ ! (.+)/gmi
commentaire_multi: /^[^\S\n]*\/\* ! (.+)\*\//gmi
class: /^"([#|\.]*.+)"/gmi
scss:
regex:
scss_mixin: /^[^\S\n]*(?:@mixin\s+([^\(]+)\s*\()/gmi
function: /^[^\S\n]*(?:@function\s+([^\(]+)\s*\()/gmi
js:
regex:
commentaire: /^[^\S\n]*\/\/ ! (.+)/gmi
commentaire_multi: /^[^\S\n]*\/\* ! (.+)[^\/]*\*\//gmi
class: /^[^\S\n]*class ([\w]+(?: extends [\w]+)*)/gmi
class_expression: /^[^\S\n]*([\w]+)\s*=\s*class\s{/gmi
function: /^[^\S\n]*(?:final|static|abstract|public|async|export|[^\S\n])*function\s?([\w]+ *\([^\)]*\))/gmi
private_function: /^[^\S\n]*private[^\S\n]+function\s?([\w]+ *\([^\)]*\))/gmi
protected_function: /^[^\S\n]*protected[^\S\n]+function\s?([\w]+ *\([^\)]*\))/gmi
controller: /^[^\S\n]*\.controller\s*\(\s*["']+([\w]+)["']+[\s,]*function/gmi
method: /^[^\S\n]*(?:.*)(\b\w+\b)\s*(?:=|:)\s*function/gmi
es6_method: /^[^\S\n]*(?:[*][\s\n]+)?(?:(?:@\w+)[\s\n]+)*(?!foreach|if|for|while|catch)([\w]+\((?:(?!function|=>|;).|\r\n|\n)*?\))\s{/gmi
es6_async_method: /^[^\S\n]*(?:[*][\s\n]+)?(?:(?:@\w+)[\s\n]+)*(?:async[\s\n]+)(?!foreach|if|for|while|catch)([\w]+\((?:.|\s)*?\))[\s\n]*{/gmi
es6_static_method: /^[^\S\n]*(?:[*][\s\n]+)?(?:(?:@\w+)[\s\n]+)*(?:static[\s\n]+)(?!foreach|if|for|while|catch)([\w]+\((?:.|\s)*?\))[\s\n]*{/gmi
constant: /^[^\S\n]*\.constant\(["']+([\w]+)["']+/gmi
filter: /^[^\S\n]*\.filter\(["']+([\w]+)["']+/gmi
structure: /^[^\S\n]*\.(config|run)\(function/gmi
setter: /^[ ]*set[ ]+([^ (]+\(.*\))/gmi
getter: /^[ ]*get[ ]+([^ (]+\(.*\))/gmi
todo: /(?:\/\*|\/\/)[ ]*todo\:?[ ]*(.+?)[ ]*(?:\*\/|\r\n|\n)/gmi
fixme: /(?:\/\*|\/\/)[ ]*fixme\:?[ ]*(.+?)[ ]*(?:\*\/|\r\n|\n)/gmi
hack: /(?:\/\*|\/\/)[ ]*hack\:?[ ]*(.+?)[ ]*(?:\*\/|\r\n|\n)/gmi
coffee:
regex:
function: /^[^\S\n]*([\w]+:)\s*(?:\([^\)]*\))?\s*->/gmi
class: /^[\S\n]*class ([\w]+)/gmi
todo: /#[ ]*todo\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
fixme: /#[ ]*fixme\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
hack: /#[ ]*hack\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
cs:
regex:
class: /^[\S\n]*(?:final|static|abstract|private|protected|public|[^\S\n])*\s?class\s([\w]+(\s?:\s?[\w]*)?)/gmi
function: /^[^\S\n]*(?:final|static|abstract|public)*\s?(?:\w+\s)+(\w+\s*\([^\)]*\))[\s\n]*{/gmi
private_function: /^[^\S\n]*private\s?(?:\w+\s)+(\w+\s*\([^\)]*\))[\s\n]*{/gmi
protected_function: /^[^\S\n]*protected\s?(?:\w+\s)+(\w+\s*\([^\)]*\))[\s\n]*{/gmi
ini:
regex:
structure: /^\[([^\]]+)]/gmi
python:
regex:
commentaire: /^[^\S\n]*# ! (.+)/gmi
class: /^[^\S\n]*class[\W]+(.+?)(:| *\([\w\s.,]*\):)/gmi
function: /^[^\S\n]*def +(.+? *\((?!\s*self\s*(?=(,|\))))(.|\s)*?\)):/gmi
method: /^[^\S\n]*def +(.+? *\((?=\s*self\s*(?=(,|\))))(.|\s)*?\)):/gmi
todo: /#[ ]*todo\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
fixme: /#[ ]*fixme\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
hack: /#[ ]*hack\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
ruby:
regex:
attr: /^[ ]*(?:attr_reader|attr_writer|attr_accessor)[ ]+([^ \n\r]+)/gmi
class: /^[ ]*class[ ]+(?:([^\s<]+)\s?<|(?:[^\s]+::)([^\r\n]+)|([^\s<]+))/gmi
module: /^[ ]*module[ ]+(?:([^\s<]+)\s?<|(?:[^\s]+::)([^\r\n]+)|([^\s<]+))/gmi
classmethod: /^[ ]*def[ ]+(?:self\.)([^ \n\r]+)/gmi
instancemethod: /^[ ]*def[ ]+(?!self\.)([^ \n\r]+)/gmi
todo: /#[ ]*todo\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
fixme: /#[ ]*fixme\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
hack: /#[ ]*hack\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
gfm:
regex:
structure: /^#+[^\S\n]+(.+)/gmi
yaml:
regex:
commentaire: /^[^\S\n]*# ! (.+)/gmi
perl:
regex:
package: /^[ ]*package[ ]+([^\d][^ ]+)[ ]*(?:\{|;)/gmi
use: /^[ ]*use[ ]+([^\d].+?);/gmi
our: /^[ ]*our[ ]+([^ \d]{2}[^\s\;\=]+)(?:[ ]*|=|;)/gmi
subroutine: /^[ ]*sub[ ]+([^\d][^ (]+)(?:[ ]+\:[^ (]+)?(?:\(.*\))?[ ]*\{/gmi
todo: /#[ ]*todo\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
fixme: /#[ ]*fixme\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
hack: /#[ ]*hack\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
odin:
regex:
class: /^[ ]*(.+)\s*:\s*:\s*struct\s*(?:[\{])/gmi # struct
anchor: /^[ ]*(.+)\s*:\s*:\s*enum\s*(?:[\{])/gmi # enum
function: /^[ ]*(.+)\s*:\s*:\s*proc\s*(?:[\{\(])/gmi # proc
methode_statique: /^[ ]*(.+)\s*:\s*:\s*(?:[\"\'0-9])/gmi # const
blitzbasic2:
regex:
anchor: /^[ ]*([A-Za-z]+)\:/gmi
method: /^[ ]*Macro[ ]+(\w+)/gmi
subroutine: /^[ ]*Statement[ ]+([^\d][^ (]+)(?:[ ]+\:[^ (]+)?(?:\(.*\))?[ ]*\{/gmi
function: /^[ ]*Function(?:[ ]+|\s\.[a-zA-Z0-9]+\s)([^\d][^ (]+)(?:[ ]+\:[^ (]+)?(?:\(.*\))?[ ]*\{/gmi
todo: /;[ ]*todo\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
fixme: /;[ ]*fixme\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
hack: /;[ ]*hack\:[ ]*(.+?)[ ]*(?:\r\n|\n)/gmi
Havie is offline  
Old 27 January 2020, 22:29   #54
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Okay - when I load the file into Atom, the Blitz Basic bit has the same indent as the rest of the language regex files so the fact it doesn't when I have copied it here makes me think there is something wrong...
Havie is offline  
Old 27 January 2020, 22:35   #55
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Had a slight fiddle with the indents and yesssssss - all works fine!

Thanks Mick!
Havie is offline  
Old 27 January 2020, 22:45   #56
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
For information, you can make labels in two ways in Blitz; either with a . or a : i.e.

.loop

or

loop:

Only the colon version of the labels are being picked up by Atom in the symbols list. Would it be possible to pick up the other way too?

Not sure if there is an difference - maybe I just need to use : instead of . ?
Havie is offline  
Old 28 January 2020, 11:04   #57
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 556
Quote:
Originally Posted by Havie View Post
For information, you can make labels in two ways in Blitz; either with a . or a : i.e.

.loop

or

loop:

Only the colon version of the labels are being picked up by Atom in the symbols list. Would it be possible to pick up the other way too?

Not sure if there is an difference - maybe I just need to use : instead of . ?
I should be able to allow for the .label format also, will look into it.
MickGyver is offline  
Old 28 January 2020, 17:17   #58
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Great - thanks.
Havie is offline  
Old 28 January 2020, 20:32   #59
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
I have discovered another slight issue. If the program your are compiling is too large then Blitz asks you either to increase memory by 150% or Make Smallest code. Unfortunately, if this box pops up then the compiling process freezes and you need to reset Winuae.

The solution I have found is to open the file manually in Blitz and go to the compiler options and click the 3rd button down - Make Smallest Code. Then save the file. Now when you compile from Atom it loads with this additional setting which gets over the memory issue.

If there is a better solution then please let me know. Unfortunately, I can't find anyway to make this a permanent change without loading the program, changing the setting and then saving it. This is because in SuperTed there is no option to globally save the settings.

Hope this all makes sense?
Havie is offline  
Old 28 January 2020, 20:57   #60
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 619
Sorry - me again. I converted all my labels from . to : so they show up in the side bar but I have found another bug. If the label ends with a number then it's not picked and displayed at the side so:

Loop: - is fine
Loop1: - is not
Loopy - is fine
Loopy1 - is not

Obviously, knowing this you just have to make sure all your labels only contain letters.

Sorry!
Havie is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
BB2 User Defined Language for Notepad++ MickGyver Coders. Blitz Basic 105 21 February 2020 21:13
Looking for FizEd text editor apsteinmetz request.Apps 2 12 April 2019 22:12
Text/coding Editor Torqual support.Apps 18 23 December 2018 23:18
new text editor flipper Coders. Tutorials 8 17 December 2007 10:57
Text editor for A500 oldpx request.Apps 12 19 December 2002 02:02

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.09706 seconds with 15 queries