Autor Beitrag
Swordooo
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 119

W2K, Windows XP Professional
Delphi 2005 Personal, Delphi 7 Personal
BeitragVerfasst: Fr 24.10.08 20:02 
Hallo.
Ich habe ein paar Virtuals Key-Codes in einer *.txt-Datei gespeichert.
Mit Virtuals Key-Codes meine ich: $1B ([ESCAPE] usw...).

Ich möchte diesen String so umwandeln, sodass ich $1B einer Variablen (sagen wir "Taste") zuweisen kann und dann in diese
Struktur einbauen kann:
ausblenden Delphi-Quelltext
1:
2:
keybd_event(Taste,0,0,0);
keybd_event(Taste,0, KEYEVENTF_KEYUP, 0);


Jeoch habe ich weder in diesemForum noch in anderen etwas zu diesem Problem gefunden.
Danke schonmal an alle, die sich hiermit beschäftigen.

MfG Swordooo
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Fr 24.10.08 20:24 
Ich versteh das Problem nicht?
Taste als Variable vom Typ, äh.. byte oder word, weiß ich grad nicht.
Dann z.B. mit ner Ini einfach einlesen: Taste := Ini.ReadInteger('Muh', 'Blah', 0);

Oder wenn die Datei nicht wie eine Ini aufgebatu ist, in eine temporäre Stringlist laden, und dann Taste := StrToInt(TempStringList[0]);

_________________
PROGRAMMER: A device for converting coffee into software.
Swordooo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 119

W2K, Windows XP Professional
Delphi 2005 Personal, Delphi 7 Personal
BeitragVerfasst: Fr 24.10.08 20:31 
Danke

Taste := Ini.ReadInteger('Muh', 'Blah', 0); war das, was ich suchte^^

Swordooo
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Fr 24.10.08 20:33 
Achso.
dann könnte dir vielleicht hier das Tutorial noch helfen:
www.delphi-treff.de/.../ini-dateien/page/1/

_________________
PROGRAMMER: A device for converting coffee into software.