TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: TIM HUTZLER
from: THOMAS GOHEL
date: 1996-12-19 00:00:00
subject: Re: Mouse Driver help

In article "Re: Mouse Driver help" (on 16.12.96), Tim Hutzler@1:119/88 says:
Hello Tim !!
> Is there is subfunction of INT 33 that recognizes a double-click.
> 33.5 is the closest I see, but I'm not sure that's what I want.
>
> Any comments?
Sorry for the german documentaion, but at the time I've enough work with
the PowerBASIC.GER and other PowerBASIC things .
'*************************************************************************
'
'   kombinierte Keyboard und Maus-Routine fr PowerBASIC 3.0/3.2
'
'   entwickelt von / developed by   :  Thomas Gohel
'                           Fido    :  Thomas Gohel@2:2410/330.1
'                           InterNet:  author@pbsound.snafu.de
'                           Homepage:  http://www.snafu.de/~pbsound/
'
'**************************************************************************
$COMPILE EXE
SHARED MausX%, MausY%, MausKlick%, MausDoppel%, MausButton%, MausFlag%
SHARED MausRightButton%
SHARED MausZeit???
SHARED MausStart???
SHARED A$
CLS
MausInit
MausEin
DO
    Keypressed
    LOCATE ,1: PRINT "Key: "; A$; "  ";
               PRINT " X:"; MausX%; " Y%:";MausY%;
               PRINT "  Left:"; MausButton%;
               PRINT "  Click:"; Mausklick%;
               PRINT "  Double:"; Mausdoppel%;
               PRINT "  Right:"; MausRightButton%; "       ";
LOOP WHILE A$  CHR$(27)
PRINT
PRINT "program aborted, end ..."
BEEP
END
SUB MausInit public
        MausFlag% = 0
        ! mov ax, &h0000
        ! int &h33
        ! cmp ax, &hFFFF
        ! jnz MausInitEnde
        MausFlag% = 1
        MausInitEnde:
END SUB
SUB MausEin public
        IF MausFlag% = 1 THEN
            ! mov ax, &h0001
            ! int &h33
            MausX% = 0
            MausY% = 0
            Mausklick% = 0
            Mausdoppel% = 0
        END IF
END SUB
SUB MausAus public
        IF MausFlag% = 1 THEN
            ! mov ax, &h0002
            ! int &h33
        END IF
END SUB
SUB Mausabfrage public
        IF MausFlag% = 1 THEN
            Mausklick%  = 0
            MausButton% = 0
            IF Mausdoppel% > 1 THEN MausDoppel% = 0
            ! mov ax, &h0003
            ! int &h33
            ! shr cx, 1
            ! shr cx, 1
            ! shr cx, 1
            ! inc cx
            ! shr dx, 1
            ! shr dx, 1
            ! shr dx, 1
            ! inc dx
            ! mov MausX%, cx
            ! mov MausY%, dx
            ! test bx, &b0000000000000001
            ! jz MausButtonNotPressed
            MausButton% = 1
            MausButtonNotPressed:
            ' linke Kn”pfe ermitteln
            ! mov ax, &h0006
            ! mov bx, &h0
            ! int &h33
            ! mov MausKlick%, bx
            ! mov MausDoppel% ,bx
            ' rechte Kn”pfe ermitteln
            ! mov ax, &h0006
            ! mov bx, &h1
            ! int &h33
            ! mov MausRightButton%, bx
            CALL MausUhr                             'vergangende Zeit holen
            MausEnde??? = MausZeit???
            IF MausEnde??? < MausStart??? THEN
                MausDoppel%  = 0
                MausStart??? = 0
            END IF
            IF MausDoppel% = 1 AND MausEnde??? =< MausStart??? + 25 THEN
                MausDoppel% = 2
            END IF
            IF MausDoppel% = 1 THEN
                CALL MausUhr
                MausStart??? = MausZeit???
            END IF
        END IF
END SUB
SUB MausUhr public
        IF MausFlag% = 1 THEN
            ! mov ah, &h2c
            ! int &h21
            ! mov MausSekunde?, dh
            ! mov MausMilli?, dl
            ! mov MausMinute?, cl
            Mauszeit??? = (MausMinute?*6000) + (MausSekunde?*100) + 
ausMilli?
        END IF
END SUB
SUB KeyPressed public
        IF MausFlag% = 1 THEN
            CALL MausAbfrage
            A$ = "": MausButton% = 0
            DO UNTIL MausButton% = 1 OR LEN(A$) > 0 OR MausKlick% > 0 OR 
MausRightButton% > 0
                CALL MausAbfrage
                A$ = UCASE$(INKEY$)
            WEND
        ELSE
            A$ = ""
            DO UNTIL LEN(A$) > 0
                A$ = UCASE$(INKEY$)
            WEND
        END IF
END SUB
'************************************************************************
Regards,
                             ----------------
                                /
                              /  h o m a s
email  : author@pbsound.snafu.de
www    : http://www.snafu.de/~pbsound/ (PowerBASIC's Home in Germany)
         PBSOUND - The Sound Blaster Toolkit, PowerBASIC-FAQ, PowerBASIC-
         sources & toolboxes, PowerBASIC on Web, PowerBASIC News and much
         more or less important PowerBASIC stuff.
fax/bbs: +49-30-47300910 (VFC,V34,X75,ISDNC / 9600-64000bps)
--- CrossPoint v3.11 R
2:2410/330.1)
---------------
* Origin: PBSOUND, PBFILES (20MB), PBFAQ, PBRULES, PBHIVGA at:

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.