Help-CheckBox zuweisen!

11/28/2009 12:40 -MARKS-#1
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 z.b. Firefox anklickt und dann auf Start.Öffnet sich ne exe. die die Installation exe von Firfox hat und dann den Bot der das Instaliert
ach ich zeigs euch einfach mal :D
Code:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\mark´s\desktop\koda_1.7.0.1\forms\ghhhhhhhhh.kxf
$Form1_1 = GUICreate("Form1", 546, 412, 249, 201)
$Label1 = GUICtrlCreateLabel("Was soll ausgeführt werden?", 152, 8, 259, 30)
GUICtrlSetFont(-1, 14, 400, 0, "Comic Sans MS")
$Label2 = GUICtrlCreateLabel("Installation von AntiVir", 8, 56, 108, 17)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 184, 56, 17, 17)
$Label3 = GUICtrlCreateLabel("", 8, 72, 4, 4)
$Label4 = GUICtrlCreateLabel("Installation von CCleaner", 8, 80, 121, 17)
$Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 184, 80, 17, 17)
$Label5 = GUICtrlCreateLabel("Installation von xp-AntiSpy", 8, 104, 128, 17)
$Label6 = GUICtrlCreateLabel("Installation von Disk-Defrag", 8, 128, 134, 17)
$Label7 = GUICtrlCreateLabel("Installation von RegCleaner", 8, 152, 134, 17)
$Label8 = GUICtrlCreateLabel("PC schneller herrunterfahren/", 8, 176, 143, 17)
$Label9 = GUICtrlCreateLabel("Fenster schneller schließen", 8, 192, 132, 17)
$Checkbox3 = GUICtrlCreateCheckbox("Checkbox3", 184, 184, 17, 17)
$Checkbox4 = GUICtrlCreateCheckbox("Checkbox4", 184, 128, 17, 17)
$Checkbox5 = GUICtrlCreateCheckbox("Checkbox5", 184, 152, 17, 17)
$Checkbox6 = GUICtrlCreateCheckbox("Checkbox6", 184, 104, 17, 17)
$Label10 = GUICtrlCreateLabel("Installation von Firefox", 8, 216, 109, 17)
$Checkbox7 = GUICtrlCreateCheckbox("Checkbox7", 184, 216, 17, 17)
$Label11 = GUICtrlCreateLabel("Installation von Adobe Reader", 8, 240, 147, 17)
$Checkbox8 = GUICtrlCreateCheckbox("Checkbox8", 184, 240, 17, 17)
$Label12 = GUICtrlCreateLabel("Installation von Spybot", 8, 264, 111, 17)
$Label13 = GUICtrlCreateLabel("Installation von Gimp", 8, 288, 102, 17)
$Label14 = GUICtrlCreateLabel("Installation von PhotoScape", 8, 312, 137, 17)
$Label15 = GUICtrlCreateLabel("Installation von TeamViewer", 8, 336, 137, 17)
$Label16 = GUICtrlCreateLabel("Installation von Adobe Flash Player", 8, 360, 169, 17)
$Label17 = GUICtrlCreateLabel("Installation von DivX", 8, 384, 101, 17)
$Checkbox9 = GUICtrlCreateCheckbox("Checkbox9", 184, 264, 17, 17)
$Checkbox10 = GUICtrlCreateCheckbox("Checkbox10", 184, 288, 17, 17)
$Checkbox11 = GUICtrlCreateCheckbox("Checkbox11", 184, 312, 17, 17)
$Checkbox12 = GUICtrlCreateCheckbox("Checkbox12", 184, 336, 17, 17)
$Checkbox13 = GUICtrlCreateCheckbox("Checkbox13", 184, 360, 17, 17)
$Checkbox14 = GUICtrlCreateCheckbox("Checkbox14", 184, 384, 17, 17)
$Label18 = GUICtrlCreateLabel("Installation von MyPhoneExplorer", 248, 56, 161, 17)
$Checkbox15 = GUICtrlCreateCheckbox("Checkbox15", 464, 56, 17, 17)
$Label19 = GUICtrlCreateLabel("Installation von Windows Journal Viewer", 248, 80, 194, 17)
$Label20 = GUICtrlCreateLabel("Installation von OpenOffice.org ", 248, 104, 153, 17)
$Label21 = GUICtrlCreateLabel("Installation von Picasa ", 248, 128, 113, 17)
$Checkbox16 = GUICtrlCreateCheckbox("Checkbox16", 464, 80, 17, 17)
$Checkbox17 = GUICtrlCreateCheckbox("Checkbox17", 464, 104, 17, 17)
$Checkbox18 = GUICtrlCreateCheckbox("Checkbox18", 464, 128, 17, 17)
$Label22 = GUICtrlCreateLabel("Installation von ClearProg", 248, 152, 124, 17)
$Label23 = GUICtrlCreateLabel("Installation von PROMT Translation Agent", 248, 176, 203, 17)
$Checkbox19 = GUICtrlCreateCheckbox("Checkbox19", 464, 152, 17, 17)
$Checkbox20 = GUICtrlCreateCheckbox("Checkbox20", 464, 176, 17, 17)
$Label24 = GUICtrlCreateLabel("Installation von DVDVideoSoft Free Studio", 248, 200, 204, 17)
$Label25 = GUICtrlCreateLabel("Installation von Mouse Get Pos", 248, 224, 151, 17)
$Checkbox21 = GUICtrlCreateCheckbox("Checkbox21", 464, 200, 17, 17)
$Checkbox22 = GUICtrlCreateCheckbox("Checkbox22", 464, 224, 17, 17)
$Label26 = GUICtrlCreateLabel("Installation von AutoIt", 248, 248, 106, 17)
$Checkbox23 = GUICtrlCreateCheckbox("Checkbox23", 464, 248, 17, 17)
$Label27 = GUICtrlCreateLabel("Installation von BitTorrent", 248, 272, 124, 17)
$Checkbox24 = GUICtrlCreateCheckbox("Checkbox24", 464, 272, 17, 17)
$Start = GUICtrlCreateButton("Start", 288, 360, 137, 33, 0)
$Label28 = GUICtrlCreateLabel("Installation von MP3Gain", 248, 296, 122, 17)
$Label29 = GUICtrlCreateLabel("Installation von Google Earth", 248, 320, 140, 17)
$Checkbox25 = GUICtrlCreateCheckbox("Checkbox25", 464, 296, 17, 17)
$Checkbox26 = GUICtrlCreateCheckbox("Checkbox26", 464, 320, 17, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd
Das ist das Programm dann^^
Und sowas soll starten wenn er z.b. CCleaner anklickt:
Code:
FileInstall("C:\ccsetup225_slim.exe", @Scriptdir & "\ccsetup225_slim.exe")

Run("ccsetup225_slim.exe") 
WinWaitActive("Installer Language")
Send("{ENTER}")
WinWaitActive("CCleaner v2.25 Installation")
Send("{ENTER}") 
WinWaitActive("CCleaner v2.25 Installation", "Lizenzabkommen")
Send("{ENTER}") 
WinWaitActive("CCleaner v2.25 Installation", "Zielverzeichnis auswählen")
Send("{ENTER}")
WinWaitActive("CCleaner v2.25 Installation", "Installations-Einstellungen")
Send("{ENTER}")
WinWaitActive("CCleaner v2.25 Installation", "Die Installation von CCleaner v2.25 wird abgeschlossen")
Send("{ENTER}")
WinWaitActive("Piriform CCleaner")
WinClose("Piriform CCleaner")
Achja und wie mache ich es das das ich noch Info zu jedem Programm hinzufügen kann!

Hilfe wäre sehr sehr sehr nett!:D Dankeee:handsdown:
Lg -Marks-
11/28/2009 14:35 .nAno#2
Das geht irg.wie mit
PHP Code:
GuiCtrlRead 
Näheres wirste in der HelpFunction finden ;)

