Qbasicnews.com

QBasic => QB Discussion & Programming Help => Topic started by: monRa on November 10, 2004, 01:55:25 PM



Title: Dn Manager - Elize bot running problems
Post by: monRa on November 10, 2004, 01:55:25 PM
Hello,
i'm have programme dthe following program:
Code:

TYPE dns
dn AS STRING * 60
reg AS STRING * 50
usr AS STRING * 30
pass AS STRING * 30
END TYPE

DIM nam AS dns
OPEN "names.dns" FOR RANDOM AS #1 LEN = LEN(nam)
INPUT "Write the domain here"; nam.dn
INPUT "Write the register"; nam.reg
INPUT "Write the username"; nam.usr
INPUT "Write password"; nam.pass
PUT 1, nam
PUT [filename], [recordnumber], [arrayname]
INPUT "Which domain informations would you like see?"; nam.dn
GET 1.nam
PRINT "Domain name:"; nam.dn
PRINT "Register:"; nam.reg
PRINT "Username:"; nam.usr
PRINT "Password:"; nam.pass


The problem is i cannot run it, i don't know why? Please help

ASLO I  DOWNLOADED eliza http://www.petesqbsite.com/reviews/misc/eliza.html
but when trying run the .bas files i see errors please help me!


Title: Re: Dn Manager - Elize bot running problems
Post by: Neo on November 10, 2004, 02:50:54 PM
I modified your code a bit.
Code:
TYPE dns
   dn AS STRING * 60
   reg AS STRING * 50
   usr AS STRING * 30
   pass AS STRING * 30
END TYPE

DIM nam AS dns
OPEN "names.dns" FOR BINARY AS #1
   INPUT "Write the domain here"; nam.dn
   INPUT "Write the register"; nam.reg
   INPUT "Write the username"; nam.usr
   INPUT "Write password"; nam.pass
   SEEK #1, LOF(1) + 1
   PUT #1, , nam
   INPUT "Which domain informations would you like see?"; nam.dn
   SEEK #1, 1
   DIM tmp AS dns
   DO
      GET #1, , tmp
   LOOP UNTIL tmp.dn = nam.dn OR EOF(1)
   IF tmp.dn <> nam.dn THEN
      PRINT "Not found"
   ELSE
      PRINT "Domain name:"; nam.dn
      PRINT "Register:"; nam.reg
      PRINT "Username:"; nam.usr
      PRINT "Password:"; nam.pass
   END IF
CLOSE #1


I don't know if it works now, because I haven't tested it, but it looks fine to me ;) (That doesn't exclude any mistakes from my side).

Hope it helps a bit,

Neo
:)


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 10, 2004, 02:58:46 PM
Hey Neo,
is there any way prevent the "?" form the INPUT variable?
By the way? Is there any way to see this when a user open the program:
1. Add a domain name
2. See a domain name
3. Exit
I think the up^ could be done with CASE but i'm not sure

and by the way can we program an icon through qbasic, i mean not be this exe ixon but a icon i have create dfrom photoshop
thanks


Title: Dn Manager - Elize bot running problems
Post by: Neo on November 10, 2004, 03:05:50 PM
Quote from: "monRa"
is there any way prevent the "?" form the INPUT variable?

Yeah, write input with a comma instead of a semicolon. Like this:
Code:
INPUT "Your name please:", yourname$


Quote from: "monRa"
By the way? Is there any way to see this when a user open the program:
1. Add a domain name
2. See a domain name
3. Exit
I think the up^ could be done with CASE but i'm not sure

Of course that's possible :) All you have to do is have the user enter the corresponding key.
Code:
DO
   CLS
   PRINT "1. Add a domain name"
   PRINT "2. See a domain name"
   PRINT "3. Exit"
   DO
      K$ = INKEY$
   LOOP UNTIL K$ = "1" OR K$ = "2" OR K$ = "3"

   SELECT CASE K$
      CASE "3"
         'exit here
         END
         'or -> EXIT DO
      CASE "2"
         'jump to your "see domain name code"
      CASE "1"
         'jump to your "add domain name code"
   END SELECT
LOOP

You can find information about all keywords used in the QB Help, or in the QB Online Help (http://qbasicnews.com/qboho).

I didn't fully understand what you wanted to do with the icon, please explain some more if you wish ;)

I hope it helped a bit,

Neo
:)


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 10, 2004, 03:32:58 PM
Hey,
i don't know hwo to insert the code here:
Quote
CASE "2"
         'jump to your "see domain name code"
      CASE "1"
         'jump to your "add domain name code"

