|
You last visited: Today at 01:05
Advertisement
speicherfunktion und checkbox lesen?
Discussion on speicherfunktion und checkbox lesen? within the AutoIt forum part of the Coders Den category.
01/01/2010, 13:19
|
#1
|
elite*gold: 0
Join Date: Aug 2009
Posts: 225
Received Thanks: 68
|
speicherfunktion und checkbox lesen?
hab mal ne frage ich will in meinen script ne speicherfunktion einbauen inputs auslesen aus der Gui kann ich aber wie geht das mit ner combobox,checkbox undradiobutten?
Wie kann ich feststellen ob bei der checkbox ein häckchen ist?
|
|
|
01/01/2010, 13:53
|
#2
|
elite*gold: 0
Join Date: Apr 2009
Posts: 793
Received Thanks: 366
|
Quote:
$GUI_UNCHECKED Radio, Checkbox or ListViewItem will be unchecked.
$GUI_CHECKED Radio, Checkbox or ListViewItem will be checked.
$GUI_INDETERMINATE Checkbox having the tristate attribute will be greyed.
|
Quote:
Checkbox, Radio state of the button. See State table
Combo, List The value selected
|
E: Vieleicht solltes du dir die Quotes mal durchlesen?
|
|
|
01/01/2010, 22:52
|
#3
|
elite*gold: 0
Join Date: Aug 2009
Posts: 225
Received Thanks: 68
|
und wie bekomme ich das bei radiobutton hin ob da jetzt der punkt is or ned
|
|
|
01/01/2010, 22:59
|
#4
|
elite*gold: 9
Join Date: Apr 2009
Posts: 10,163
Received Thanks: 3,811
|
Genauso wie bei der Checkbox...:
Code:
IniWrite("Name.ini", "Einstellungen", "Zeile 1", GUICtrlRead($Variable))
Und dann das IniRead:
Code:
$IniRead = IniRead("Name.ini", "Einstellungen", "Zeile 1", "")
GUIctrlSetState($Variable, $IniRead)
So klappt's bei mir auf jeden fall...
|
|
|
01/01/2010, 23:07
|
#5
|
elite*gold: 0
Join Date: Aug 2009
Posts: 225
Received Thanks: 68
|
und wie kann ich feststellen welcher radiobutton makiert worden ist?
|
|
|
01/01/2010, 23:09
|
#6
|
elite*gold: 9
Join Date: Apr 2009
Posts: 10,163
Received Thanks: 3,811
|
Quote:
Originally Posted by 93lucas
und wie kann ich feststellen welcher radiobutton makiert worden ist?
|
Denk' doch mal nach...
|
|
|
01/01/2010, 23:15
|
#7
|
elite*gold: 0
Join Date: Aug 2009
Posts: 225
Received Thanks: 68
|
hab heute schon ne halbe stunde nachgedacht wies gehen könnte mit if $da = $gui_checked oder so gehts ned
|
|
|
01/01/2010, 23:16
|
#8
|
elite*gold: 0
Join Date: Apr 2009
Posts: 793
Received Thanks: 366
|
Quote:
Originally Posted by 93lucas
hab heute schon ne halbe stunde nachgedacht wies gehen könnte
|
Dann machst du aber was falsch -.-
|
|
|
01/01/2010, 23:24
|
#9
|
elite*gold: 0
Join Date: Aug 2009
Posts: 225
Received Thanks: 68
|
deswegen wäre es nett wenn ihr mir den richtigen code geben würdest gibt auch thanks
|
|
|
01/01/2010, 23:33
|
#10
|
elite*gold: 20
Join Date: Feb 2007
Posts: 3,080
Received Thanks: 4,294
|
if guictrlread($bliblablub,$gui_checked) then oh wunder wurde angeklickt?
|
|
|
01/01/2010, 23:42
|
#11
|
elite*gold: 9
Join Date: Apr 2009
Posts: 10,163
Received Thanks: 3,811
|
Quote:
Originally Posted by 93lucas
deswegen wäre es nett wenn ihr mir den richtigen code geben würdest gibt auch thanks
|
Ich hab dir den Code schon gegeben, ich weiß nicht wo dein Problem liegt...
|
|
|
01/02/2010, 02:40
|
#12
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
|
Er gibt sich keine Mühe...
Sollte alles dabei sein:
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("Test", 166, 99, 192, 124)
GUISetBkColor(0xFFFFFF)
$Radio1 = GUICtrlCreateRadio("Radio 1", 8, 8, 61, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox1 = GUICtrlCreateCheckbox("Inputeingabe erlauben", 32, 28, 133, 17)
$Input1 = GUICtrlCreateInput("Text", 32, 48, 125, 21)
$Radio2 = GUICtrlCreateRadio("Radio 2", 8, 72, 65, 17)
$Button1 = GUICtrlCreateButton("Save", 116, 72, 40, 21, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Load", 75, 72, 40, 21, $WS_GROUP)
GUISetState(@SW_SHOW)
While True
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If GUICtrlRead($Radio1) = $GUI_CHECKED Then
IniWrite("Test.ini", "Status", "Radio1", "1")
Else
IniWrite("Test.ini", "Status", "Radio1", "0")
EndIf ; => Radio1
If GUICtrlRead($Radio2) = $GUI_CHECKED Then
IniWrite("Test.ini", "Status", "Radio2", "1")
Else
IniWrite("Test.ini", "Status", "Radio2", "0")
EndIf ; => Radio2
If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
IniWrite("Test.ini", "Status", "Checkbox1", "1")
Else
IniWrite("Test.ini", "Status", "Checkbox1", "0")
EndIf ; => Checkbox1
IniWrite("Test.ini", "Status", "Input1", GUICtrlRead($Input1))
Case $Button2
If IniRead("Test.ini", "Status", "Radio1", @ScriptDir) = 1 Then
GUICtrlSetState($Radio1, $GUI_CHECKED)
Else
GUICtrlSetState($Radio1, $GUI_UNCHECKED)
EndIf ; => Radio1
If IniRead("Test.ini", "Status", "Radio2", @ScriptDir) = 1 Then
GUICtrlSetState($Radio2, $GUI_CHECKED)
Else
GUICtrlSetState($Radio2, $GUI_UNCHECKED)
EndIf ; => Radio2
If IniRead("Test.ini", "Status", "Checkbox1", @ScriptDir) = 1 Then
GUICtrlSetState($Checkbox1, $GUI_CHECKED)
Else
GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
EndIf ; => Checkbox1
GUICtrlSetData($Input1, IniRead("Test.ini", "Status", "Input1", @ScriptDir))
EndSwitch
WEnd
oder:
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("Test", 166, 99, 192, 124)
GUISetBkColor(0xFFFFFF)
$Radio1 = GUICtrlCreateRadio("Radio 1", 8, 8, 61, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox1 = GUICtrlCreateCheckbox("Inputeingabe erlauben", 32, 28, 133, 17)
$Input1 = GUICtrlCreateInput("Text", 32, 48, 125, 21)
$Radio2 = GUICtrlCreateRadio("Radio 2", 8, 72, 65, 17)
$Button1 = GUICtrlCreateButton("Save", 116, 72, 40, 21, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Load", 75, 72, 40, 21, $WS_GROUP)
GUISetState(@SW_SHOW)
While True
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
IniWrite("Test.ini", "Status", "Radio1", GUICtrlRead($Radio1))
IniWrite("Test.ini", "Status", "Radio2", GUICtrlRead($Radio2))
IniWrite("Test.ini", "Status", "Checkbox1", GUICtrlRead($Checkbox1))
IniWrite("Test.ini", "Status", "Input1", GUICtrlRead($Input1))
Case $Button2
$R1_Save = IniRead("Test.ini", "Status", "Radio1", "")
GUICtrlSetState($Radio1, $R1_Save)
$R2_Save = IniRead("Test.ini", "Status", "Radio2", "")
GUICtrlSetState($Radio2, $R2_Save)
$C_Save = IniRead("Test.ini", "Status", "Checkbox1", "")
GUICtrlSetState($Checkbox1, $C_Save)
GUICtrlSetData($Input1, IniRead("Test.ini", "Status", "Input1", ""))
EndSwitch
WEnd
|
|
|
01/02/2010, 02:47
|
#13
|
elite*gold: 9
Join Date: Apr 2009
Posts: 10,163
Received Thanks: 3,811
|
Quote:
Originally Posted by KillerDeluxe123
Er gibt sich keine Mühe...
Sollte alles dabei sein:
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("Test", 166, 99, 192, 124)
GUISetBkColor(0xFFFFFF)
$Radio1 = GUICtrlCreateRadio("Radio 1", 8, 8, 61, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox1 = GUICtrlCreateCheckbox("Inputeingabe erlauben", 32, 28, 133, 17)
$Input1 = GUICtrlCreateInput("Text", 32, 48, 125, 21)
$Radio2 = GUICtrlCreateRadio("Radio 2", 8, 72, 65, 17)
$Button1 = GUICtrlCreateButton("Save", 116, 72, 40, 21, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Load", 75, 72, 40, 21, $WS_GROUP)
GUISetState(@SW_SHOW)
While True
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If GUICtrlRead($Radio1) = $GUI_CHECKED Then
IniWrite("Test.ini", "Status", "Radio1", "1")
Else
IniWrite("Test.ini", "Status", "Radio1", "0")
EndIf ; => Radio1
If GUICtrlRead($Radio2) = $GUI_CHECKED Then
IniWrite("Test.ini", "Status", "Radio2", "1")
Else
IniWrite("Test.ini", "Status", "Radio2", "0")
EndIf ; => Radio2
If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
IniWrite("Test.ini", "Status", "Checkbox1", "1")
Else
IniWrite("Test.ini", "Status", "Checkbox1", "0")
EndIf ; => Checkbox1
IniWrite("Test.ini", "Status", "Input1", GUICtrlRead($Input1))
Case $Button2
If IniRead("Test.ini", "Status", "Radio1", @ScriptDir) = 1 Then
GUICtrlSetState($Radio1, $GUI_CHECKED)
Else
GUICtrlSetState($Radio1, $GUI_UNCHECKED)
EndIf ; => Radio1
If IniRead("Test.ini", "Status", "Radio2", @ScriptDir) = 1 Then
GUICtrlSetState($Radio2, $GUI_CHECKED)
Else
GUICtrlSetState($Radio2, $GUI_UNCHECKED)
EndIf ; => Radio2
If IniRead("Test.ini", "Status", "Checkbox1", @ScriptDir) = 1 Then
GUICtrlSetState($Checkbox1, $GUI_CHECKED)
Else
GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
EndIf ; => Checkbox1
GUICtrlSetData($Input1, IniRead("Test.ini", "Status", "Input1", @ScriptDir))
EndSwitch
WEnd
|
Naja, die V ist viel länger, es geht auch kürzer (siehe mein Post)
|
|
|
01/02/2010, 02:52
|
#14
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
|
Wollts nur einfacher darstellen
|
|
|
01/02/2010, 13:43
|
#15
|
elite*gold: 0
Join Date: Aug 2009
Posts: 225
Received Thanks: 68
|
Quote:
Originally Posted by AllesVergeben
Ich hab dir den Code schon gegeben, ich weiß nicht wo dein Problem liegt...
|
Ich hatte noch ne Frage
Und jetzt hab ich au noch ne Frage wie mach ich die speicherfunktion bei ner combobox?
|
|
|
 |
|
Similar Threads
|
Checkbox Hilfe!
09/11/2010 - AutoIt - 6 Replies
Hallo ich brauche schnell eure hilfe...
Ich schreibe einen Trainer und möchte,
dass wenn z.B.
$Checkbox14 angekreuzt ist,
$Checkbox15 nicht angekreuzt ist.
und wenn dann
|
Help-CheckBox zuweisen!
11/29/2009 - AutoIt - 13 Replies
Hallo Leute
ich hab mal wieder ne Frage xD
Also, ich wollte mal mit AutoIT ein Programm schreiben für mich und meine freunde und so, dass wenn sie den Pc neumachen das dieses Programm halt die wichtigsten bzw. auch guten Programme automatisch insterliert.
Das mit dem Automatisch insterlieren war ja kein Problem für mich, doch wie mache ich es das er jetzt z.b. anklickt das er Antivir haben will und Firfox, dass er die nacheinander Insterliert.
Also hier noch mal mehr Infos.
Wenn er jetzt...
|
checkbox FOCUS & DISABLE
11/09/2009 - AutoIt - 1 Replies
Hy, wie bekomm ich das hin das wenn die checkbox unchecked is der button nicht anklickbar ist und wenn sie checked is der button anklickbar is... ich weis komisch formuliert. So habs ich getestet aber wenn ich dann Checkbox anklicke bleibt der button trotzdem "unchecked" was mach ich da falsch ?
$Checkbox1 = 0
test()
Func test()
If $Checkbox1 = 0 Then
$Button1 = GUICtrlSetState(-1, $GUI_DISABLE)
|
checkbox auslesen ?
05/27/2009 - AutoIt - 3 Replies
Hey,
brauche hilfe da weder search hier im forum noch au3 help was ausgespuckt hat
wie bekomme ich checkbox ausgelesen (vieleicht so wie $radio??) sodas ich diese dann in eine if/else reinpacken kann
hier mal ansatz
//Edit:so habe es hinbekommen aber wie packe ich diese nun in eine if/else also das wenn z.b. alle 3 ausgewählt sind er auch alle 3 ausführt?
danke euch schonmal ;D
|
AutoIT - Transparente Checkbox
07/19/2007 - General Coding - 2 Replies
-
|
All times are GMT +1. The time now is 01:05.
|
|