Hallo,
da ich den Standard InpuBox von AutoIt nicht so super finde hab ich mir ein eigenes gemacht. Aber irgendwie scheint mein Script nicht genauso gut zu funktionieren. Zum Beispiel der OK Button von Autoits InputBox ist irgendwie immer ausgewählt. Wie kann ich das auch machen, bzw. was fehlt an meinem Script noch?
Spoiler anzeigen
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Run_Au3check=n
#AutoIt3Wrapper_Tidy_Stop_OnError=n
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/CS 0 /CN 0 /CF 0/CV 0
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: DeepRed
Copyright: 2008 - 2009 by DeepRed
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
[/autoit] [autoit][/autoit] [autoit]#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
MsgBox(0,"",_Inputbox("Titel","Inhalt"))
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func _Inputbox($_I_Titel,$_I_Value)
$_I_GUI = GUICreate($_I_Titel, 350, 110)
GUISetIcon("shell32.dll", -166)
$_I_Input = GUICtrlCreateInput($_I_Value, 8, 45, 334, 21)
GUICtrlCreateLabel("Bitte geben Sie einen Wert ein. Ansonsten können Sie auf abbrechen" & @CRLF & "drücken bzw. den Wert so lassen.", 8, 8, 337, 33)
$_I_Ok_Button = GUICtrlCreateButton("OK", 184, 75, 75, 25, 0)
GUICtrlSetState(-1, $GUI_FOCUS)
$_I_Chancel_Button = GUICtrlCreateButton("Abbrechen", 267, 75, 75, 25, 0)
GUISetState(@SW_SHOW)
While 1
$_I_GUIGetMsg = GUIGetMsg()
Switch $_I_GUIGetMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $_I_Ok_Button
Return GUICtrlRead($_I_Input)
ExitLoop
Case $_I_Chancel_Button
ExitLoop
EndSwitch
WEnd
GUIDelete($_I_GUI)
EndFunc ;==>_Inputbox