|
You last visited: Today at 15:39
Advertisement
GUI Inputbox problem
Discussion on GUI Inputbox problem within the AutoIt forum part of the Coders Den category.
09/24/2010, 20:39
|
#1
|
elite*gold: 20
Join Date: Nov 2009
Posts: 2,256
Received Thanks: 1,570
|
GUI Inputbox problem
joa hätte ein problem mit der Inputbox
Code:
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
$Form1 = GUICreate("Form1", 373, 100, 120, 124)
GUISetBkColor(0x3366FF)
$Input1 = GUICtrlCreateInput("", 56, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
GUICTRLSETLimit(-1,4)
$Input2 = GUICtrlCreateInput("", 152, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
GUICTRLSETLimit(-1,4)
$Input3 = GUICtrlCreateInput("", 248, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
GUICTRLSETLimit(-1,4)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
Wend
gibt es eine möglichkeit wenn die Inputbox 4 ziffern da stehen hat (gibt es ein befehl das man nur ziffern reinschreiben darf?  ) das er zur nächsten input wechselt um da weiterzuschreiben?^^
mit StringLen komm ich nicht weiter^^
If Stringlen(Guictrlread($input1) = 4 then
Send("{TAB}")
Endif
da er dieß dann ständig macht(while schleife vom GUI)
|
|
|
09/24/2010, 21:19
|
#2
|
elite*gold: 11
Join Date: Jan 2009
Posts: 247
Received Thanks: 100
|
Quote:
Originally Posted by DarkGER!
joa hätte ein problem mit der Inputbox
Code:
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
$Form1 = GUICreate("Form1", 373, 100, 120, 124)
GUISetBkColor(0x3366FF)
$Input1 = GUICtrlCreateInput("", 56, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
GUICTRLSETLimit(-1,4)
$Input2 = GUICtrlCreateInput("", 152, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
GUICTRLSETLimit(-1,4)
$Input3 = GUICtrlCreateInput("", 248, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
GUICTRLSETLimit(-1,4)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
Wend
gibt es eine möglichkeit wenn die Inputbox 4 ziffern da stehen hat (gibt es ein befehl das man nur ziffern reinschreiben darf?  ) das er zur nächsten input wechselt um da weiterzuschreiben?^^
mit StringLen komm ich nicht weiter^^
If Guictrlread............
Send("{TAB}")
Endif
da er dieß dann ständig macht(while schleife vom GUI)
|
Einmal googlen schon gefunden: 
Musst halt gucken wies geht mit dann "runterkommen" zur nächsten Inputbox.
|
|
|
09/24/2010, 21:25
|
#3
|
elite*gold: 5
Join Date: Jul 2009
Posts: 217
Received Thanks: 45
|
Quote:
If Guictrlread............
Send("{TAB}")
Endif
|
PHP Code:
AdlibRegister ( "check_input", 1500)
Func check_input()
If Guictrlread............
Send("{TAB}")
Endfunc
...
AdlibdeRegister ("check_input)
Probier's mal damit
|
|
|
09/24/2010, 21:29
|
#4
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
|
in etwa so vllt.. aber ist bischen buggy weil es in der schleife ist...
kann grade nicht klar denken...bekomms grad nicht hin..
vllt hilft es dir ja:
PHP Code:
#include <EditConstants.au3> #include <GUIConstantsEx.au3> $Form1 = GUICreate("Form1", 373, 100, 120, 124) GUISetBkColor(0x3366FF) $Input1 = GUICtrlCreateInput("", 56, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER )) GUICtrlSetLimit(-1,4) $Input2 = GUICtrlCreateInput("", 152, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER )) GUICtrlSetLimit(-1,4) $Input3 = GUICtrlCreateInput("", 248, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER )) GUICtrlSetLimit(-1,4) GUISetState(@SW_SHOW)
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch start() Wend
Func start() If StringLen(GUICtrlRead($Input1)) = "4" Then GUICtrlSetState($Input2, $GUI_FOCUS) EndIf If StringLen(GUICtrlRead($Input2)) = "4" Then GUICtrlSetState($Input3, $GUI_FOCUS) EndIf EndFunc
|
|
|
09/24/2010, 21:35
|
#5
|
elite*gold: 20
Join Date: Nov 2009
Posts: 2,256
Received Thanks: 1,570
|
@einkeks95
Ich denke mal
AdlibdeRegister ("check_input)
soll AdlibUnRegister sein
klappt leider nicht 
bleibt unverändert
@omer36
1. Input klappt es ganz gut
sobald er aber auf die 2. Input wechselt kann man nur 1 zahl schreiben (da diese makiert ist)
und man hat keine chance auf eine andere Inputbox zu klicken
|
|
|
09/24/2010, 22:24
|
#6
|
elite*gold: 0
Join Date: Sep 2008
Posts: 526
Received Thanks: 82
|
Also das hier funzt bei mir super...
PHP Code:
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
$Form1 = GUICreate("Form1", 373, 100, 120, 124)
GUISetBkColor(0x3366FF)
$Input1 = GUICtrlCreateInput("", 56, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER))
GUICTRLSETLimit(-1,4)
$Input2 = GUICtrlCreateInput("", 152, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER))
GUICTRLSETLimit(-1,4)
$Input3 = GUICtrlCreateInput("", 248, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER))
GUICTRLSETLimit(-1,4)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
Wend
|
|
|
09/24/2010, 22:36
|
#7
|
elite*gold: 20
Join Date: Nov 2009
Posts: 2,256
Received Thanks: 1,570
|
Quote:
Originally Posted by Mozo_
Also das hier funzt bei mir super...
PHP Code:
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
$Form1 = GUICreate("Form1", 373, 100, 120, 124)
GUISetBkColor(0x3366FF)
$Input1 = GUICtrlCreateInput("", 56, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER))
GUICTRLSETLimit(-1,4)
$Input2 = GUICtrlCreateInput("", 152, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER))
GUICTRLSETLimit(-1,4)
$Input3 = GUICtrlCreateInput("", 248, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER))
GUICTRLSETLimit(-1,4)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
Wend
|
ja schon aber er springt ja nicht von einem input zum anderen
|
|
|
09/24/2010, 22:38
|
#8
|
elite*gold: 0
Join Date: Sep 2008
Posts: 526
Received Thanks: 82
|
Okay 
Was hälst du davon? :
Neuer code:
PHP Code:
#include <EditConstants.au3> #include <GUIConstantsEx.au3> $Form1 = GUICreate("Form1", 373, 100, 120, 124) GUISetBkColor(0x3366FF) $Input1 = GUICtrlCreateInput("", 56, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER )) GUICtrlSetLimit(-1,4) $Input2 = GUICtrlCreateInput("", 152, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER )) GUICtrlSetState($Input2,$GUI_DISABLE) GUICtrlSetLimit(-1,4) $Input3 = GUICtrlCreateInput("", 248, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER )) GUICtrlSetState($Input3,$GUI_DISABLE) GUICtrlSetLimit(-1,4) GUISetState(@SW_SHOW)
$i = 1 $x = 1 $y = 1
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch start() Wend
Func start() If StringLen(GUICtrlRead($Input1)) = "4" And $i = 1 Then $i = 0 GUICtrlSetState($Input1, $GUI_DISABLE) GUICtrlSetState($Input2, $GUI_ENABLE) GUICtrlSetState($Input2, $GUI_FOCUS) GUICtrlSetState($Input2, $GUI_NOFOCUS) EndIf If StringLen(GUICtrlRead($Input2)) = "4" And $x = 1 Then $x = 0 GUICtrlSetState($Input2, $GUI_DISABLE) GUICtrlSetState($Input3, $GUI_ENABLE) GUICtrlSetState($Input3, $GUI_FOCUS) GUICtrlSetState($Input3, $GUI_NOFOCUS) EndIf If StringLen(GUICtrlRead($Input3)) = "4" And $y = 1 Then $y = 0 GUICtrlSetState($Input3, $GUI_DISABLE) EndIf EndFunc
//sry warn fehler drinne^^
PHP Code:
#include <EditConstants.au3> #include <GUIConstantsEx.au3> $Form1 = GUICreate("Form1", 373, 100, 120, 124) GUISetBkColor(0x3366FF) $Input1 = GUICtrlCreateInput("", 56, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER )) GUICtrlSetLimit(-1,4) $Input2 = GUICtrlCreateInput("", 152, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER,$GUI_DISABLE )) GUICtrlSetLimit(-1,4) $Input3 = GUICtrlCreateInput("", 248, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER,$GUI_DISABLE )) GUICtrlSetLimit(-1,4) GUISetState(@SW_SHOW)
$i = 1 $x = 1 $y = 1
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch start() Wend
Func start() If StringLen(GUICtrlRead($Input1)) = "4" And $i = 1 Then $i = 0 GUICtrlSetState($Input1, $GUI_DISABLE) GUICtrlSetState($Input2, $GUI_ENABLE) GUICtrlSetState($Input2, $GUI_FOCUS) GUICtrlSetState($Input2, $GUI_NOFOCUS) EndIf If StringLen(GUICtrlRead($Input2)) = "4" And $x = 1 Then $x = 0 GUICtrlSetState($Input2, $GUI_DISABLE) GUICtrlSetState($Input3, $GUI_ENABLE) GUICtrlSetState($Input3, $GUI_FOCUS) GUICtrlSetState($Input3, $GUI_NOFOCUS) EndIf If StringLen(GUICtrlRead($Input3)) = "4" And $y = 1 Then $y = 0 GUICtrlSetState($Input3, $GUI_DISABLE) EndIf EndFunc
|
|
|
09/24/2010, 22:43
|
#9
|
elite*gold: 20
Join Date: Nov 2009
Posts: 2,256
Received Thanks: 1,570
|
danke dir 
funktioniert super
|
|
|
 |
Similar Threads
|
[Problem]Inputbox + Label
08/21/2010 - AutoIt - 4 Replies
Hi ich will das mein Program eine inputbox öffnet
und das in einem Label angiebt :)
so habe ich es versucht
$name = Inputbox("Name","Bitte gebe deinen namen ein")
und dan öffnet sich ein fenster sozusamen ein minni spiel
wo der name in einen Label stehen soll :)
$Label1 = GUICtrlCreateLabel("Name: $name", 8, 8, 97, 20)
//edit habe die löseung ;)
aber ein anderes problem
|
[Problem] Inputbox(GUI) auslesen und als Variable speichern
08/08/2010 - AutoIt - 8 Replies
Hallo, ich bin neu hier und habe ein Problem mit Autoit
hier erstmal das Script :
#include <ButtonConstants.au3>
#include <EditConstants.au3>
|
Problem...Msg & Inputbox
05/27/2010 - AutoIt - 6 Replies
Hallo liebe E*PvP Community,
ich habe hier ein kleines Problem...
Ich möchte an der Inputbox die Größe ändern...bekomme es aber nicht hin,
und dann möchte ich eine variable in der aus der inputbox etwas gespeichert wurde in einer MsgBox ausgeben.
Wie soll ichd ass machen..pls Quellcode!
So mein Quellcode:
|
Problem mit Inputbox und Variabelen
01/30/2010 - AutoIt - 3 Replies
Hallo ,
Ich habe mich jz längere zeit mit Autoit beschäftig aber ich bleibe bei einer sache hängen .
Undzwar habe ich ein Box gemacht zum reinschreiben also :
$bs = GUICtrlCreateInput("bs", 24, 88, 233, 21)
Ich möchte jetzt das der inhalt den ich in die Box reinschreibe dann dann zum Beispiel in einer MsgBox ausgegeben wird aber es wir nie der inhalt sondern die Zeile angezeit wenn ich da zum beispiel Max Mustermann reinschreibe , wird nicht in der Msg Box Max Mustermann sonden die...
|
All times are GMT +1. The time now is 15:39.
|
|