104 lines
2.5 KiB
Plaintext
104 lines
2.5 KiB
Plaintext
VERSION 1.00
|
||
Begin Form Probe
|
||
Caption = "Plattformprobe: Ereignisse genau einmal"
|
||
Width = 70
|
||
Height = 18
|
||
Begin Menu mnuDatei
|
||
Caption = "&Datei"
|
||
Begin Menu mnuEnde
|
||
Caption = "&Ende"
|
||
End
|
||
End
|
||
Begin Label Hint
|
||
Caption = "Textfeld: F1-F12 / Modifier. Datei > Ende beendet."
|
||
Left = 2
|
||
Top = 2
|
||
Width = 65
|
||
Height = 1
|
||
End
|
||
Begin TextBox Text1
|
||
Left = 2
|
||
Top = 4
|
||
Width = 50
|
||
Height = 1
|
||
TabIndex = 0
|
||
End
|
||
Begin Label Counts
|
||
Caption = "Down/Up/Press/Click/Move: 0/0/0/0/0"
|
||
Left = 2
|
||
Top = 6
|
||
Width = 65
|
||
Height = 1
|
||
End
|
||
Begin Label Unicode
|
||
Caption = "Unicode: ÄÖÜ äöü ß – 中界 ┌─┐"
|
||
Left = 2
|
||
Top = 8
|
||
Width = 60
|
||
Height = 1
|
||
End
|
||
Begin CommandButton Count
|
||
Caption = "&Zählen"
|
||
Left = 2
|
||
Top = 10
|
||
Width = 14
|
||
Height = 1
|
||
TabIndex = 1
|
||
End
|
||
Begin CommandButton Done
|
||
Caption = "&Ende"
|
||
Default = -1
|
||
Left = 20
|
||
Top = 10
|
||
Width = 14
|
||
Height = 1
|
||
TabIndex = 2
|
||
End
|
||
End
|
||
DIM SHARED downs&, ups&, presses&, clicks&, moves&
|
||
OPEN "platform-events.log" FOR OUTPUT AS #1
|
||
CLOSE #1
|
||
Probe.Show
|
||
Text1.SetFocus
|
||
|
||
SUB RecordEvent(kind$, code%, modifiers%)
|
||
OPEN "platform-events.log" FOR APPEND AS #1
|
||
PRINT #1, kind$; ":"; code%; ":"; modifiers%
|
||
CLOSE #1
|
||
Counts.Caption = "Down/Up/Press/Click/Move:" + STR$(downs&) + "/" + STR$(ups&) + "/" + STR$(presses&) + "/" + STR$(clicks&) + "/" + STR$(moves&)
|
||
END SUB
|
||
SUB Text1_KeyDown(KeyCode AS INTEGER, Shift AS INTEGER)
|
||
downs& = downs& + 1
|
||
CALL RecordEvent("Down", KeyCode, Shift)
|
||
END SUB
|
||
SUB Text1_KeyUp(KeyCode AS INTEGER, Shift AS INTEGER)
|
||
ups& = ups& + 1
|
||
CALL RecordEvent("Up", KeyCode, Shift)
|
||
END SUB
|
||
SUB Text1_KeyPress(KeyAscii AS INTEGER)
|
||
presses& = presses& + 1
|
||
CALL RecordEvent("Press", KeyAscii, 0)
|
||
END SUB
|
||
SUB Probe_MouseDown(Button AS INTEGER, Shift AS INTEGER, X AS SINGLE, Y AS SINGLE)
|
||
CALL RecordEvent("MouseDown", Button, Shift)
|
||
END SUB
|
||
SUB Probe_MouseUp(Button AS INTEGER, Shift AS INTEGER, X AS SINGLE, Y AS SINGLE)
|
||
CALL RecordEvent("MouseUp", Button, Shift)
|
||
END SUB
|
||
SUB Probe_MouseMove(Button AS INTEGER, Shift AS INTEGER, X AS SINGLE, Y AS SINGLE)
|
||
moves& = moves& + 1
|
||
CALL RecordEvent("MouseMove", Button, Shift)
|
||
END SUB
|
||
SUB Count_Click()
|
||
clicks& = clicks& + 1
|
||
CALL RecordEvent("Click", 0, 0)
|
||
END SUB
|
||
SUB Done_Click()
|
||
CALL RecordEvent("End", 0, 0)
|
||
END
|
||
END SUB
|
||
SUB mnuEnde_Click()
|
||
CALL RecordEvent("End", 0, 0)
|
||
END
|
||
END SUB
|