Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dn Manager - Elize bot running problems
#1
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!
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
Reply
#2
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
Smile
Reply
#3
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
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
Reply
#4
Quote: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: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 Smile 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
Smile
Reply
#5
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
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
Reply
#6
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
Reply
#7
Thanks, works and it's great,
could you help me in the icon and eliza bot question?
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
Reply
#8
any ideas guys,
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
Reply
#9
The Eliza program works fine for me. Can you describe what happens when you run the program? Smile

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.
Reply
#10
hey
i worked wit eliza but couldn't do icon!
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)