Also ich hab ein programm gemacht das wenn man auf eine taste
am nummernblock drückt kommt ein text den ich mir selber aussuchen kann.
Das hab ich ja geschafft aber jetzt will ich es machen das wenn man links auf
einen button drückt kommt eine box wo eine input box is wenn man bei der input box aber einen text eingibt
und dann auf bestätigen drückt soll das auf dem programm auch geändert werden also der text was
kommt wenn man eine taste auf den nummernblock drückt...
hoffe das habt ihr verstanden hier das script und screenshots:
Das bearbeitungsfenster:
Spoiler
AutoIt-Quelltext
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\users\andi\desktop\autoit\tipper\bearbeiten.kxf
$Bearbeiten = GUICreate("Bearbeiten", 489, 106, 208, 496)
GUISetBkColor(0xA6CAF0)
$Label1 = GUICtrlCreateLabel("Hier gib bitte deinen text ein den du für diese taste haben willst", 8, 8, 477, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Input0 = GUICtrlCreateInput("Input", 16, 40, 345, 31)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$OK = GUICtrlCreateButton("Bestätigen", 368, 40, 113, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Button1 = GUICtrlCreateButton("Abbrechen", 16, 72, 105, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Exit
EndSwitch
WEnd
Hey,
bin am Mac, kann dir kein Beispiel schreiben, aber es funktioniert folgendermaßen:
Wenn man auf einen Button klickt erstellst du eine Inputbox, was über IniWrite die Eingabe in eine INI-Datei speichert.
Bei der Numpad-Taste sieht die Funktion etwa so aus:
Ich teste es mal
noch ne frage wie geht das das wenn ich auf den button klick das dann gleich statt dem button eine input box kommt die den text rechts daneben ändert
was ist daran falsch??
AutoIt-Quelltext
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: Andreas
Script Function:
Minecraft eintipper
#ce ----------------------------------------------------------------------------
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\users\andi\desktop\autoit\tipper\tipper.kxf
$Hauptteil = GUICreate("Tipper by AndiBO14", 410, 207, 200, 157)
GUISetFont(10, 400, 0, "MS Sans Serif")
GUISetBkColor(0xB9D1EA)
$Label1 = GUICtrlCreateLabel("Ganz einfach und schnell eintippen :D:", 16, 8, 281, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label2 = GUICtrlCreateLabel("1 = ", 96, 48, 38, 27)
GUICtrlSetFont(-1, 12, 800, 0, "comic Sans MS")
$Label3 = GUICtrlCreateLabel("2 = ", 96, 72, 38, 27)
GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")
$Label4 = GUICtrlCreateLabel("3 = ", 96, 96, 38, 27)
GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")
$Label5 = GUICtrlCreateLabel("4 = ", 96, 120, 38, 27)
GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")
$Label6 = GUICtrlCreateLabel("5 = ", 96, 144, 38, 27)
GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")
$Label7 = GUICtrlCreateLabel("6 = ", 304, 48, 32, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label8 = GUICtrlCreateLabel("7 = ", 304, 72, 32, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label9 = GUICtrlCreateLabel("8 = ", 304, 96, 32, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label10 = GUICtrlCreateLabel("9 = ", 304, 120, 32, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Button1 = GUICtrlCreateButton("Beenden", 304, 168, 97, 33)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
GUICtrlSetBkColor(-1, 0xC0DCC0)
GUICtrlSetCursor (-1, 0)
$Button2 = GUICtrlCreateButton("Bearbeiten", 8, 48, 81, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetCursor (-1, 0)
$Button3 = GUICtrlCreateButton("Bearbeiten", 8, 72, 81, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetCursor (-1, 0)
$Button4 = GUICtrlCreateButton("Bearbeiten", 8, 96, 81, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetCursor (-1, 0)
$Button5 = GUICtrlCreateButton("Bearbeiten", 8, 120, 81, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetCursor (-1, 0)
$Button6 = GUICtrlCreateButton("Bearbeiten", 8, 144, 81, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetCursor (-1, 0)
$Button7 = GUICtrlCreateButton("Bearbeiten", 216, 48, 81, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetCursor (-1, 0)
$Button8 = GUICtrlCreateButton("Bearbeiten", 216, 72, 81, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetCursor (-1, 0)
$Button9 = GUICtrlCreateButton("Bearbeiten", 216, 96, 81, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetCursor (-1, 0)
$Button10 = GUICtrlCreateButton("Bearbeiten", 216, 120, 81, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetCursor (-1, 0)
$Button11 = GUICtrlCreateButton("Bearbeiten", 216, 144, 81, 25)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetCursor (-1, 0)
$Label11 = GUICtrlCreateLabel("0 = ", 304, 144, 32, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label12 = GUICtrlCreateLabel("", 136, 48, 4, 4)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label13 = GUICtrlCreateLabel("", 136, 72, 4, 4)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label14 = GUICtrlCreateLabel("", 136, 96, 4, 4)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label15 = GUICtrlCreateLabel("", 136, 120, 4, 4)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label16 = GUICtrlCreateLabel("", 136, 144, 4, 4)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label17 = GUICtrlCreateLabel("", 336, 48, 4, 4)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label18 = GUICtrlCreateLabel("", 336, 72, 4, 4)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label19 = GUICtrlCreateLabel("", 336, 96, 4, 4)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label20 = GUICtrlCreateLabel("", 336, 120, 4, 4)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
$Label21 = GUICtrlCreateLabel("", 336, 144, 4, 4)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$Label11 = $Send1
$Label12 = $Send2
$Label13 = $Send3
$Label14 = $Send4
$Label15 = $Send5
$Label16 = $Send6
$Label17 = $Send7
$Label18 = $Send8
$Label19 = $Send9
$Label20 = $Send0
HotKeySet("{Numpad1}", "Nummer1")
HotKeySet("{Numpad2}", "Nummer2")
HotKeySet("{Numpad3}", "Nummer3")
HotKeySet("{Numpad4}", "Nummer4")
HotKeySet("{Numpad5}", "Nummer5")
HotKeySet("{Numpad6}", "Nummer6")
HotKeySet("{Numpad7}", "Nummer7")
HotKeySet("{Numpad8}", "Nummer8")
HotKeySet("{Numpad9}", "Nummer9")
Func Nummer1()
; ... can do stuff here
$Send1 = Send(IniRead("bearbeiten.ini", "section1", "numpad1", "")
EndFunc
Func Nummer2()
; ... can do stuff here
$Send2 = Send(IniRead("bearbeiten.ini", "section2", "numpad2", "")
EndFunc
Func Nummer3()
; ... can do stuff here
$Send3 = Send(IniRead("bearbeiten.ini", "section3", "numpad3", "")
EndFunc
Func Nummer4()
; ... can do stuff here
$Send4 = Send(IniRead("bearbeiten.ini", "section4", "numpad4", "")
EndFunc
Func Nummer5()
; ... can do stuff here
$Send5 = Send(IniRead("bearbeiten.ini", "section5", "numpad5", "")
EndFunc
Func Nummer6()
; ... can do stuff here
$Send6 = Send(IniRead("bearbeiten.ini", "section6", "numpad6", "")
EndFunc
Func Nummer7()
; ... can do stuff here
$Send7 = Send(IniRead("bearbeiten.ini", "section7", "numpad7", "")
EndFunc
Func Nummer8()
; ... can do stuff here
$Send8 = Send(IniRead("bearbeiten.ini", "section8", "numpad8", "")
EndFunc
Func Nummer9()
; ... can do stuff here
$Send9 = Send(IniRead("bearbeiten.ini", "section9", "numpad9", "")
EndFunc
Func Nummer0()
; ... can do stuff here
$Send0 = Send(IniRead("bearbeiten.ini", "section0", "numpad0", "")
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Exit
Case $Button2
$numpad1 = InputBox("Bearbeiten", "Hier gib den gewünschten text ein...")
IniWrite("bearbeiten.ini", "section1", "t", $numpad1)
Case $Button3
$numpad2 = InputBox("Bearbeiten", "Hier gib den gewünschten text ein...")
IniWrite("bearbeiten.ini", "section2", "t", $numpad2)
Case $Button4
$numpad3 = InputBox("Bearbeiten", "Hier gib den gewünschten text ein...")
IniWrite("bearbeiten.ini", "section3", "t", $numpad3)
Case $Button5
$numpad4 = InputBox("Bearbeiten", "Hier gib den gewünschten text ein...")
IniWrite("bearbeiten.ini", "section4", "t", $numpad4)
Case $Button6
$numpad5 = InputBox("Bearbeiten", "Hier gib den gewünschten text ein...")
IniWrite("bearbeiten.ini", "section5", "t", $numpad5)
Case $Button7
$numpad6 = InputBox("Bearbeiten", "Hier gib den gewünschten text ein...")
IniWrite("bearbeiten.ini", "section6", "t", $numpad6)
Case $Button8
$numpad7 = InputBox("Bearbeiten", "Hier gib den gewünschten text ein...")
IniWrite("bearbeiten.ini", "section7", "t", $numpad7)
Case $Button9
$numpad8 = InputBox("Bearbeiten", "Hier gib den gewünschten text ein...")
IniWrite("bearbeiten.ini", "section8", "t", $numpad8)
Case $Button10
$numpad9 = InputBox("Bearbeiten", "Hier gib den gewünschten text ein...")
IniWrite("bearbeiten.ini", "section9", "t", $numpad9)
Case $Button11
$numpad0 = InputBox("Bearbeiten", "Hier gib den gewünschten text ein...")
IniWrite("bearbeiten.ini", "section0", "t", $numpad0)
EndSwitch
WEnd