Verfasst: 06.06.2009 12:31
Wo gibt's denn diese 30 cm breiten Briefmarken? 

Das deutsche PureBasic-Forum
https://www.purebasic.fr/german/
Code: Alles auswählen
Procedure ShiftRunter(STR.s)
Shared Mtx
Repeat
If TryLockMutex(Mtx)
Break
EndIf
ForEver
Select STR
Case "°"
VK.w = #VK_RIGHT
Case "^"
VK.w = #VK_LEFT
Case "|"
VK.w = #VK_DOWN
Default
VK.w = VkKeyScan_(Asc(STR))
;VK.w = VkKeyScanEx_(Asc(Key),GetKeyboardLayout_(0))
EndSelect
Shift.l = VK & $100
If Shift
keybd_event_(#VK_SHIFT, 0, 0, 0)
EndIf
UnlockMutex(Mtx)
EndProcedure
Procedure ShiftHoch(STH.s)
Shared Mtx
Repeat
If TryLockMutex(Mtx)
Break
EndIf
ForEver
Select STH
Case "°"
VK.w = #VK_RIGHT
Case "^"
VK.w = #VK_LEFT
Case "|"
VK.w = #VK_DOWN
Default
VK.w = VkKeyScan_(Asc(STH))
;VK.w = VkKeyScanEx_(Asc(Key),GetKeyboardLayout_(0))
EndSelect
Shift.l = VK
If Shift
keybd_event_(#VK_SHIFT, 0, #KEYEVENTF_KEYUP, 0)
EndIf
UnlockMutex(Mtx)
EndProcedure
Procedure StrgRunter(SGTR.s)
Shared Mtx
Repeat
If TryLockMutex(Mtx)
Break
EndIf
ForEver
Select SGTR
Case "°"
VK.w = #VK_RIGHT
Case "^"
VK.w = #VK_LEFT
Case "|"
VK.w = #VK_DOWN
Default
VK.w = VkKeyScan_(Asc(SGTR))
;VK.w = VkKeyScanEx_(Asc(Key),GetKeyboardLayout_(0))
EndSelect
Ctrl.l = VK & $200
If Ctrl
keybd_event_(#VK_CONTROL, 0, 0, 0)
EndIf
UnlockMutex(Mtx)
EndProcedure
Procedure StrgHoch(SGTH.s)
Shared Mtx
Repeat
If TryLockMutex(Mtx)
Break
EndIf
ForEver
Select SGTH
Case "°"
VK.w = #VK_RIGHT
Case "^"
VK.w = #VK_LEFT
Case "|"
VK.w = #VK_DOWN
Default
VK.w = VkKeyScan_(Asc(SGTH))
;VK.w = VkKeyScanEx_(Asc(Key),GetKeyboardLayout_(0))
EndSelect
Ctrl.l = VK
If Ctrl
keybd_event_(#VK_CONTROL, 0, #KEYEVENTF_KEYUP, 0)
EndIf
UnlockMutex(Mtx)
EndProcedure
Procedure AltRunter(ATR.s)
Shared Mtx
Repeat
If TryLockMutex(Mtx)
Break
EndIf
ForEver
Select ATR
Case "°"
VK.w = #VK_RIGHT
Case "^"
VK.w = #VK_LEFT
Case "|"
VK.w = #VK_DOWN
Default
VK.w = VkKeyScan_(Asc(ATR))
;VK.w = VkKeyScanEx_(Asc(Key),GetKeyboardLayout_(0))
EndSelect
Alt.l = VK & $400
If Alt
keybd_event_(#VK_MENU, 0, 0, 0)
EndIf
UnlockMutex(Mtx)
EndProcedure
Procedure AltHoch(ATH.s)
Shared Mtx
Repeat
If TryLockMutex(Mtx)
Break
EndIf
ForEver
Select ATH
Case "°"
VK.w = #VK_RIGHT
Case "^"
VK.w = #VK_LEFT
Case "|"
VK.w = #VK_DOWN
Default
VK.w = VkKeyScan_(Asc(ATH))
;VK.w = VkKeyScanEx_(Asc(Key),GetKeyboardLayout_(0))
EndSelect
Alt.l = VK
If Alt
keybd_event_(#VK_MENU, 0, #KEYEVENTF_KEYUP, 0)
EndIf
UnlockMutex(Mtx)
EndProcedure
Procedure KeyDown(Runter.s)
Shared Mtx
Repeat
If TryLockMutex(Mtx)
Break
EndIf
ForEver
;SetPriorityClass_(GetCurrentProcess_(),#REALTIME_PRIORITY_CLASS)
Select Runter
Case "°"
VK.w = #VK_RIGHT
Case "^"
VK.w = #VK_LEFT
Case "|"
VK.w = #VK_DOWN
Default
VK.w = VkKeyScan_(Asc(Runter))
;VK.w = VkKeyScanEx_(Asc(Key),GetKeyboardLayout_(0))
EndSelect
;If VK = -1
;ProcedureReturn
;EndIf
If MapVirtualKey_(VK, 2) = 0
Extended.l = #KEYEVENTF_EXTENDEDKEY
Scan.l = MapVirtualKey_(VK, 0)
Else
Extended = 0
Scan = 0
EndIf
VK & $FF
keybd_event_(VK, Scan, Extended, 0)
;SetPriorityClass_(GetCurrentProcess_(),#NORMAL_PRIORITY_CLASS)
UnlockMutex(Mtx)
EndProcedure
Procedure KeyUp(Hoch.s)
Shared Mtx
Repeat
If TryLockMutex(Mtx)
Break
EndIf
ForEver
Select Hoch
Case "°"
VK.w = #VK_RIGHT
Case "^"
VK.w = #VK_LEFT
Case "|"
VK.w = #VK_DOWN
Default
VK.w = VkKeyScan_(Asc(Hoch))
;VK.w = VkKeyScanEx_(Asc(Key),GetKeyboardLayout_(0))
EndSelect
;If VK = -1
;ProcedureReturn
;EndIf
If MapVirtualKey_(VK, 2) = 0
Extended.l = #KEYEVENTF_EXTENDEDKEY
Scan.l = MapVirtualKey_(VK, 0)
Else
Extended = 0
Scan = 0
EndIf
keybd_event_(VK, Scan, #KEYEVENTF_KEYUP | Extended, 0)
UnlockMutex(Mtx)
EndProcedure
Mtx = CreateMutex()
Structure InTabelle
RS.s
EndStructure
Dim EW.InTabelle(0)
ForEach Liste()
If CountString(Liste(), "x") > 0
Stueckzahl.q = ValQ(ReplaceString(Liste(), "x", ""))
Stueckz.s = StrQ(Stueckzahl.q)
EW(0)\RS + Stueckz
Else
Stueckz.s = Liste()
EW(0)\RS + Stueckz
EndIf
EW(0)\RS + "°"
NextElement(Liste())
Artnr.s = Liste()
EW(0)\RS + Artnr
EW(0)\RS + "°"
NextElement(Liste())
Marke.s = Liste()
EW(0)\RS + Marke
EW(0)\RS + "°"
EW(0)\RS + "C"
EW(0)\RS + "°"
NextElement(Liste())
Format.s = Liste()
EW(0)\RS + Format
EW(0)\RS + "°"
NextElement(Liste())
If CountString(Liste(), ",") > 0
Einzelpreis.q = ValQ(ReplaceString(Liste(), ",", ""))
Epreis.s = Liste()
EW(0)\RS + Epreis
EW(0)\RS + "°"
EndIf
NextElement(Liste())
VPE.s = Liste()
EW(0)\RS + VPE
;EW(0)\RS + "°"
NextElement(Liste())
If GetGadgetState(16) = 1
Einzelpreis.q * Stueckzahl.q
Summe.q + Einzelpreis.q
Gesamtpreis.s = ReplaceString(StrQ(Einzelpreis.q), Right(StrQ(Einzelpreis.q), 2), "," + Right(StrQ(Einzelpreis.q), 2))
EW(0)\RS + "°"
EW(0)\RS + Gesamtpreis
EW(0)\RS + "^"
EndIf
EW(0)\RS + "^^^^^^"
EW(0)\RS + "|"
Next
For H = 0 To Len(EW(0)\RS)-1
Prozess1 = CreateThread(@ShiftRunter(), Mid(EW(0)\RS, H, 1))
WaitThread(Prozess1)
Prozess2 = CreateThread(@StrgRunter(), Mid(EW(0)\RS, H, 1))
WaitThread(Prozess2)
Prozess3 = CreateThread(@AltRunter(), Mid(EW(0)\RS, H, 1))
WaitThread(Prozess3)
Prozess4 = CreateThread(@KeyDown(), Mid(EW(0)\RS, H, 1))
WaitThread(Prozess4)
Prozess5 = CreateThread(@KeyUp(), Mid(EW(0)\RS, H, 1))
WaitThread(Prozess5)
Prozess6 = CreateThread(@ShiftHoch(), Mid(EW(0)\RS, H, 1))
WaitThread(Prozess6)
Prozess7 = CreateThread(@StrgHoch(), Mid(EW(0)\RS, H, 1))
WaitThread(Prozess7)
Prozess8 = CreateThread(@AltHoch(), Mid(EW(0)\RS, H, 1))
WaitThread(Prozess8)
Next H
kann sein, denn heute, also gestern - morgen, ist Europawahl...Fluid Byte hat geschrieben:Ist heute heute Tag der beschissenen Kalauer?
bo-ahAuch wenn dieses keybd_event nur eine Notlösung ist, muß ich wissen
weshalb dieser Fehler nur im ersten zweiten Feld auftritt und
nirgendwo sonst.
Mach ich doch auch nicht.Kaeru Gaman hat geschrieben: ...aber trotzdem solltest du nich zu hohen drehmoment draufprügeln...
Ist das die Verknüpfung mit der Excel-Tabelle, von der ts-soft sprach?EMBED Excel.Sheet.8......
Code: Alles auswählen
If OpenFile(0, "...\sharedStrings.xml")
FileSeek(0, 162)
WriteString(0, "a")
CloseFile(0)
Else
MessageRequester("Fehler","Dateiuzugriffsfehler!")
EndIf