Ich habs nochnich ausprobiert, da ich GUIs nich wirklich mag:P
Das Scripten an sich macht mir mehr Spaß ;)
11/28/2009 14:46 -MARKS-#3
Danke aber ich habe keine Ahung was/wie das gehen soll
Ich habe angenomm man muss das i-wie mit If machen
also :
If $checkboy1 = then
Run ("ccleander.exe")


oder so^^
11/28/2009 15:23 Xereon#4
Quote:
Originally Posted by -MARKS- View Post
Danke aber ich habe keine Ahung was/wie das gehen soll
Ich habe angenomm man muss das i-wie mit If machen
also :
If $checkboy1 = then
Run ("ccleander.exe")


oder so^^
Lesen ist anscheinend wirklich schwer:

Quote:
Return Value

Success: Returns depending the control (see below).
Failure: Returns 0.
Type Value
Checkbox, Radio state of the button. See State table
Combo, List The value selected
Input, Edit The text entered
Button The display text
Date The selected date
Progress Current percentage
Slider Current value
Tab The number or the controlID of the tabitem selected depending of the advanced parameter value.
Menu, MenuItem State of the menu/item. See State table
TreeView Control identifier (controlID) of the selected TreeViewItem
TreeViewItem State of the TreeViewItem
ListView Control identifier (controlID) of the selected ListViewItem. 0 means no item is selected
Dummy The value set by GUICtrlSendToDummy or GUICtrlSetData
@.nAno Was haste gegen GUIs? o.O
11/28/2009 15:40 -MARKS-#5
ISt ja auch schwer für anfänger xD
kannst du mir nich bitte ein beispiel sagen:D
11/28/2009 15:42 Xereon#6
Code:
GuiCtrlRead($input1)
Returnt den Text in den fiktiven Input $input1
11/28/2009 15:46 -MARKS-#7
also muss ich dann machen:
GuiCtrlRead($checkbox1)
run ("blabla.exe")
?
aber was nütz mir das
wenn ich ja dann start mache ( ich weiß auch vom dem den befehl nich)
dann instrliert er ja alles aufeinmal^^ schätze ich mal^^
11/28/2009 15:48 .nAno#8
ka xD
Ich hab ne Phobie gegen alles was mit Grafischem Interface zu tun hat, seit dem ich von HTML, CSS und PHP (ok PHP nich wirklich^^) auf gut Deutsch: die Schnauze gestrichen voll hab...