I tried add all the:
Code:
OPEN "names.dns" FOR BINARY AS #1
   INPUT "Write the domain here"; nam.dn
   INPUT "Write the register"; nam.reg
   INPUT "Write the username"; nam.usr
   INPUT "Write password"; nam.pass
   SEEK #1, LOF(1) + 1
   PUT #1, , nam

at a case but couldn't run

 :bounce:

Thankd for input thing,

WHta do i mean with icon, all files have an icon, notepad has an icon, a game has an icon so i wanna add a icon to my program too but i don't know if that is possible in qb


Title: Dn Manager - Elize bot running problems
Post by: Neo on November 10, 2004, 03:45:54 PM
Well, you could do something like this:

Code:
DECLARE SUB NewDomain ()
DECLARE SUB SeeDomain ()

TYPE dns
   dn AS STRING * 60
   reg AS STRING * 50
   usr AS STRING * 30
   pass AS STRING * 30
END TYPE

DO
   CLS
   PRINT "1. Add a domain name"
   PRINT "2. See a domain name"
   PRINT "3. Exit"
   DO
      K$ = INKEY$
   LOOP UNTIL K$ = "1" OR K$ = "2" OR K$ = "3"

   SELECT CASE K$
      CASE "3"
         'exit here
         END
         'or -> EXIT DO
      CASE "2"
         'jump to your "see domain name code"
         CALL SeeDomain
      CASE "1"
         'jump to your "add domain name code"
         CALL NewDomain
   END SELECT
LOOP

SUB NewDomain
   DIM nam AS dns
   OPEN "names.dns" FOR BINARY AS #1
      INPUT "Write the domain here"; nam.dn
      INPUT "Write the register"; nam.reg
      INPUT "Write the username"; nam.usr
      INPUT "Write password"; nam.pass
      SEEK #1, LOF(1) + 1
      PUT #1, , nam
   CLOSE #1
   PRINT "Domain Added!"
   T! = TIMER: WHILE TIMER - T! < 2: WEND
END SUB

SUB SeeDomain
   DIM nam AS dns
   OPEN "names.dns" FOR BINARY AS #1
      INPUT "Which domain informations would you like see?"; nam.dn
      SEEK #1, 1
      DIM tmp AS dns
      DO
         GET #1, , tmp
      LOOP UNTIL tmp.dn = nam.dn OR EOF(1)
      IF tmp.dn <> nam.dn THEN
         PRINT "Not found"
      ELSE
         PRINT "Domain name:"; tmp.dn
         PRINT "Register:"; tmp.reg
         PRINT "Username:"; tmp.usr
         PRINT "Password:"; tmp.pass
      END IF
   CLOSE #1
   T! = TIMER: WHILE TIMER - T! < 3.5: WEND
END SUB


I hope it works, because I didn't test it. Anyway, I've used SUBs here, because it's the cleanest way of programming. If you're not used to SUBs, read about them in the QB Help or read some tutorials. You can also do it with GOTO or GOSUB if you wish.

I hope it helped a bit,

Neo
;)


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 10, 2004, 06:46:19 PM
Thanks, works and it's great,
could you help me in the icon and eliza bot question?


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 11, 2004, 07:30:26 AM
any ideas guys,


Title: Dn Manager - Elize bot running problems
Post by: Neo on November 11, 2004, 12:14:27 PM
The Eliza program works fine for me. Can you describe what happens when you run the program? :)

About the icons, it is usually impossible to add icons to your program by means of code. For DOS programs, you can select an icon when you right-click -> Properties -> set icon -> SHELL32.DLL -> Select your icon. I don't know if this is what you want though.


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 11, 2004, 05:48:10 PM
hey
i worked wit eliza but couldn't do icon!


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 15, 2004, 10:09:25 AM
Hey Neo is there any way with an order make it so i will have a 4 case to search?
fOR example one person click the 4 case Search an dyou will see in the screen:
Search in the x(number) of your domain names:
an dthen here more cases:
see all the domains
search for domain containig this character(character will be added by user)
is that possible in qbasic?


Title: Dn Manager - Elize bot running problems
Post by: Neo on November 15, 2004, 04:38:55 PM
How do you mean MonRa? Could you please explain a bit more?

Oh... btw... You'll be surprised about how much can be done in QB ;)


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 15, 2004, 05:14:31 PM
I'm already suprised! I mean have possibilities like an real database, search and do record sets?
you know access?


