RE: asciikódy

From: Milan Kevely (milank@softhome.net)
Date: 17. 02. 2000, 10:25 CET


----- Original Message -----
From: Galda Jan <Jan.Galda@roz.os.ds.mfcr.cz>

> Odesílatel: bayerl@brailcom.cz[SMTP:bayerl@brailcom.cz]
> Komu: freesoft@freesoft.cz
> Předmět: asciikódy
> Dobrý den,
> Vím, že si mohu zjistit  písmeno, když napíši alt + číslo ascii kodu,
> ale jak bych si mohla přečíst ascii hodnotu znáku, na kterým stojí
> kurzor?
> Srdečně zdraví:
>           bayerl

ASCI neviem, ale keby ti islo o ANSI (vo win, napr. Alt+0236 je ě <male
e s hackom>), tak na to pouzivat makro vo Worde. To co chces zistit,
musis "zaciernit".
V stringoch S1$, S2$, S3$, S6$ som teraz zrusil diakritiku, mozes si tam
dat cesky text.

----
Sub HodnotaANSI()
S1$ = "Pretoze vybrany text obsahuje"
S2$ = " znakov, nebudu zobrazene vsetky hodnoty ANSI."
S3$ = "Hodnota ANSI (pocet vybraných znakov: "
S4$ = " )"
S5$ = " )"
S6$ = "Pred spustenim makra musi byt vybrany text."
S7$ = "Hodnota ANSI"
Dim strSel, strNums, LastFourChar As String
Dim iPos As Integer
strSel = Selection.Text
If Len(strSel) > 0 Then
    For i = 1 To Len(strSel)
        strNums = strNums + Str(Asc(Mid(strSel, i)))
    Next i
    strNums = LTrim(strNums)
    If Len(strNums) > 255 Then
        LastFourChar = Mid(strNums, 252, 4)
        strNums = Left(strNums, 251) + Left(LastFourChar, 4 - In...
4 - InStr(" ", LastFourChar))
' TIETO DVA RIADKY VYMAZ: predchadzajuci riadok dopln
' vyssie - nahrad nim to 4 - In...
        MsgBox S1$ + Str(Len(strSel)) + S2$
    End If
    If Len(strSel) = 1 Then S4$ = S5$
    MsgBox strNums, 0, S3$ + LTrim(Str(Len(strSel))) + S4$
Else
    MsgBox S6$, 0, S7$
End If
End Sub
----

Milan Kevely
milank@softhome.net



This archive was generated by hypermail 2.1.2 : 03. 09. 2001, 23:06 CEST