Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 05-12-2007, 04:03 AM   #1 (permalink)
 
True Techie

Join Date: Sep 2006

Location: Wouldn't you like to know?

Posts: 142

sir nerdalot

Default QBASIC Modem

What I want to do is make a program that can dial people's phones using a modem in QBASIC. I basically want to make a program sort of like what the guy had in the 1983 film WarGames. I am a beginner at QBASIC but I am confident I can do this program, with a bit of help. I read the QBASIC help files on opening com ports and this is what I came up with.


OPEN "COM1: [300] [,[E] [,[7] [,1]]]] BIN" [FOR OUTPUT] AS [#]255% [LEN=128%]


What I want to know is: Is there any code to make QBASIC make a modem call a specific number? Also, what com port does a modem generally use?
sir nerdalot is offline  
Old 05-12-2007, 08:10 AM   #2 (permalink)
 
True Techie

Join Date: Sep 2006

Location: Wouldn't you like to know?

Posts: 142

sir nerdalot

Smile

bump
sir nerdalot is offline  
Old 05-12-2007, 11:31 AM   #3 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default Re: QBASIC Modem

Quote:
Also, what com port does a modem generally use?
Just look in the device manager. It will tell you what com port your modem is using.

I don't know QBASIC, but the principles are the same regardless of what language you use. You need to open the appropriate serial port, and dial the number using AT commands. You can test out your commands in Hyperterminal before you code them.
For information on how to use AT commands, check here: Serial Programming:Modems and AT Commands - Wikibooks, collection of open-content textbooks
jaeusm is offline  
Old 05-12-2007, 11:01 PM   #4 (permalink)
 
True Techie

Join Date: Sep 2006

Location: Wouldn't you like to know?

Posts: 142

sir nerdalot

Default Re: QBASIC Modem

Quote:
Originally Posted by jaeusm View Post
Just look in the device manager. It will tell you what com port your modem is using.
No, I meant what port other people would generally make their modem use.
sir nerdalot is offline  
Old 05-13-2007, 12:35 AM   #5 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default Re: QBASIC Modem

Why do you want to know that? And moreover, your program should figure it out.
jaeusm is offline  
Old 05-13-2007, 01:13 AM   #6 (permalink)
 
True Techie

Join Date: Sep 2006

Location: Wouldn't you like to know?

Posts: 142

sir nerdalot

Default Re: QBASIC Modem

If I may direct your attention to the snippet of code on my 1st post in this thread, it basically says open comport 1. What if the modem is on comport 2?
sir nerdalot is offline  
Old 05-13-2007, 09:17 PM   #7 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default Re: QBASIC Modem

Quote:
What if the modem is on comport 2?
Then your program should figure it out. If you want to take the easy route, prompt the user for the appropriate com port. Why do you want to know what port other people use anyway?

Last edited by jaeusm; 05-13-2007 at 09:21 PM.
jaeusm is offline  
Old 05-15-2007, 02:13 AM   #8 (permalink)
 
True Techie

Join Date: Sep 2006

Location: Wouldn't you like to know?

Posts: 142

sir nerdalot

Default Re: QBASIC Modem

Quote:
Originally Posted by jaeusm View Post
Why do you want to know what port other people use anyway?
So I know how to write the program.
sir nerdalot is offline  
Old 05-15-2007, 10:13 AM   #9 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default Re: QBASIC Modem

What port other people use should have no impact on how you write the program.
jaeusm is offline  
Old 05-16-2007, 02:53 AM   #10 (permalink)
 
True Techie

Join Date: Sep 2006

Location: Wouldn't you like to know?

Posts: 142

sir nerdalot

Default Re: QBASIC Modem

well it does, because I need to know which port to make the program open. If I say "Open comport1", but it is in fact a serial port for example, then it will send the info I tell it to send to whatever is connected to the serial port and potentially f**k up that peice of hardware.
sir nerdalot is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting my access point direct to my modem deanos63 Computer Networking & Internet Access 3 04-25-2007 01:49 PM
One modem, two networks Greg Browser & General Internet Questions 2 04-15-2007 04:51 PM
NTL cable modem E08C007 USB driver for WinXP SirMille Computer Networking & Internet Access 2 04-14-2007 06:22 PM