Title: Dn Manager - Elize bot running problems
Post by: Neo on November 15, 2004, 05:21:53 PM
Well, you can access databases from QB, but it would require a lot of workarounds, simply because the Access format was designed for Windows. For example, on this site: http://www.wotsit.org/search.asp?s=database you can find some resources on how specific file formats are build up, and then you can write a program that reads from the file and shows the data in it.
In know Access in Visual Basic, using the pre-made database components. It makes life a lot easier ;)

You can also make a database file for yourself, if your planning it to use it yourself. Like many QBers do, they make up their own file format for e.g. game data or password files. There's no program except their own that can read it, unless the format is researched and a format description is written.

But did you have any troubles with the... "4 case to search"?


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 15, 2004, 05:31:40 PM
I don't know how to do the search case 4?,
thanks for access infomrations, I HATE VISUALBASIC though!


Title: Dn Manager - Elize bot running problems
Post by: Neo on November 15, 2004, 05:35:35 PM
I don't know if you got the message properly (sorry), but I asked you if you could explain what you meant with that "4 case search" or something. If I don't know what you ask, I can't help you :( Could you explain a little more detailed what you want? It would help the process of me helping you :)

Visual Basic is good if you know how to use it effectively and efficiently. ;)


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 15, 2004, 05:39:01 PM
Yes,
look i would like know if is possible add a search function so i can search all the domains at: names.dns file. For example i would know if it is possible to have a case at the 1,2,3 beginning cases and add a 4 case for search also serach would have 4 case search by domain search by username search by password and search by register?
is that possible :bounce:


Title: Dn Manager - Elize bot running problems
Post by: Neo on November 15, 2004, 05:45:07 PM
Of course! :D You can add cases you want in this piece of the code (compare this to some posts above to see the changes I made):
[syntax="QBasic"]DO
   CLS
   PRINT "1. Add a domain name"
   PRINT "2. See a domain name"
   PRINT "3. Search domain"
   PRINT "4. Exit"
   DO
      K$ = INKEY$
   LOOP UNTIL K$ = "1" OR K$ = "2" OR K$ = "3" OR K$ = "4"

   SELECT CASE K$
      CASE "4"
         'exit here
         END
         'or -> EXIT DO
      CASE "3"
         'jump to your "search domain code"
         CALL SearchDomain
      CASE "2"
         'jump to your "see domain name code"
         CALL SeeDomain
      CASE "1"
         'jump to your "add domain name code"
         CALL NewDomain
   END SELECT
LOOP[/syntax]

All you have to do then is make the SUB SearchDomain that will ask the user for values and searches the DNS file.
If you want any help writing this routine, just ask ;)


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 15, 2004, 05:47:48 PM
thanks neo
you are cool


Title: Dn Manager - Elize bot running problems
Post by: Neo on November 15, 2004, 06:00:45 PM
Thanks monRa, no problem ;)

Actually, the program we talked about recently is just an example of a simple program, with just a text user interface.

Later on, after you learnt a bit more, you'll be able to make Graphical User Interfaces in both Text and Graphics modes.
To give you examples on what these Text and Graphical user interfaces look like, you can download the following libraries, made by me.
#1. http://qbnz.com/harsoft/NeoCL.zip (extract and run /NNS/NNS.EXE)
#2. http://www.petesqbsite.com/downloads/NeoLib16.zip (extract and run /EXAMPLES/CDPLAYER/CDPLAY.EXE)

The first zip file #1, is a library which I made that enables the user to compress files, just like WinZIP and WinRAR etc would do. Although the compression ratio is still a lot higher than Zip's, it's still quite nice for QB.

The second zip file #2, is a Mode 13h library which I made that enables the user to use graphical mode 13h (320x200x256) easily and effectively. It was made in PureQB, the source code is included (as always), so maybe you can learn something from it ;)

Have a try :)


Title: Dn Manager - Elize bot running problems
Post by: KiZ on November 15, 2004, 07:34:34 PM
I just saw this thread, and remember Eliza from so many years ago! =D

I seem to remember having to change the path names to display the titlescreens of Eliza. This may be a cause of the problem.

What error message are you getting?


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 16, 2004, 09:42:01 AM
ok
thanks Neo

hey dark_prevail i don't have any problem with eliza now :lol: i fixed that alone, by the way i cannot open the QB.EXE so i canot compile the code an di don't remmeber where did i download QBASIC so install again, any link guys?


Title: Dn Manager - Elize bot running problems
Post by: Z!re on November 16, 2004, 10:00:17 AM
www.download-qb.tk


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 16, 2004, 10:46:56 AM
hey
thanks