Oder drücken wir's besser so aus:
Ich hab kein Bock Verknüpfungen zwischen Funktionen und GUI zu machen :P Und wie gesagt, frag nich wieso xD
11/28/2009 15:58 Xereon#9
Quote:
Originally Posted by -MARKS- View Post
also muss ich dann machen:
GuiCtrlRead($checkbox1)
run ("blabla.exe")
?
aber was nütz mir das
wenn ich ja dann start mache ( ich weiß auch vom dem den befehl nich)
dann instrliert er ja alles aufeinmal^^ schätze ich mal^^
Hast du dir eigentlich schoneinmal ein Tutorial durchgelsen? Ich frage mich wo für die eigentlich da sind, wenn niemand die liest.

Mein letzter Tipp für dich, überleg mal was IF machen könnte.
11/28/2009 23:16 -MARKS-#10
muss ich machen?
If $checkbox1 = $checkbox1 then
run ("ccleaner.exe")????
11/28/2009 23:35 -MARKS-#11
Kannst du mir nich bitte sagen wie das mache das wenn ich auf start drücke das sich halt die anklicken nacheinander insterlieren?
bitttee
11/29/2009 15:37 WieMeinen#12
Also ich glaube mit
Quote:
If GUIctrlRead($checkbox1) = 1 then
run ("blabla.exe")
geht das
11/29/2009 16:18 -MARKS-#13
jo ich glaub auch danke
bloß wie mache ich es das jetzt das er es nacheinander insterliert bzw. nachguckt ob die angeklcikt wurden?
11/29/2009 16:56 -MARKS-#14
ok ich habs trodtzem danke:D