[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2010-06-26T02:44:12-05:00 http://www.petesqbsite.com/phpBB3/app.php/feed/topic/3287 2010-06-26T02:44:12-05:00 2010-06-26T02:44:12-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=20817#p20817 <![CDATA[QBASIC SET VARIABLE in DOS]]> that works! :lol:

I think: "I make a stand alone exe-file and SET the DOS params"
But if I close the EXE file the DOS params is not set.

But this way (a batch file in Qbasic) work very well.

Thank you very much for all answers.

this is the solution! :D

Statistics: Posted by Andries — Sat Jun 26, 2010 2:44 am


]]>
2010-06-25T14:09:04-05:00 2010-06-25T14:09:04-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=20815#p20815 <![CDATA[QBASIC SET VARIABLE in DOS]]>
The value will disappear when the Qbasic program ends! It is not permanent! I cannot get it to work either. Out of memory.

However if you set the number at the beginning of the QB program it may be there when you need it IN the program. NOT DOS!

If that does not work, then create a batch file IN the Qbasic program and run it after it is made.

Statistics: Posted by burger2227 — Fri Jun 25, 2010 2:09 pm


]]>
2010-06-25T13:32:04-05:00 2010-06-25T13:32:04-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=20814#p20814 <![CDATA[QBASIC SET VARIABLE in DOS]]>
But I think, I must give it up.

If I try the

Code:

SHELL "SET NUMBER=" + num$
there is no memory error.

But if I look on the DOS prompt with the command SET there is no variable NUMBER.

I do not get it. :(

If I start up with DOS and type

Code:

SET NUMBER=3
And I type SET the variable NUMBER is set to 3 (NUMBER=3)

But if I would make it in QB45 it seems that it is not possible. :?:

Statistics: Posted by Andries — Fri Jun 25, 2010 1:32 pm


]]>
2010-06-23T18:12:21-05:00 2010-06-23T18:12:21-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=20792#p20792 <![CDATA[QBASIC SET VARIABLE in DOS]]>
DID you try the SHELL?

SHELL "SET NUMBER=" + num$

That should work same as DOS. You said it worked in DOS right?


You can try LOCATE , , 1 to display the cursor, but it does not work on my XP. After INPUT$(4) procedure use LOCATE , , 0 to set it back.

Statistics: Posted by burger2227 — Wed Jun 23, 2010 6:12 pm


]]>
2010-06-23T13:14:36-05:00 2010-06-23T13:14:36-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=20790#p20790 <![CDATA[QBASIC SET VARIABLE in DOS]]> I am already glad that you try to help me!

but....

the first code works!

Code:

PRINT "Enter a 4 digit number" num$ = INPUT$(4) PRINT num$ 
But you can not see the key who I pressed (realtime)?
Is that correct?
(I can see it with the PRINT COMMAND but it is less beautyfull)


And :-(

Code:

ENVIRON "NUMER=" + num$
gives immediately a "Memory error"

I Hope that you can help me again..

Statistics: Posted by Andries — Wed Jun 23, 2010 1:14 pm


]]>
2010-06-22T15:07:14-05:00 2010-06-22T15:07:14-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=20785#p20785 <![CDATA[QBASIC SET VARIABLE in DOS]]>

Code:

PRINT "Enter a 4 digit number"num$ = INPUT$(4)PRINT num$ENVIRON "NUMBER=" + num$
Sorry!

You can also try SET by using SHELL.

Code:

  SHELL "SET NUMBER=1234"

Statistics: Posted by burger2227 — Tue Jun 22, 2010 3:07 pm


]]>
2010-06-22T11:29:37-05:00 2010-06-22T11:29:37-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=20784#p20784 <![CDATA[QBASIC SET VARIABLE in DOS]]>
The followed error does I have:

With sample 1:

By running the code There is a error bij "INPUT$"
Expected: statement

(Sample 1 does not compile)