Title: Dn Manager - Elize bot running problems
Post by: Neo on November 16, 2004, 10:52:07 AM
It's got a large collection of QB and QuickBasic versions. Most people prefer to use QB45 and QB71 (PDS) though. ;)


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 16, 2004, 05:48:38 PM
hey still not working, when i try to run QB.EXE i see this
C:\WINDOWS\system32\autoexec.nt. The system file si not suitabel for running in MS-DOS and Microsoft Windows appiclations

what can i do?


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 19, 2004, 08:46:16 AM
do you know where to find these file, i think it was deletetd by my spyware!


Title: Dn Manager - Elize bot running problems
Post by: Neo on November 19, 2004, 08:57:17 AM
AUTOEXEC.NT is in your C:\WINDOWS\SYSTEM32 directory. It's just a text file, here's mine:

Code:
@echo off

REM AUTOEXEC.BAT is not used to initialize the MS-DOS environment.
REM AUTOEXEC.NT is used to initialize the MS-DOS environment unless a
REM different startup file is specified in an application's PIF.

REM Install CD ROM extensions
lh %SystemRoot%\system32\mscdexnt.exe

REM Install network redirector (load before dosx.exe)
lh %SystemRoot%\system32\redir

REM Install DPMI support
lh %SystemRoot%\system32\dosx

REM Mouse
E:\QB\MOUSE


(Don't forget the enter at the end)


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 19, 2004, 06:05:39 PM
No when i opne QB.EXE
i see this:

Not ready reading drive E
Abort, retry, Fail?

i cannot write anything after the "?"


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 22, 2004, 09:10:24 AM
hey
guys
could you help me?


Title: Dn Manager - Elize bot running problems
Post by: Z!re on November 22, 2004, 10:08:07 AM
You need to edit the last line in Neos post, the one that reads:
E:\QB\MOUSE

To the path were you have a 16BIT DOS Mousedriver...

BUT, you could just delete that line and see if it works anyways, most of the times the standard drivers work when you're under windows.


Title: Dn Manager - Elize bot running problems
Post by: Neo on November 22, 2004, 02:16:21 PM
:o Doh, how stupid of me! I completely overlooked the fact that not everyone has their QB folder on their E drive! :D

Incidentally, you can just remove the line. It won't work out very different.


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 24, 2004, 10:23:37 AM
and do you know where are t other the mouse file i searche through the search program in my windows xp but nothing


Title: Dn Manager - Elize bot running problems
Post by: Z!re on November 24, 2004, 01:44:54 PM
Just  leave the line out, erase it


Title: Dn Manager - Elize bot running problems
Post by: Neo on November 24, 2004, 02:09:15 PM
DELETE the line with the mouse driver call :D


Title: Dn Manager - Elize bot running problems
Post by: monRa on November 24, 2004, 05:00:31 PM
the bad is still getting same error


Title: Dn Manager - Elize bot running problems
Post by: monRa on December 07, 2004, 05:30:59 PM
Iäm still getting the same error guys??


Title: Dn Manager - Elize bot running problems
Post by: Z!re on December 07, 2004, 06:18:09 PM
Download this file:
http://quickhost.qbtk.com/download.php?id=360

And put it in C:\Windows\System32


You are running windows XP, without showing file extensions.

Which sucks if you want to program, ask someone to help you show extensions.


Title: Dn Manager - Elize bot running problems
Post by: CrazyAlabamianLlama on December 08, 2004, 07:55:19 AM
Hey,
     
       I have Windows XP and I can program nicely on it! What extensions do you need?


Title: Dn Manager - Elize bot running problems
Post by: Z!re on December 08, 2004, 11:29:17 AM
He needed Autoexec.nt, which can be found on the above URL for 6 more days.


Title: Dn Manager - Elize bot running problems
Post by: monRa on December 12, 2004, 07:53:48 AM
without showing file extensions.
i can see the file extensions and hav efound the file autoexe.nt days ago!
The problem is where the MOUSE file is?


Title: Dn Manager - Elize bot running problems
Post by: Z!re on December 12, 2004, 01:30:56 PM
Never mind the mouse file, just remove the last line in Autoexec.nt if it says anything about mouse

You don't need it.

Ignore the mouse file.


Title: Dn Manager - Elize bot running problems
Post by: monRa on December 16, 2004, 10:55:38 AM
working now
thanks
i just was idiot and gotte autoexe.net.txt :barf: