Page 1 of 1

How to avoid QB64 window?

Posted: Fri Oct 09, 2015 12:18 pm
by barmet
Hello everyone,
I'm on Windows 8.1 and run QB64 version 1.0 programs.
I run them from a window "command prompt (administrator)"
and I would not appear the QB64 window with all its disadvantages.
What to do?
Thank you in advance for your good ideas.

barmet

Re: How to avoid QB64 window?

Posted: Fri Oct 09, 2015 12:43 pm
by burger2227
Please post your commands used to run QB64 and what exactly you are having problems with.

You can click on or run QB64.EXE to run or QB64.exe filename.BAS - c to compile Qbasic code in a BAS file.

http://www.qb64.net/wiki/index.php/IDE

Re: How to avoid QB64 window?

Posted: Sat Oct 10, 2015 12:45 pm
by barmet
Bonjour,
Merci d'avoir pris la peine de me répondre mais ma question était simplement de court-circuiter la fenêtre Qb64.
En effet, mes compilations sont O.K. et j'exécute les .exe sur la dir QB64.
Que la compilation soit faite sur cette dir ne me dérange pas trop (quoique !), mais l'exécution sur la fenêtre QB64 relève de l'aberration.
Ma question est donc très simple : existe-il une directive BAS ou BAT pour éviter cela et effectuer les exécutions sur la fenêtre WINDOWS ?
Merci pour votre patience.

Re: How to avoid QB64 window?

Posted: Sat Oct 10, 2015 12:50 pm
by barmet
Hello,
Thank you for taking the time to answer me but my question was simply to bypass the Qb64 window.
Indeed, my compilations are OK and I run the .exe dir QB64.
That the compilation is done on this dir does not bother me too (though!), But the performance on the window QB64 falls aberration.
My question is simple : is there a directive BAS or BAT to avoid this and make executions on WINDOWS window?
Thank you for your patience.
Apologize me.

Re: How to avoid QB64 window?

Posted: Sat Oct 10, 2015 2:20 pm
by burger2227
You want to hide the Window? Why?

There are TWO kinds of Windows. Program Windows and CONSOLE created by DOS.
If you hide them both you will not display anything

SHELL _HIDE can hide the console window DOS creates .

$SCREENHIDE or _SCREENHIDE hide the QB64 program window.

Re: How to avoid QB64 window?

Posted: Sat Oct 10, 2015 3:38 pm
by barmet
I would like to close the window and QB64 work on the DOS window.
I tried $ SCREENHIDE but I/O are also hidden DOS - partition F: F:\qb64\qb64v1000-win\qb64>
These are the I/O that is important in clear.

Re: How to avoid QB64 window?

Posted: Sat Oct 10, 2015 4:08 pm
by burger2227
You can use $CONSOLE with _DEST _CONSOLE to print to it.
http://www.qb64.net/wiki/index.php/$CONSOLE

_SCREENHIDE can hide the QB64 window.

QB64 was never meant to be used as a DOS only program.

Re: How to avoid QB64 window?

Posted: Sat Oct 10, 2015 5:41 pm
by barmet
J'avais déjà essayé $CONSOLE et _DEST _CONSOLE; cela ne marchait pas.
Cela ne marche pas plus en rajoutant _SCREENHIDE ou $SCREENHIDE, quelque soit l'ordre.

Re: How to avoid QB64 window?

Posted: Sat Oct 10, 2015 5:44 pm
by barmet
I had already tried $CONSOLE and _DEST _CONSOLE; it was not working.
It does not work by adding more or $SCREENHIDE _SCREENHIDE, regardless of the order.
Sorry !

Re: How to avoid QB64 window?

Posted: Sun Oct 11, 2015 7:26 am
by burger2227
Join the QB64 site and complain there I have no clue what you want to do either!

Re: How to avoid QB64 window?

Posted: Mon Oct 12, 2015 8:59 am
by barmet
Hello,
I thought maybe my troubles came from the v1000-win version that should not be clean. Also, I have tried rebooting the v0990 or v0980 but have disappeared from the landscape. In desperation, I loaded the master of GALLEON on Github which dates from 08/21/15. Result almost as bad (perhaps a bit faster).
https://github.com/Galleondragon/qb64
To see what is on the site QB64.net, I could never post (whenever he asks for log). If you know the trick let me know!
Thank you.

barmet

Re: How to avoid QB64 window?

Posted: Mon Oct 12, 2015 4:32 pm
by burger2227
Explain the EXACT PROBLEM you are having registering at QB64. Is it the question asked?

You seem to have a lot of problems with NO CODE and FEW EXPLANATIONS! Say it in French if you must!

POST CODE for help here! I have NO IDEA what you are trying to do!

Use Google Translate if you know how to convert it to English. Code is English anyhow...

Re: How to avoid QB64 window?

Posted: Tue Oct 13, 2015 10:31 am
by barmet
Bonjour burger,
Je suis désolé pour mon shakespeare mais c'est "degueugleu" qui fournit.
Je n'ai posé qu'une seule question sans ambiguïté pourtant et je constate que personne n'a pu m'indiquer un indice de chemin à suivre. Je dois cependant indiquer
que la fenêtre QB64 ne me dérange pas pour compiler mais il n'est pas question que je me serve de ceci pour travailler.
En effet, j'utilise seulement du batch hors ligne pour du scientifique (simulations qui durent plusieurs jours) sans graphisme et il est évident qu'un tel fonctionnement est incompatible avec mes desiderata.
Il y a sans doute une solution code ou batch mais je ne la connais pas et c'était l'objet de ma question, tout simplement.
Je vous donne un échantillon de mon code, qui je dois le dire fonctionne très bien sous QB64 (je ne vous parle pas de l'adaptation !). Après je pourrais évoquer les problèmes de la fenêtre si vous ne voyez pas d'anomalies.
Vraiment confus de prendre votre temps mais je pense que cela peut être profitable à toute la communauté QB64.
Merci pour tout.

barmet

Hello burger,
I'm sorry but this is my shakespeare "degueugleu" that provides.
I have asked one question unambiguously and yet I find that no one could give me a path to follow index. I must, however, indicate
QB64 that the window does not bother me to compile but it does not matter that me to use this to work.
In fact, I only use the batch offline for Scientific (simulations lasting several days) without graphics and it is clear that such behavior is incompatible with my wishes.
There is probably a code or batch solution but I do not know and that was my question, simply.
I give you a sample of my code, I must say that works fine in QB64 (I am not talking about adaptation!). After I could discuss problems of the window if you do not see abnormalities.
Really confused to take your time but I think it can be beneficial to the entire community QB64.
Thanks for all.

Code: Select all

' $title:'CUTV - Partage F. NKV en 2 Fic.'
' $include:'f:\bas\¿defall.bas'

	print "CUTV ";command$;fntim$
	call sack(command$,nb.ack)
		if		nb.ack=0_
			then		print "Arg. absent" : end
	l.fin=l.ack(1) : print l.fin
	p=val(l.ack(2)) : print p
	l.fout=l.ack(3) : print l.fout
	l.fout1=l.ack(4)
		if		not fnexist(l.fin)_
			then		print "	Absent F. In" : goto ZEND
	close 2 : open "o",2,l.fout
	close 1 : open "i",1,l.fin
		if		l.fout1 <> ""_
			then		close 4 : open "o",4,l.fout1 : fl.2=-1
	while not eof(1)
	line input #1,a$ : call sack(a$,nb.ack)
		if		fl.2_
			then		print #2,left$(a$,p-1) :_
					print #4,mid$(a$,p) : exit while[code]
print #2,mid$(a$,p)
wend
ZEND:
print "CUTV ";command$;fntim$
end

' $include:'f:\bas\¿deffn.bas'

' $include:'f:\bas\sack.bas'
[/code]

Code: Select all

¿DEFALL.BAS
' $include:'f:\bas\¿def.bas'

$CONSOLE
_DEST _CONSOLE

	clear ,,1000
	dim shared ct!(1 to 500)
	dim shared id(1 to 500),ig(1 to 500),ir(1 to 500)
	dim shared l(1 to 20),l.ack(1 to 501)
	dim shared n0.sort(1 to 500)
	dim shared sort(1 to 500),sort!(1 to 500),sort#(1 to 500)                                                                                                                                                                                                          

	l.sp.3=space$(3)
	l.sp.6=space$(6)

Code: Select all

¿DEF.BAS
	option base 0
	defint c-k,m-z
	defstr l


Code: Select all

¿DEFFN.BAS
function fnexist(l.fic)
				'	KILL sur DIR simple
	close 99 : open "r",99,l.fic,1
	field 99,1 as l99
		if		lof(99) < 4_
			then		close 99 : kill l.fic : fnexist=0 : exit function
	close 99 : fnexist=-1
	end function

Code: Select all

' $title:'SACK - Ack Cmd'

sub sack(a$,nb.ack) static
	l.tab="	"
	nb.ack=0 : n.l=len(a$)
		if		n.l=0 _
			then		exit sub
	w.a$=space$(n.l)
	lset w.a$=a$
	nb.ack=1 : l.ack(1)=""

	for i=1 to n.l
	b$=mid$(w.a$,i,1)
		if		b$=" " or b$=l.tab_
					goto S.ACK
	l.ack(nb.ack)=l.ack(nb.ack)+b$
	goto S.ACK.1
S.ACK:
		if		l.ack(nb.ack) <> ""_
			then		nb.ack=nb.ack+1 : l.ack(nb.ack)=""
S.ACK.1:
	next i
		if		l.ack(nb.ack)=""_
			then		nb.ack=nb.ack-1
end sub

Re: How to avoid QB64 window?

Posted: Tue Oct 13, 2015 11:54 am
by burger2227
I fixed your code and combined all the INCLUDE files into one program below:

Code: Select all

' $title:'CUTV - Partage F. NKV en 2 Fic.'

OPTION BASE 0
DEFINT C-K, M-Z
DEFSTR L

$CONSOLE
_DEST _CONSOLE

CLEAR , , 1000
DIM SHARED ct!(1 TO 500)
DIM SHARED id(1 TO 500), ig(1 TO 500), ir(1 TO 500)
DIM SHARED l(1 TO 20), l.ack(1 TO 501)
DIM SHARED n0.sort(1 TO 500)
DIM SHARED sort(1 TO 500), sort!(1 TO 500), sort#(1 TO 500)

l.sp.3 = SPACE$(3)
l.sp.6 = SPACE$(6)

PRINT "CUTV "; COMMAND$; fntim$
CALL sack(COMMAND$, nb.ack)
      if      nb.ack=0_
         then      print "Arg. absent" : end
l.fin = l.ack(1): PRINT l.fin
p = VAL(l.ack(2)): PRINT p
l.fout = l.ack(3): PRINT l.fout
l.fout1 = l.ack(4)
      if      not fnexist(l.fin)_
         then      print "   Absent F. In" : goto ZEND
CLOSE 2: OPEN "o", 2, l.fout
CLOSE 1: OPEN "i", 1, l.fin
      if      l.fout1 <> ""_
         then      close 4 : open "o",4,l.fout1 : fl.2=-1
WHILE NOT EOF(1)
    LINE INPUT #1, a$: CALL sack(a$, nb.ack)
      if      fl.2_
         then      print #2,left$(a$,p-1) :_
               print #4,mid$(a$,p) : exit while
    PRINT #2, MID$(a$, p)
WEND
ZEND:
PRINT "CUTV "; COMMAND$; fntim$
END

FUNCTION fnexist (l.fic)
'   KILL sur DIR simple
CLOSE 99: OPEN "r", 99, l.fic, 1
FIELD 99, 1 AS l99
      if      lof(99) < 4_
         then      close 99 : kill l.fic : fnexist=0 : exit function
CLOSE 99: fnexist = -1
END FUNCTION

SUB sack (a$, nb.ack) STATIC
l.tab = "   "
nb.ack = 0: n.l = LEN(a$)
      if      n.l=0 _
         then      exit sub
w.a$ = SPACE$(n.l)
LSET w.a$ = a$
nb.ack = 1: l.ack(1) = ""

FOR i = 1 TO n.l
    b$ = MID$(w.a$, i, 1)
      if      b$=" " or b$=l.tab_
               goto S.ACK
    l.ack(nb.ack) = l.ack(nb.ack) + b$
    GOTO S.ACK.1
    S.ACK:
      if      l.ack(nb.ack) <> ""_
         then      nb.ack=nb.ack+1 : l.ack(nb.ack)=""
    S.ACK.1:
NEXT i
      if      l.ack(nb.ack)=""_
         then      nb.ack=nb.ack-1
END SUB
When posting code use the Code button and Paste the code in the center of the two boxes. The pointer is already there. Why you needed all the INCLUDE files seems like obfuscation to me. Most had little in them.

Now I gather that you call the procedure with parameters read by COMMAND$. You can do that with any program.

Re: How to avoid QB64 window?

Posted: Tue Oct 13, 2015 3:35 pm
by barmet
In terms of "degeugleu" you can take the English translation of the post and then put it in French and then in English. Already the first juice is incomprehensible, you will appreciate the second. It is not easy to post on forums anglophones, especially when you are only 20 years of English.
Thank you for the tip on the code, I did not dare put in the middle. I am not a $$$ post.
For cons, I do not know why you changed it. I think, with my experience, my writing is much more readable, INCLUDE modules are simple and well known to the user (the interesting one is visible).
Do not tell me to pass parameters by command$, this is done for thirty years in all my modules (command$ read by the routine sack).
This is all well and good but it does not provide a solution to my problem and I'm going to have to spend in FORTRAN. As I have a thousand modules, I'll have a transcription BASIC / FORTRAN to do with XP on VMware.
Now if you have a tip to post in GALLEON as I asked you, there might be someone who could unlock my situation.
Finally, thank you for all your efforts.

barmet

Re: How to avoid QB64 window?

Posted: Wed Oct 14, 2015 1:00 pm
by burger2227
COMMAND$ arrays in QB64 GL

I will not transfer code there from here if you won't take he time to join at QB64.NET.

If robots can join then you should be able to...