Moin Moin
ich hab n kleines problem, @KBLayout wird beim start gesetzt, wenn ich nun tastaturenbelegung ändere bleibt @KBLayout gleich )=
weiss vlt iwer wie ich des "neu laden" kann? oder sonnst irgendwie abfragen kann?
mfg
Moin Moin
ich hab n kleines problem, @KBLayout wird beim start gesetzt, wenn ich nun tastaturenbelegung ändere bleibt @KBLayout gleich )=
weiss vlt iwer wie ich des "neu laden" kann? oder sonnst irgendwie abfragen kann?
mfg
hmm kannste mal dein script schicken? vllt gibts ja nochn andren weg außer @KBLayout...
hier damit du siest das des ned geht )=
#cs
00000407 German(German)
00000807 German(Switzerland)
#ce
HotKeySet("{END}","_exit")
While 1
Sleep(100)
TrayTip("",@KBLayout,1)
WEnd
Func _exit()
Exit 0
EndFunc
Geht ja wohl =P
#include <Misc.au3>
#include <WinApi.au3>
#cs
00000407 German(German)
00000807 German(Switzerland)
#ce
HotKeySet("{END}","_exit")
$KB1 = _GetKeyboardLayout()
While 1
sleep(500)
$KB2 = _GetKeyboardLayout()
If $KB1 <> $KB2 Then
MsgBox(0,"",$KB2)
$KB1 = $KB2
EndIf
WEnd
Func _GetKeyboardLayout()
$hWnd = _WinAPI_GetForegroundWindow()
Local $ret = DllCall("user32.dll", "long", "GetWindowThreadProcessId", "hwnd", $hWnd, "ptr", 0)
$ret = DllCall("user32.dll", "long", "GetKeyboardLayout", "long", $ret[0])
Return Hex($ret[0], 4)
EndFunc
Func _exit()
Exit 0
EndFunc
du musst ned die exit func löschen xD
gucks mir ma an ![]()
EDIT 1:
funzt super
thx
#include <WinApi.au3>
#cs
00000407 German(German)
00000807 German(Switzerland)
00000409 English(United States)
#ce
HotKeySet("{END}","_exit")
$KB1 = _GetKeyboardLayout()
While 1
sleep(500)
$KB2 = _GetKeyboardLayout()
If $KB1 <> $KB2 Then
MsgBox(0,"",$KB2)
$KB1 = $KB2
EndIf
WEnd
Func _GetKeyboardLayout()
$hWnd = _WinAPI_GetForegroundWindow()
Local $ret = DllCall("user32.dll", "long", "GetWindowThreadProcessId", "hwnd", $hWnd, "ptr", 0)
$ret = DllCall("user32.dll", "long", "GetKeyboardLayout", "long", $ret[0])
Return Hex($ret[0], ![]()
EndFunc
Func _exit()
Exit 0
EndFunc
Kein Thema! ![]()
Edit: Ups ja deine Exit-Func is wieda drinne ;P
![]()
hab noch auf Hex 8 gemacht da @KBLayout auch hex 8 ist ![]()
vielen dank nochmal ![]()
Hmm bei Hex 8 kommen bei mir ganz andre Zahlen raus...
Mach doch einfach:
Return "0000" & Hex($ret[0], 4)
[/autoit]bei mir gehts *g*
is ja au egal hauptsache es funzt ![]()
Nagut, dann will ich ma nich meckern
Wenn du vor hast irgendwas in die Richtung eines Macro-Bots zu machen, empfehle ich dir mal den MacroGamer unter die Lupe zu nehmen --> http://www.autoitscript.com/forum/index.php?showtopic=45332&st=0&start=0 ... der hat das mit dem KeyBoardLayout nochmal anders gelöst ;p
ne is ned fürn bot ![]()
hab kb für jede tastatur ifs zu schreiben ![]()
ne ini pro tastatur also bis jetzt für deutsch, schweiz, und english
is einfacher, schöner und spart ne menge zeit ![]()
EDIT 1:
misc.au3 musst doch ned includieren ![]()
*bei mir rausnehm*