Qbasicnews.com
April 01, 2020, 06:05:15 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: Dn Manager - Elize bot running problems  (Read 9192 times)
monRa
Member
*
Posts: 28


« 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!
Logged

url=http://www.checkdomain.org]CHECKDOMAIN[/url]
BOASTOLOGY.COM TEH BEST BLOG SYSTEM IN THE WEB SOON COMING WITH NEW TEMPLATES AT BOASTMACHINE.COM

we aren't asscoiated with bnsoft.net
Neo
Na_th_an
*****
Posts: 2150



« Reply #1 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 Wink (That doesn't exclude any mistakes from my side).

Hope it helps a bit,

Neo
Smiley
Logged
monRa
Member
*
Posts: 28


« Reply #2 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
Logged

url=http://www.checkdomain.org]CHECKDOMAIN[/url]
BOASTOLOGY.COM TEH BEST BLOG SYSTEM IN THE WEB SOON COMING WITH NEW TEMPLATES AT BOASTMACHINE.COM

we aren't asscoiated with bnsoft.net
Neo
Na_th_an
*****
Posts: 2150



« Reply #3 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 Smiley 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.

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

I hope it helped a bit,

Neo
Smiley
Logged
monRa
Member
*
Posts: 28


« Reply #4 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
Logged

url=http://www.checkdomain.org]CHECKDOMAIN[/url]
BOASTOLOGY.COM TEH BEST BLOG SYSTEM IN THE WEB SOON COMING WITH NEW TEMPLATES AT BOASTMACHINE.COM

we aren't asscoiated with bnsoft.net
Neo
Na_th_an
*****
Posts: 2150



« Reply #5 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
Wink
Logged
monRa
Member
*
Posts: 28


« Reply #6 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?
Logged

url=http://www.checkdomain.org]CHECKDOMAIN[/url]
BOASTOLOGY.COM TEH BEST BLOG SYSTEM IN THE WEB SOON COMING WITH NEW TEMPLATES AT BOASTMACHINE.COM

we aren't asscoiated with bnsoft.net
monRa
Member
*
Posts: 28


« Reply #7 on: November 11, 2004, 07:30:26 AM »

any ideas guys,
Logged

url=http://www.checkdomain.org]CHECKDOMAIN[/url]
BOASTOLOGY.COM TEH BEST BLOG SYSTEM IN THE WEB SOON COMING WITH NEW TEMPLATES AT BOASTMACHINE.COM

we aren't asscoiated with bnsoft.net
Neo
Na_th_an
*****
Posts: 2150



« Reply #8 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? Smiley

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.
Logged
monRa
Member
*
Posts: 28


« Reply #9 on: November 11, 2004, 05:48:10 PM »

hey
i worked wit eliza but couldn't do icon!
Logged

url=http://www.checkdomain.org]CHECKDOMAIN[/url]
BOASTOLOGY.COM TEH BEST BLOG SYSTEM IN THE WEB SOON COMING WITH NEW TEMPLATES AT BOASTMACHINE.COM

we aren't asscoiated with bnsoft.net
monRa
Member
*
Posts: 28


« Reply #10 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?
Logged

url=http://www.checkdomain.org]CHECKDOMAIN[/url]
BOASTOLOGY.COM TEH BEST BLOG SYSTEM IN THE WEB SOON COMING WITH NEW TEMPLATES AT BOASTMACHINE.COM

we aren't asscoiated with bnsoft.net
Neo
Na_th_an
*****
Posts: 2150



« Reply #11 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 Wink
Logged
monRa
Member
*
Posts: 28


« Reply #12 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?
Logged

url=http://www.checkdomain.org]CHECKDOMAIN[/url]
BOASTOLOGY.COM TEH BEST BLOG SYSTEM IN THE WEB SOON COMING WITH NEW TEMPLATES AT BOASTMACHINE.COM

we aren't asscoiated with bnsoft.net
Neo
Na_th_an
*****
Posts: 2150



« Reply #13 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 Wink

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"?
Logged
monRa
Member
*
Posts: 28


« Reply #14 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!
Logged

url=http://www.checkdomain.org]CHECKDOMAIN[/url]
BOASTOLOGY.COM TEH BEST BLOG SYSTEM IN THE WEB SOON COMING WITH NEW TEMPLATES AT BOASTMACHINE.COM

we aren't asscoiated with bnsoft.net
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!