But by sample 2:
I can read the params from DOS but there is no setting from QB45 into this params field set.

And by the sample 3:
If I try to compile this rule:
ENVIRON "NUMBER=HELLO"
The following error is displayed on the screen:
"Out of Memory"

-------------------------------------------
What is the aim?
On my company we proceed to Windows 7.
We have create one "golden Image" for all type's of computers / notebooks.

All of this computers (I think approximately 1500) must have a unique number.

We fill in on each computer the ASSETTAG (from the BIOS)
And if we get the image on the computer we can read the ASSETTAG of the BIOS with *.VBS script.
And this number is the number of the Windows machine.


But we have different tools to set the ASSETTAG of this machine's
(different manufacturers)


I have create a BOOTABLE USB-key with a batch file.
But each tool has different params.

Now I would make a Batch or QB45 (DOS) tool


And if the USB start up I pressed a PCNumber.
Then SET the PCNumber in the DOS PARAMS
And also I can fill in the PCnumber without the list of params from the ASSETTAGTool.

e.q.

(QB?)Which PC number do you have?
Answer: 1234
(QB?) SET PCNUMBER=1234

And then I can make:

ASSETTAG.EXE /D /CA /-y %PCNUMBER%

And the I can RESET the computer and set the GoldenImage on this machine.
-------------------------------------------

I hope you can understand me, my English is not optimum

Statistics: Posted by Andries — Tue Jun 22, 2010 11:29 am


]]>
2010-06-22T15:05:43-05:00 2010-06-19T16:41:03-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=20776#p20776 <![CDATA[QBASIC SET VARIABLE in DOS]]>

Code:

PRINT "Enter a 4 digit number"num$ = INPUT$(4)PRINT num$ENVIRON "NUMBER=" + num$

This can be used as a temporary setting that will not work after the QB program is done. It will be added to the list to view with:

PRINT ENVIRON$("NUMBER") ' will display the number only

To view the entire list of settings as SET would display them:

Code:

DO  count = count + 1  PRINT ENVIRON$(count)  IF count MOD 20 = 0 THEN        PRINT "Press a key!": SLEEP       CLS  END IFLOOP until ENVIRON$(count) = ""
Use SHELL to SET it in DOS. By the way, how would you UNSET it in DOS? Restart PC? I don't recommend messing with SET as the QB program could set it temporarily and invisibly.

Statistics: Posted by burger2227 — Sat Jun 19, 2010 4:41 pm


]]>
2010-06-19T03:10:54-05:00 2010-06-19T03:10:54-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=20773#p20773 <![CDATA[QBASIC SET VARIABLE in DOS]]> If I use this you can also type a 2 digit number or a 5 digit number.
there is no control if it is a 4 digit number.

And on this manner there is not variable SET it in the DOS variable.
(check it with type "SET" in the DOS command prompt)

Statistics: Posted by Andries — Sat Jun 19, 2010 3:10 am


]]>
2010-06-18T22:41:38-05:00 2010-06-18T22:41:38-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=20772#p20772 <![CDATA[QBASIC SET VARIABLE in DOS]]>
PRINT number%

Statistics: Posted by burger2227 — Fri Jun 18, 2010 10:41 pm


]]>
2010-06-18T15:57:27-05:00 2010-06-18T15:57:27-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=20770#p20770 <![CDATA[QBASIC SET VARIABLE in DOS]]>

I have a Qbasic problem and I hope you can help me.

I would write a Qbasic program who ask me a 4 digit code
e.g. 1234
(and not A...z or 123)

And then use the "4 digit code" and SET it in the DOS variable NUMBER


In the DOS prompt I can type the followed code

SET NUMBER=1234

And if I check it in DOS
type: SET
And I see: NUMBER=1234

But how can I make this in Qbasic?


Greetings,
Andries.

Statistics: Posted by Andries — Fri Jun 18, 2010 3:57 pm


]]>