CLIF wrote:
Windows 2000
jBASE 3.4

I'm trying to get the console to beep by printing char(7) from a jbc
program. Is there some other jBASE or Windows setting that has to be
set for this to work?
Windows console is not really a console so for a beep to work it has to be supported in a program, which is what cmd.exe does. The jBASE telnet/jSHELL would have to support it, but it is generally considered a good idea to have 200 telnets causing the server system's speaker to beep ;-)...

...except by those of us with a malicious streak, who just imagined some poor sysadmin going crazy. So, you could try:

EXECUTE "sndrec32 /play /close c:\winnt\Media\notify.wav"

Or

as the Win32 Beep() API does not require parameters, you might be able to use:

DEFC INT Beep()

Beep()

But you may get warnings from the C compiler that Beep was declared as UINT32 and is void (which you can ignore). Possibly:

CALLC Beep()

Might work better in that case :-)

Or, if you want a kludge (and why not, it is MV):

ECHO @ECHO ALT-7 > BEEP.BAT

(ALT-7 means hold down ALT then press 7, then let go of ALT).

Then try EXECUTE CHAR(255):"s":"BEEP.BAT"

Or, you could print:

. .  .  ..
.  .  . .
        .

Or you could buy a copy of MV.Net and make a call into Windows that way.

Or you could write the following in C#:

using namespace System;
int main()
{
         Console::Beep();
}

And EXECUTE the .EXE

Or make it a static method in a .Net assembly and use the (incredibly stupidly cased and whoever did that is fired): CALLdotNet

Jim

Right - I am back on the meds now...




--~--~---------~--~----~------------~-------~--~----~
Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to