Mit dem Bild komme ich nicht so klar ?
Beiträge von RR04
-
-
Icon ist drin. Das Bild muss das gleiche Format haben wie die Oberfläche, also 590x560 ?
-
Hi,
lade mal Icon, Script und Bild hoch (in einer Zip-Datei) -
Hallo Osoris !
Deine Erweiterung in Post #21 ist mir schon in Deiner „Vorlage“ aufgefallen und ich habe sie bewusst weggelassen, denn …
1.Bei der Installation des VLCs werden diese Abfragen schon vom VLC gestellt. – Was will man mehr ?
2.Es werden zwei direkte Pfade geprüft, was wenn VLC in D:\MeineSoftware\VLC liegt? Überraschung, der VLC findet diese Installation erst selbst.
3.Alles hochfahren, anklicken und die Software sagt: „Nein, nein erst einmal zurück und deinstallieren!“Ich sehe hier weder Sinn noch Nutzen ? Was meinst Du ?
Aber ich kann mir vorstellen, was Du damit meinst und ich habe mal eine Funktion (mit reichlich Kommentaren) geschrieben, so wie es gehen könnte.
OsorisSoftwareInstaller
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=DeinIcon.ico ;i DeinIcon.ico
#AutoIt3Wrapper_outfile=OSI.exe
#AutoIt3Wrapper_Res_Description=Osoris Software Installer
#AutoIt3Wrapper_Res_Fileversion=3.1
#AutoIt3Wrapper_Res_LegalCopyright=© 2011 by Osoris
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
#AutoIt3Wrapper_Res_Field=Compiled by|Osoris
#AutoIt3Wrapper_Res_Field=Original Name|Osoris Software Installer
#AutoIt3Wrapper_Res_Field=Build|%date%
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_Run_Tidy=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/striponly
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#region - TimeStamp
; 2011-05-13 13:31:34
#endregion - TimeStamp#RequireAdmin
[/autoit] [autoit][/autoit] [autoit];~ $GUI_EVENT_MINIMIZE —> GUIConstantsEx.au3
[/autoit] [autoit][/autoit] [autoit]
;~ $GUI_EVENT_MAXIMIZE —> GUIConstantsEx.au3
;~ $GUI_EVENT_RESTORE —> GUIConstantsEx.au3
;~ $GUI_UNCHECKED —> GUIConstantsEx.au3Opt("GUIOnEventMode", 1) ;i Eine Gute Wahl -> mehr Macros, leichtere Fenstertechnik
[/autoit] [autoit][/autoit] [autoit]#region ### START Koda GUI section ###
[/autoit] [autoit][/autoit] [autoit]
GUICreate("Osoris Software Installer", 590, 560)
GUISetBkColor(0x008080)
GUISetOnEvent($GUI_EVENT_CLOSE, "_ende")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")GUICtrlCreateGroup("Silent Install", 16, 16, 185, 500)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
;i #### Start Checkboxarray für 25 Checkboxen ###
Global $aLBckbColumn1[25] = ["V L C", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
"21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
;i a- Array + Label-LB + Checkbox-ckb
Global $aCkbColumn1[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
;i a- Array + Checkbox-ckb
For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
$aCkbColumn1[$i] = GUICtrlCreateCheckbox($aLBckbColumn1[$i], 24, 40 + $i * 19, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
; create 25x Checkbox
Next
;i #### Ende Checkboxarray ###
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGUICtrlCreateGroup("User default", 200, 16, 185, 500)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
;i #### Start Checkboxarray für 25 Checkboxen ###
Global $aLBckbColumn2[25] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
"21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
;i a- Array + Label-LB + Checkbox-ckb
Global $aCkbColumn2[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
;i a- Array + Checkbox-ckb
For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
$aCkbColumn2[$i] = GUICtrlCreateCheckbox($aLBckbColumn2[$i], 210, 40 + $i * 19, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
; create 25x Checkbox
Next
;i #### Ende Checkboxarray ###
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGUICtrlCreateGroup("Portable Apps ", 384, 16, 185, 500)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
;i #### Start Checkboxarray für 25 Checkboxen ###
Global $aLBckbColumn3[25] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
"21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
;i a- Array + Label-LB + Checkbox-ckb
Global $aCkbColumn3[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
;i a- Array + Checkbox-ckb
For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
$aCkbColumn3[$i] = GUICtrlCreateCheckbox($aLBckbColumn3[$i], 400, 40 + $i * 19, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
; create 25x Checkbox
Next
;i #### Ende Checkboxarray ###
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGlobal $bnInstall = GUICtrlCreateButton("Install", 392, 526, 83, 22)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 9, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "_start")
Global $bnExit = GUICtrlCreateButton("Exit", 480, 526, 75, 22)
GUICtrlSetFont(-1, 9, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "_ende")GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]
#endregion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(100)
WEndFunc _start()
[/autoit] [autoit][/autoit] [autoit]
Local $Msg = MsgBox(32 + 4, "Installation", "Soll mit der Installation begonnen werden ?" & @TAB)
If $Msg = 7 Then
ConsoleWrite("Abbruch durch den Nutzer !" & @CRLF)
Else
_install()
EndIf
EndFunc ;==>_startFunc _install()
[/autoit] [autoit][/autoit] [autoit]
;i MsgBox(0, "", "Installation ...") ;i zur Prüfung der Funktion, also ein Dummy
_softwareInstall_01()
; [...]
;_softwareInstall_75()
MsgBox(64, "Installation", "Die Installation ist abgeschlossen !" & @TAB) ;i Erfolgsmeldung!
Exit ;i Beenden
EndFunc ;==>_install#region ### CheckVLC Section ###
[/autoit] [autoit][/autoit] [autoit]
Func _softwareInstall_01()
;i Aut(h)or: by Ritzelrocker04;i ist die Checkbox mit Namen "$aCkbColumn1[0]" aktiv, wenn ja dann ...
[/autoit] [autoit][/autoit] [autoit]
If BitAND(GUICtrlRead($aCkbColumn1[0]), $GUI_CHECKED) = $GUI_CHECKED ThenLocal $VLN = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\VideoLAN\VLC", "InstallDir"), _
[/autoit] [autoit][/autoit] [autoit]
$versionVLN = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\VideoLAN\VLC", "Version")
Local $VLC = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\VLC", "InstallDir"), _
$versionVLC = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\VLC", "Version")
;i ... Abfrage ob VLC schon auf dem PC unter VideoLAN installiert ist ...
If FileExists($VLN & "\vlc.exe") Then
;i ... dann ermittle die installierte Version von VLC ...
ConsoleWrite("VLC media player " & $versionVLN & " ist installiert" _
& @CRLF & " und befindet sich in: " & $VLN & "\vlc.exe")
;i Meldung an den Nutzer über die vorhandene VLCversion, ...
;i ... Frage ob diese deinstalliert werden soll, wenn ja dann Deinstallation!
If MsgBox(32 + 4, "Installation", "VLC media player " & $versionVLN & _
" ist bereits installiert !" & @TAB & @CRLF & @CRLF & _
"Soll das Programm deinstalliert werden ?" & @TAB) = 6 Then RunWait($VLN & "\uninstall.exe")
;i ... Anfrage ob VLC schon auf dem PC unter VLC installiert ist ...
ElseIf FileExists($VLC & "\vlc.exe") Then
;i ... dann ermittle die installierte Version von VLC ...
ConsoleWrite("VLC media player " & $versionVLN & " ist installiert" _
& @CRLF & " und befindet sich in: " & $VLN & "\vlc.exe")
;i Meldung an den Nutzer über die vorhandene VLCversion, ...
;i ... Frage ob diese deinstalliert werden soll, wenn ja dann Deinstallation!
If MsgBox(32 + 4, "Installation", "VLC media player " & $versionVLC & _
" ist bereits installiert !" & @TAB & @CRLF & @CRLF & _
"Soll das Programm deinstalliert werden ?" & @TAB) = 6 Then RunWait($VLC & "\uninstall.exe")
Else
;i VLC aus Deinem Softwarepool installieren!
RunWait(@ScriptDir & "\Software\vlc\vlc.exe")
EndIf
EndIf
Sleep(1000) ;i Wartezeit bis zum Aufruf einer weiteren Funktion
EndFunc ;==>_softwareInstall_01
#endregion ### CheckVLC Section ###Func _ende()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFunc ;==>_endeFunc Form1Maximize()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1MaximizeFunc Form1Minimize()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1MinimizeFunc Form1Restore()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1Restore; Ende
[/autoit] -
Na bitte,
die Funktionen so weiter ausbauen. Wenn Du nicht mehr weiter kommst, melde Dich. Ich muß erst einmal Essen.

-
Meine erste SoftwareInstallation:
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=DeinIcon.ico ;i#################### DeinIcon.ico #########################
#AutoIt3Wrapper_outfile=OSI.exe
#AutoIt3Wrapper_Res_Description=Osiris Software Installer
#AutoIt3Wrapper_Res_Fileversion=3.1
#AutoIt3Wrapper_Res_LegalCopyright=© 2011 by Osiris
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
#AutoIt3Wrapper_Res_Field=Compiled by|Osiris
#AutoIt3Wrapper_Res_Field=Original Name|Osiris Software Installer
#AutoIt3Wrapper_Res_Field=Build|%date%
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_Run_Tidy=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/striponly
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#region - TimeStamp
; 2011-05-12 18:03:03
#endregion - TimeStamp#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#RequireAdmin;~ $GUI_EVENT_MINIMIZE —> GUIConstantsEx.au3
[/autoit] [autoit][/autoit] [autoit]
;~ $GUI_EVENT_MAXIMIZE —> GUIConstantsEx.au3
;~ $GUI_EVENT_RESTORE —> GUIConstantsEx.au3
;~ $GUI_UNCHECKED —> GUIConstantsEx.au3Opt("GUIOnEventMode", 1) ;i Eine Gute Wahl -> mehr Macros, leichtere Fenstertechnik
[/autoit] [autoit][/autoit] [autoit]#region ### START Koda GUI section ###
[/autoit] [autoit][/autoit] [autoit]
GUICreate("Software Installer v3.1", 590, 560)
GUISetBkColor(0x008080)
GUISetOnEvent($GUI_EVENT_CLOSE, "_close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")GUICtrlCreateGroup("Silent Install", 16, 16, 185, 500)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
;i#### Start Checkboxarray für 25 Checkboxen ##########################################################################
Global $aLBckbColumn1[25] = ["V L C", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
"21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
;i a- Array + Label-LB + Checkbox-ckb
Global $aCkbColumn1[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
;i a- Array + Checkbox-ckb
For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
$aCkbColumn1[$i] = GUICtrlCreateCheckbox($aLBckbColumn1[$i], 24, 40 + $i * 19, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
; create 25x Checkbox
Next
;i#### Ende Checkboxarray #############################################################################################
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGUICtrlCreateGroup("User default", 200, 16, 185, 500)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
;i#### Start Checkboxarray für 25 Checkboxen ##########################################################################
Global $aLBckbColumn2[25] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
"21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
;i a- Array + Label-LB + Checkbox-ckb
Global $aCkbColumn2[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
;i a- Array + Checkbox-ckb
For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
$aCkbColumn2[$i] = GUICtrlCreateCheckbox($aLBckbColumn2[$i], 210, 40 + $i * 19, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
; create 25x Checkbox
Next
;i#### Ende Checkboxarray #############################################################################################
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGUICtrlCreateGroup("Portable Apps ", 384, 16, 185, 500)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
;i#### Start Checkboxarray für 25 Checkboxen ##########################################################################
Global $aLBckbColumn3[25] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
"21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
;i a- Array + Label-LB + Checkbox-ckb
Global $aCkbColumn3[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
;i a- Array + Checkbox-ckb
For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
$aCkbColumn3[$i] = GUICtrlCreateCheckbox($aLBckbColumn3[$i], 400, 40 + $i * 19, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
; create 25x Checkbox
Next
;i#### Ende Checkboxarray #############################################################################################
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGlobal $bnInstall = GUICtrlCreateButton("Install", 392, 526, 83, 22)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 9, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "_start")
Global $bnExit = GUICtrlCreateButton("Exit", 480, 526, 75, 22)
GUICtrlSetFont(-1, 9, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "_close")GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]
#endregion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(100)
WEndFunc _start()
[/autoit] [autoit][/autoit] [autoit]
Local $Msg = MsgBox(32 + 4, "Installation", "Soll mit der Installation begonnen werden ?" & @TAB)
If $Msg = 7 Then
ConsoleWrite("Abbruch durch den Nutzer !" & @CRLF)
Else
_install()
EndIf
EndFunc ;==>_startFunc _install()
[/autoit] [autoit][/autoit] [autoit]
;i MsgBox(0, "", "Installation ...") ;i zur Prüfung der Funktion, also ein Dummy
_softwareInstall_01()
MsgBox(64, "Installation", "Die Installation ist abgeschlossen !" & @TAB) ;i Erfolgsmeldung!
Exit ;i Beenden
EndFunc ;==>_installFunc _softwareInstall_01()
[/autoit] [autoit][/autoit] [autoit]
If BitAND(GUICtrlRead($aCkbColumn1[0]), $GUI_CHECKED) = $GUI_CHECKED Then
MsgBox(1, "Programm", "Programm wird installiert !", 2)
RunWait(@ScriptDir & "\Software\vlc\vlc.exe")
EndIf
EndFunc ;==>_softwareInstall_01Func _close()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFunc ;==>_closeFunc Form1Maximize()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1MaximizeFunc Form1Minimize()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1MinimizeFunc Form1Restore()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1Restore; Ende
[/autoit] -
Anfänglich ist das sehr verwirrend, also scheue Dich nicht lange und eindeutige Variabelnamen zu vergeben. Einkürzen kannst Du später immer.
Hier besonders schön durch die vielen Checkboxen, da kommt das sehr gut zum Ausdruck. -
Welcher Button?
[autoit]
Befor Du Deinen Beitrag eintippst in der Leiste darüber oder Du setzt Deinen Quellcode in[autoit]Quellcode
[/autoit][/autoit].
Das Einfügen war schon gut, nur Variablen dürfen nicht doppelt verwendet werden.
So nun weiter:Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=DeinIcon.ico ;i#################### DeinIcon.ico #########################
#AutoIt3Wrapper_outfile=OSI.exe
#AutoIt3Wrapper_Res_Description=Osiris Software Installer
#AutoIt3Wrapper_Res_Fileversion=3.1
#AutoIt3Wrapper_Res_LegalCopyright=© 2011 by Osiris
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
#AutoIt3Wrapper_Res_Field=Compiled by|Osiris
#AutoIt3Wrapper_Res_Field=Original Name|Osiris Software Installer
#AutoIt3Wrapper_Res_Field=Build|%date%
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_Run_Tidy=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/striponly
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#region - TimeStamp
; 2011-05-12 17:16:15
#endregion - TimeStamp#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#RequireAdmin;~ $GUI_EVENT_MINIMIZE —> GUIConstantsEx.au3
[/autoit] [autoit][/autoit] [autoit]
;~ $GUI_EVENT_MAXIMIZE —> GUIConstantsEx.au3
;~ $GUI_EVENT_RESTORE —> GUIConstantsEx.au3
;~ $GUI_UNCHECKED —> GUIConstantsEx.au3Opt("GUIOnEventMode", 1) ;i Eine Gute Wahl -> mehr Macros, leichtere Fenstertechnik
[/autoit] [autoit][/autoit] [autoit]#region ### START Koda GUI section ###
[/autoit] [autoit][/autoit] [autoit]
GUICreate("Software Installer v3.1", 590, 560)
GUISetBkColor(0x008080)
GUISetOnEvent($GUI_EVENT_CLOSE, "_close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")GUICtrlCreateGroup("Silent Install", 16, 16, 185, 500)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
;i#### Start Checkboxarray für 25 Checkboxen ##########################################################################
Global $aLBckbColumn1[25] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
"21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
;i a- Array + Label-LB + Checkbox-ckb
Global $aCkbColumn1[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
;i a- Array + Checkbox-ckb
For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
$aCkbColumn1[$i] = GUICtrlCreateCheckbox($aLBckbColumn1[$i], 24, 40 + $i * 19, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
; create 25x Checkbox
Next
;i#### Ende Checkboxarray #############################################################################################
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGUICtrlCreateGroup("User default", 200, 16, 185, 500)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
;i#### Start Checkboxarray für 25 Checkboxen ##########################################################################
Global $aLBckbColumn2[25] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
"21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
;i a- Array + Label-LB + Checkbox-ckb
Global $aCkbColumn2[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
;i a- Array + Checkbox-ckb
For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
$aCkbColumn2[$i] = GUICtrlCreateCheckbox($aLBckbColumn2[$i], 210, 40 + $i * 19, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
; create 25x Checkbox
Next
;i#### Ende Checkboxarray #############################################################################################
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGUICtrlCreateGroup("Portable Apps ", 384, 16, 185, 500)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
;i#### Start Checkboxarray für 25 Checkboxen ##########################################################################
Global $aLBckbColumn3[25] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
"21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
;i a- Array + Label-LB + Checkbox-ckb
Global $aCkbColumn3[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
;i a- Array + Checkbox-ckb
For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
$aCkbColumn3[$i] = GUICtrlCreateCheckbox($aLBckbColumn3[$i], 400, 40 + $i * 19, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
; create 25x Checkbox
Next
;i#### Ende Checkboxarray #############################################################################################
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGlobal $bnInstall = GUICtrlCreateButton("Install", 392, 526, 83, 22)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 9, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "_start")
Global $bnExit = GUICtrlCreateButton("Exit", 480, 526, 75, 22)
GUICtrlSetFont(-1, 9, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "_close")GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]
#endregion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(100)
WEndFunc _start()
[/autoit] [autoit][/autoit] [autoit]
Local $Msg = MsgBox(32 + 4, "Installation", "Soll mit der Installation begonnen werden ?" & @TAB)
If $Msg = 7 Then
ConsoleWrite("Abbruch durch den Nutzer !" & @CRLF)
Else
_install()
EndIf
EndFunc ;==>_startFunc _install()
[/autoit] [autoit][/autoit] [autoit]
MsgBox(0, "", "Installation ...") ;i zur Prüfung der Funktion, also ein Dummy
#cs ### Variablen stimmen vorerst nicht mehr!!!
If GUICtrlRead($Checkbox1) = 1 Then
If FileExists(@ProgramFilesDir & "\VLC\vlc.exe") Then
MsgBox(48, "Fehler", "Programm VLC Media Player ist schon vorhanden." & @CR & _
"Bitte deinstalliere erst die alte Version!!", 3)
ElseIf FileExists(@ProgramFilesDir & "\VideoLAN\VLC\vlc.exe") Then
MsgBox(48, "Fehler", "Programm VLC Media Player ist schon vorhanden." & @CR & _
"Bitte deinstalliere erst die alte Version!!", 3)
Else
MsgBox(1, "Programmauswahl", "!Programm wurde zur Installationsliste hinzugefügt!", 2)
RunWait(@ScriptDir & "\Software\vlc\vlc.exe")
MsgBox(1, "Fertig", "Vlc wurde erfolgreich installiert", 2)
EndIf
If $UncheckInstalled = 1 Then GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
Sleep(1000)
EndIf
If GUICtrlRead($Checkbox5) = 1 Then
If FileExists(@ProgramFilesDir & "\unlocker\unlocker.exe") Then
MsgBox(48, "Fehler", "Programm Unlocker ist schon vorhanden." & @CR & _
"Bitte deinstalliere erst die alte Version!!", 3)
Else
MsgBox(1, "Programmauswahl", "!Programm wurde zur Installationsliste hinzugefügt!", 2)
RunWait(@ScriptDir & "\Software\unlocker\Unlocker.exe")
MsgBox(1, "Erfolg", "Unlocker wurde erfolgreich installiert", 2)
EndIf
If $UncheckInstalled = 1 Then GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
Sleep(1000)
EndIf
If GUICtrlRead($Checkbox59) = 1 Then
MsgBox(64, "Ordner erstellen", "Es wird nun ein Desktop Ordner für PortableApps erstellt", 5)
DirCreate(@DesktopDir & "\PortableApps\FirefoxPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\FirefoxPortable", @DesktopDir & "\PortableApps\FirefoxPortable", 1)
MsgBox(1, "PortableApps", "Programm FirefoxPortable wurde in den PortableApps Ordner integriert", 3)
EndIf
If GUICtrlRead($Checkbox60) = 1 Then
DirCreate(@DesktopDir & "\PortableApps\VLCPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\VLCPortable", @DesktopDir & "\PortableApps\VLCPortable", 1)
MsgBox(1, "PortableApps", "Programm Vlc Media Player Portable wurde in den PortableApps Ordner integriert", 3)
EndIf
If GUICtrlRead($Checkbox61) = 1 Then
DirCreate(@DesktopDir & "\PortableApps\TeamViewerPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\TeamViewerPortable", @DesktopDir & "\PortableApps\TeamViewerPortable", 1)
MsgBox(1, "PortableApps", "Programm TeamViewer Portable wurde in den PortableApps Ordner integriert", 3)
EndIf
If GUICtrlRead($Checkbox62) = 1 Then
DirCreate(@DesktopDir & "\PortableApps\7-ZipPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\7-ZipPortable", @DesktopDir & "\PortableApps\7-ZipPortable", 1)
MsgBox(1, "PortableApps", "Programm 7-Zip Portable wurde in den PortableApps Ordner integriert", 3)
EndIf
If GUICtrlRead($Checkbox63) = 1 Then
DirCreate(@DesktopDir & "\PortableApps\OpenOfficePortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\OpenOfficePortable", @DesktopDir & "\PortableApps\OpenOfficePortable", 1)
MsgBox(1, "PortableApps", "Programm OpenOffice Portable wurde in den PortableApps Ordner integriert", 3)
EndIf
If GUICtrlRead($Checkbox64) = 1 Then
DirCreate(@DesktopDir & "\PortableApps\ThunderbirdPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\ThunderbirdPortable", @DesktopDir & "\PortableApps\ThunderbirdPortable", 1)
MsgBox(1, "PortableApps", "Programm Thunderbird Portable wurde in den PortableApps Ordner integriert", 3)
EndIf
If GUICtrlRead($Checkbox65) = 1 Then
DirCreate(@DesktopDir & "\PortableApps\FoxitReaderPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\FoxitReaderPortable", @DesktopDir & "\PortableApps\FoxitReaderPortable", 1)
MsgBox(1, "PortableApps", "Programm FoxitReader Portable wurde in den PortableApps Ordner integriert", 3)
EndIf
If GUICtrlRead($Checkbox66) = 1 Then
DirCreate(@DesktopDir & "\PortableApps\FileZillaPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\FileZillaPortable", @DesktopDir & "\PortableApps\FileZillaPortable", 1)
MsgBox(1, "PortableApps", "Programm FileZilla Portable wurde in den PortableApps Ordner integriert", 3)
EndIf
If GUICtrlRead($Checkbox67) = 1 Then
DirCreate(@DesktopDir & "\PortableApps\SpybotPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\SpybotPortable", @DesktopDir & "\PortableApps\SpybotPortable", 1)
MsgBox(1, "PortableApps", "Programm Spybot Portable wurde in den PortableApps Ordner integriert", 3)
EndIf
#ce
MsgBox(64, "Installation", "Die Installation ist abgeschlossen !" & @TAB)
EndFunc ;==>_installFunc _close()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFunc ;==>_closeFunc Form1Maximize()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1MaximizeFunc Form1Minimize()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1MinimizeFunc Form1Restore()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1Restore; Ende
[/autoit] -
hi,
ich schau es mir mal an, inzwischen kannst Du ja mal das Neue ansehen. Ich habe auch weiter gemacht.
PS: Benutze bitte den kl. Autoit-Button, dann wird es gleich übersichtlicher.
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=DeinIcon.ico ;i#################### DeinIcon.ico #########################
#AutoIt3Wrapper_outfile=OSI.exe
#AutoIt3Wrapper_Res_Description=Osiris Software Installer
#AutoIt3Wrapper_Res_Fileversion=3.1
#AutoIt3Wrapper_Res_LegalCopyright=© 2011 by Osiris
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
#AutoIt3Wrapper_Res_Field=Compiled by|Osiris
#AutoIt3Wrapper_Res_Field=Original Name|Osiris Software Installer
#AutoIt3Wrapper_Res_Field=Build|%date%
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_Run_Tidy=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/striponly
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#region - TimeStamp
; 2011-05-12 16:35:17
#endregion - TimeStamp#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#RequireAdmin;~ $GUI_EVENT_MINIMIZE —> GUIConstantsEx.au3
[/autoit] [autoit][/autoit] [autoit]
;~ $GUI_EVENT_MAXIMIZE —> GUIConstantsEx.au3
;~ $GUI_EVENT_RESTORE —> GUIConstantsEx.au3
;~ $GUI_UNCHECKED —> GUIConstantsEx.au3Opt("GUIOnEventMode", 1) ;i Eine Gute Wahl -> mehr Macros, leichtere Fenstertechnik
[/autoit] [autoit][/autoit] [autoit]#region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
GUICreate("Software Installer v3.1", 590, 530)
GUISetBkColor(0x008080)
GUISetOnEvent($GUI_EVENT_CLOSE, "_close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")GUICtrlCreateGroup("Silent Install", 16, 16, 185, 500)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
;i#### Start Checkboxarray für 25 Checkboxen ##########################################################################
Global $aLBckb[25] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
"21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
;i a- Array + Label-LB + Checkbox-ckb
Global $aCkb[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
;i a- Array + Checkbox-ckb
For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
$aCkb[$i] = GUICtrlCreateCheckbox($aLBckb[$i], 24, 40 + $i * 19, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
; create 25x Checkbox
Next
;i#### Ende Checkboxarray #############################################################################################
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGUICtrlCreateGroup("User default", 200, 16, 185, 497)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
; [...]
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGUICtrlCreateGroup("Portable Apps ", 384, 16, 185, 497)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
; [...]
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGlobal $bnInstall = GUICtrlCreateButton("Install", 392, 480, 83, 22)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 9, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "_start")
Global $bnExit = GUICtrlCreateButton("Exit", 480, 480, 75, 22)
GUICtrlSetFont(-1, 9, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "_close")GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]
#endregion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(100)
WEndFunc _start()
[/autoit] [autoit][/autoit] [autoit]
Local $Msg = MsgBox(32 + 4, "Installation", "Soll mit der Installation begonnen werden ?" & @TAB)
If $Msg = 7 Then
ConsoleWrite("Abbruch durch den Nutzer !" & @CRLF)
Else
_install()
EndIf
EndFunc ;==>_startFunc _install()
[/autoit] [autoit][/autoit] [autoit]
MsgBox(0, "", "Installation ...") ;i zur Prüfung der Funktion, also ein Dummy
#cs ### Variablen stimmen vorerst nicht mehr!!!
If GUICtrlRead($Checkbox1) = 1 Then
If FileExists(@ProgramFilesDir & "\VLC\vlc.exe") Then
MsgBox(48, "Fehler", "Programm VLC Media Player ist schon vorhanden." & @CR & _
"Bitte deinstalliere erst die alte Version!!", 3)
ElseIf FileExists(@ProgramFilesDir & "\VideoLAN\VLC\vlc.exe") Then
MsgBox(48, "Fehler", "Programm VLC Media Player ist schon vorhanden." & @CR & _
"Bitte deinstalliere erst die alte Version!!", 3)
Else
MsgBox(1, "Programmauswahl", "!Programm wurde zur Installationsliste hinzugefügt!", 2)
RunWait(@ScriptDir & "\Software\vlc\vlc.exe")
MsgBox(1, "Fertig", "Vlc wurde erfolgreich installiert", 2)
EndIf
If $UncheckInstalled = 1 Then GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
Sleep(1000)
EndIfIf GUICtrlRead($Checkbox5) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
If FileExists(@ProgramFilesDir & "\unlocker\unlocker.exe") Then
MsgBox(48, "Fehler", "Programm Unlocker ist schon vorhanden." & @CR & _
"Bitte deinstalliere erst die alte Version!!", 3)
Else
MsgBox(1, "Programmauswahl", "!Programm wurde zur Installationsliste hinzugefügt!", 2)
RunWait(@ScriptDir & "\Software\unlocker\Unlocker.exe")
MsgBox(1, "Erfolg", "Unlocker wurde erfolgreich installiert", 2)
EndIf
If $UncheckInstalled = 1 Then GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
Sleep(1000)
EndIfIf GUICtrlRead($Checkbox59) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
MsgBox(64, "Ordner erstellen", "Es wird nun ein Desktop Ordner für PortableApps erstellt", 5)
DirCreate(@DesktopDir & "\PortableApps\FirefoxPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\FirefoxPortable", @DesktopDir & "\PortableApps\FirefoxPortable", 1)
MsgBox(1, "PortableApps", "Programm FirefoxPortable wurde in den PortableApps Ordner integriert", 3)
EndIf
If GUICtrlRead($Checkbox60) = 1 Then
DirCreate(@DesktopDir & "\PortableApps\VLCPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\VLCPortable", @DesktopDir & "\PortableApps\VLCPortable", 1)
MsgBox(1, "PortableApps", "Programm Vlc Media Player Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox61) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\TeamViewerPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\TeamViewerPortable", @DesktopDir & "\PortableApps\TeamViewerPortable", 1)
MsgBox(1, "PortableApps", "Programm TeamViewer Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox62) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\7-ZipPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\7-ZipPortable", @DesktopDir & "\PortableApps\7-ZipPortable", 1)
MsgBox(1, "PortableApps", "Programm 7-Zip Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox63) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\OpenOfficePortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\OpenOfficePortable", @DesktopDir & "\PortableApps\OpenOfficePortable", 1)
MsgBox(1, "PortableApps", "Programm OpenOffice Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox64) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\ThunderbirdPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\ThunderbirdPortable", @DesktopDir & "\PortableApps\ThunderbirdPortable", 1)
MsgBox(1, "PortableApps", "Programm Thunderbird Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox65) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\FoxitReaderPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\FoxitReaderPortable", @DesktopDir & "\PortableApps\FoxitReaderPortable", 1)
MsgBox(1, "PortableApps", "Programm FoxitReader Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox66) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\FileZillaPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\FileZillaPortable", @DesktopDir & "\PortableApps\FileZillaPortable", 1)
MsgBox(1, "PortableApps", "Programm FileZilla Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox67) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\SpybotPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\SpybotPortable", @DesktopDir & "\PortableApps\SpybotPortable", 1)
MsgBox(1, "PortableApps", "Programm Spybot Portable wurde in den PortableApps Ordner integriert", 3)
EndIf
#ce
MsgBox(64, "Installation", "Die Installation ist abgeschlossen !" & @TAB)
EndFunc ;==>_installFunc _close()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFunc ;==>_closeFunc Form1Maximize()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1MaximizeFunc Form1Minimize()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1MinimizeFunc Form1Restore()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1Restore; Ende
[/autoit] -
hi,
hab doch noch einmal Anpassungen vorgenommen, aber nun solltest Du zurecht kommen.
Eine Vorlage und zweimal Übungen.
-
... vielleicht kannst Du ja hier weiter machen:
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=DeinIcon.ico ;i#################### DeinIcon.ico #########################
#AutoIt3Wrapper_outfile=OSI.exe
#AutoIt3Wrapper_Res_Description=Osiris Software Installer
#AutoIt3Wrapper_Res_Fileversion=3.1
#AutoIt3Wrapper_Res_LegalCopyright=© 2011 by Osiris
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
#AutoIt3Wrapper_Res_Field=Compiled by|Osiris
#AutoIt3Wrapper_Res_Field=Original Name|Osiris Software Installer
#AutoIt3Wrapper_Res_Field=Build|%date%
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_Run_Tidy=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/striponly
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#region - TimeStamp
; 2011-05-12 14:48:17
#endregion - TimeStamp#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#RequireAdmin;~ $GUI_EVENT_MINIMIZE —> GUIConstantsEx.au3
[/autoit] [autoit][/autoit] [autoit]
;~ $GUI_EVENT_MAXIMIZE —> GUIConstantsEx.au3
;~ $GUI_EVENT_RESTORE —> GUIConstantsEx.au3
;~ $GUI_UNCHECKED —> GUIConstantsEx.au3Opt("GUIOnEventMode", 1) ;i Eine Gute Wahl -> mehr Macros, leichtere Fenstertechnik
[/autoit] [autoit][/autoit] [autoit]#region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
GUICreate("Software Installer v3.1", 590, 530)
GUISetBkColor(0x008080)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")GUICtrlCreateGroup("Silent Install", 16, 16, 185, 500)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
;i#### Start Checkboxarray für 25 Checkboxen ##########################################################################
Global $aLBckb[25] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
"21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
;i a- Array + Label-LB + Checkbox-ckb
Global $aCkb[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
;i a- Array + Checkbox-ckb
For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
$aCkb[$i] = GUICtrlCreateCheckbox($aLBckb[$i], 24, 40 + $i * 19, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
; create 25x Checkbox
Next
;i#### Ende Checkboxarray #############################################################################################
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGUICtrlCreateGroup("User default", 200, 16, 185, 497)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
; [...]
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGUICtrlCreateGroup("Portable Apps ", 384, 16, 185, 497)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
; [...]
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessenGlobal $bnInstall = GUICtrlCreateButton("Install", 392, 480, 83, 22)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 9, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Button5Click")
Global $bnExit = GUICtrlCreateButton("Exit", 480, 480, 75, 22)
GUICtrlSetFont(-1, 9, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Form1Close");$UncheckInstalled = 1
[/autoit] [autoit][/autoit] [autoit]
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(100)
WEndFunc Button5Click()
[/autoit] [autoit][/autoit] [autoit]
If MsgBox(32 + 4, "Installation", "Soll mit der Installation begonnen werden ?" & @TAB) = 7 Then ConsoleWrite("Abbruch!" & @CRLF)Sleep(1000)
[/autoit] [autoit][/autoit] [autoit]
#cs ### Variablen stimmen vorerst nicht mehr!!!
If GUICtrlRead($Checkbox1) = 1 Then
If FileExists(@ProgramFilesDir & "\VLC\vlc.exe") Then
MsgBox(48, "Fehler", "Programm VLC Media Player ist schon vorhanden." & @CR & _
"Bitte deinstalliere erst die alte Version!!", 3)
ElseIf FileExists(@ProgramFilesDir & "\VideoLAN\VLC\vlc.exe") Then
MsgBox(48, "Fehler", "Programm VLC Media Player ist schon vorhanden." & @CR & _
"Bitte deinstalliere erst die alte Version!!", 3)
Else
MsgBox(1, "Programmauswahl", "!Programm wurde zur Installationsliste hinzugefügt!", 2)
RunWait(@ScriptDir & "\Software\vlc\vlc.exe")
MsgBox(1, "Fertig", "Vlc wurde erfolgreich installiert", 2)
EndIf
If $UncheckInstalled = 1 Then GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
Sleep(1000)
EndIfIf GUICtrlRead($Checkbox5) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
If FileExists(@ProgramFilesDir & "\unlocker\unlocker.exe") Then
MsgBox(48, "Fehler", "Programm Unlocker ist schon vorhanden." & @CR & _
"Bitte deinstalliere erst die alte Version!!", 3)
Else
MsgBox(1, "Programmauswahl", "!Programm wurde zur Installationsliste hinzugefügt!", 2)
RunWait(@ScriptDir & "\Software\unlocker\Unlocker.exe")
MsgBox(1, "Erfolg", "Unlocker wurde erfolgreich installiert", 2)
EndIf
If $UncheckInstalled = 1 Then GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
Sleep(1000)
EndIfIf GUICtrlRead($Checkbox59) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
MsgBox(64, "Ordner erstellen", "Es wird nun ein Desktop Ordner für PortableApps erstellt", 5)
DirCreate(@DesktopDir & "\PortableApps\FirefoxPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\FirefoxPortable", @DesktopDir & "\PortableApps\FirefoxPortable", 1)
MsgBox(1, "PortableApps", "Programm FirefoxPortable wurde in den PortableApps Ordner integriert", 3)
EndIf
If GUICtrlRead($Checkbox60) = 1 Then
DirCreate(@DesktopDir & "\PortableApps\VLCPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\VLCPortable", @DesktopDir & "\PortableApps\VLCPortable", 1)
MsgBox(1, "PortableApps", "Programm Vlc Media Player Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox61) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\TeamViewerPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\TeamViewerPortable", @DesktopDir & "\PortableApps\TeamViewerPortable", 1)
MsgBox(1, "PortableApps", "Programm TeamViewer Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox62) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\7-ZipPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\7-ZipPortable", @DesktopDir & "\PortableApps\7-ZipPortable", 1)
MsgBox(1, "PortableApps", "Programm 7-Zip Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox63) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\OpenOfficePortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\OpenOfficePortable", @DesktopDir & "\PortableApps\OpenOfficePortable", 1)
MsgBox(1, "PortableApps", "Programm OpenOffice Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox64) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\ThunderbirdPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\ThunderbirdPortable", @DesktopDir & "\PortableApps\ThunderbirdPortable", 1)
MsgBox(1, "PortableApps", "Programm Thunderbird Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox65) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\FoxitReaderPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\FoxitReaderPortable", @DesktopDir & "\PortableApps\FoxitReaderPortable", 1)
MsgBox(1, "PortableApps", "Programm FoxitReader Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox66) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\FileZillaPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\FileZillaPortable", @DesktopDir & "\PortableApps\FileZillaPortable", 1)
MsgBox(1, "PortableApps", "Programm FileZilla Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox67) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\SpybotPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\SpybotPortable", @DesktopDir & "\PortableApps\SpybotPortable", 1)
MsgBox(1, "PortableApps", "Programm Spybot Portable wurde in den PortableApps Ordner integriert", 3)
EndIf
#ce
EndFunc ;==>Button5ClickFunc Button6Click()
[/autoit] [autoit][/autoit] [autoit]
Local $Msg = MsgBox(32, "Verlassen", "Wollen Sie den Installer nun verlassen?" & @TAB)
If $Msg = 7 Then
ConsoleWrite("Abbruch!" & @CRLF)
Else
; [...]
EndIf
EndFunc ;==>Button6ClickFunc Form1Close()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFunc ;==>Form1CloseFunc Form1Maximize()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1MaximizeFunc Form1Minimize()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1MinimizeFunc Form1Restore()
[/autoit] [autoit][/autoit] [autoit]
; [...]
EndFunc ;==>Form1Restore; Ende
[/autoit]
...
-
Hi,
soweit erst einmal zur Info. Du kannst die Vorlage jetzt gut verwenden um die Controls (Checkboxen) mit Array´s zu erstellen (jeweils 25 in einer Gruppe).
-
Hi Osiris,
hier mal ein paar Hinweise:
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=DeinIcon.ico ;i#################### DeinIcon.ico #########################
#AutoIt3Wrapper_outfile=OSI.exe
#AutoIt3Wrapper_Res_Description=Osiris Software Installer
#AutoIt3Wrapper_Res_Fileversion=3.1
#AutoIt3Wrapper_Res_LegalCopyright=© 2011 by Osiris
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
#AutoIt3Wrapper_Res_Field=Compiled by|Osiris
#AutoIt3Wrapper_Res_Field=Original Name|Osiris Software Installer
#AutoIt3Wrapper_Res_Field=Build|%date%
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_Run_Tidy=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/striponly
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#region - TimeStamp
; 2011-05-12 12:22:18
#endregion - TimeStamp#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#RequireAdmin;~ $GUI_EVENT_MINIMIZE —> GUIConstantsEx.au3
[/autoit] [autoit][/autoit] [autoit]
;~ $GUI_EVENT_MAXIMIZE —> GUIConstantsEx.au3
;~ $GUI_EVENT_RESTORE —> GUIConstantsEx.au3
;~ $GUI_UNCHECKED —> GUIConstantsEx.au3
;~ $WS_GROUP —> WindowsConstants.au3 ;! Wozu ist $WS_GROUP hier nötig?Opt("GUIOnEventMode", 1) ;i Eine Gute Wahl
[/autoit] [autoit][/autoit] [autoit]#region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
GUICreate("Software Installer v3.1", 590, 530)
;i GUISetIcon("Icons\My Computer.ico") ;i siehe Zeile zwei - DeinIcon.ico -GUISetBkColor(0x008080)
[/autoit] [autoit][/autoit] [autoit]
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")GUICtrlCreateGroup("Silent Install", 16, 16, 185, 497)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
$Checkbox1 = GUICtrlCreateCheckbox("Vlc Media Player", 24, 40, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox1Click")
$Checkbox3 = GUICtrlCreateCheckbox("Xp AntiSpy", 24, 488, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox3Click")
$Checkbox5 = GUICtrlCreateCheckbox("Unlocker", 24, 56, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox5Click")
$Checkbox6 = GUICtrlCreateCheckbox("Checkbox6", 24, 72, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox6Click")
$Checkbox7 = GUICtrlCreateCheckbox("Checkbox7", 24, 88, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox7Click")
$Checkbox8 = GUICtrlCreateCheckbox("Checkbox8", 24, 104, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox8Click")
$Checkbox9 = GUICtrlCreateCheckbox("Checkbox9", 24, 120, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox9Click")
$Checkbox10 = GUICtrlCreateCheckbox("Checkbox10", 24, 136, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox10Click")
$Checkbox11 = GUICtrlCreateCheckbox("Checkbox11", 24, 152, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox11Click")
$Checkbox12 = GUICtrlCreateCheckbox("Checkbox12", 24, 168, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox12Click")
$Checkbox13 = GUICtrlCreateCheckbox("Checkbox13", 24, 184, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox13Click")
$Checkbox14 = GUICtrlCreateCheckbox("Checkbox14", 24, 200, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox14Click")
$Checkbox15 = GUICtrlCreateCheckbox("Checkbox15", 24, 216, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox15Click")
$Checkbox16 = GUICtrlCreateCheckbox("Checkbox16", 24, 232, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox16Click")
$Checkbox17 = GUICtrlCreateCheckbox("Checkbox17", 24, 248, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox17Click")
$Checkbox18 = GUICtrlCreateCheckbox("Checkbox18", 24, 264, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox18Click")
$Checkbox19 = GUICtrlCreateCheckbox("Checkbox19", 24, 280, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox19Click")
$Checkbox20 = GUICtrlCreateCheckbox("Checkbox20", 24, 296, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox20Click")
$Checkbox21 = GUICtrlCreateCheckbox("Checkbox21", 24, 312, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox21Click")
$Checkbox22 = GUICtrlCreateCheckbox("Checkbox22", 24, 328, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox22Click")
$Checkbox23 = GUICtrlCreateCheckbox("Checkbox23", 24, 344, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox23Click")
$Checkbox24 = GUICtrlCreateCheckbox("Checkbox24", 24, 360, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox24Click")
$Checkbox25 = GUICtrlCreateCheckbox("Checkbox25", 24, 376, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox25Click")
$Checkbox26 = GUICtrlCreateCheckbox("Checkbox26", 24, 392, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox26Click")
$Checkbox27 = GUICtrlCreateCheckbox("Checkbox27", 24, 408, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox27Click")
$Checkbox28 = GUICtrlCreateCheckbox("Checkbox28", 24, 424, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox28Click")
$Checkbox29 = GUICtrlCreateCheckbox("Checkbox29", 24, 440, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox29Click")
$Checkbox30 = GUICtrlCreateCheckbox("Checkbox30", 24, 456, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox30Click")
$Checkbox31 = GUICtrlCreateCheckbox("Checkbox31", 24, 472, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox31Click")
GUICtrlCreateGroup("", -99, -99, 1, 1)GUICtrlCreateGroup("User default", 200, 16, 185, 497)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
$Checkbox2 = GUICtrlCreateCheckbox("Vlc Media Player", 208, 40, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox2Click")
$Checkbox4 = GUICtrlCreateCheckbox("Xp AntiSpy", 208, 488, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox4Click")
$Checkbox32 = GUICtrlCreateCheckbox("Checkbox32", 208, 56, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox32Click")
$Checkbox33 = GUICtrlCreateCheckbox("Checkbox33", 208, 72, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox33Click")
$Checkbox34 = GUICtrlCreateCheckbox("Checkbox34", 208, 88, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox34Click")
$Checkbox35 = GUICtrlCreateCheckbox("Checkbox35", 208, 104, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox35Click")
$Checkbox36 = GUICtrlCreateCheckbox("Checkbox36", 208, 120, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox36Click")
$Checkbox37 = GUICtrlCreateCheckbox("Checkbox37", 208, 136, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox37Click")
$Checkbox38 = GUICtrlCreateCheckbox("Checkbox38", 208, 152, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox38Click")
$Checkbox39 = GUICtrlCreateCheckbox("Checkbox39", 208, 168, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox39Click")
$Checkbox40 = GUICtrlCreateCheckbox("Checkbox40", 208, 184, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox40Click")
$Checkbox41 = GUICtrlCreateCheckbox("Checkbox41", 208, 200, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox41Click")
$Checkbox42 = GUICtrlCreateCheckbox("Checkbox42", 208, 216, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox42Click")
$Checkbox43 = GUICtrlCreateCheckbox("Checkbox43", 208, 232, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox43Click")
$Checkbox44 = GUICtrlCreateCheckbox("Checkbox44", 208, 248, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox44Click")
$Checkbox45 = GUICtrlCreateCheckbox("Checkbox45", 208, 264, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox45Click")
$Checkbox46 = GUICtrlCreateCheckbox("Checkbox46", 208, 280, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox46Click")
$Checkbox47 = GUICtrlCreateCheckbox("Checkbox47", 208, 296, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox47Click")
$Checkbox48 = GUICtrlCreateCheckbox("Checkbox48", 208, 312, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox48Click")
$Checkbox49 = GUICtrlCreateCheckbox("Checkbox49", 208, 328, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox49Click")
$Checkbox50 = GUICtrlCreateCheckbox("Checkbox50", 208, 344, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox50Click")
$Checkbox51 = GUICtrlCreateCheckbox("Checkbox51", 208, 360, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox51Click")
$Checkbox52 = GUICtrlCreateCheckbox("Checkbox52", 208, 376, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox52Click")
$Checkbox53 = GUICtrlCreateCheckbox("Checkbox53", 208, 392, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox53Click")
$Checkbox54 = GUICtrlCreateCheckbox("Checkbox54", 208, 408, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox54Click")
$Checkbox55 = GUICtrlCreateCheckbox("Checkbox55", 208, 424, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox55Click")
$Checkbox56 = GUICtrlCreateCheckbox("Checkbox56", 208, 440, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox56Click")
$Checkbox57 = GUICtrlCreateCheckbox("Checkbox57", 208, 456, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox57Click")
$Checkbox58 = GUICtrlCreateCheckbox("Checkbox58", 208, 472, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox58Click")
GUICtrlCreateGroup("", -99, -99, 1, 1)GUICtrlCreateGroup("Portable Apps ", 384, 16, 185, 497)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 400, 0, "Old English Text MT")
$Checkbox59 = GUICtrlCreateCheckbox("Firefox Portable 4", 392, 40, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox59Click")
$Checkbox60 = GUICtrlCreateCheckbox("VLC Media Player Portable", 392, 56, 163, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox60Click")
$Checkbox61 = GUICtrlCreateCheckbox("TeamViewer 6 Portable", 392, 72, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox61Click")
$Checkbox62 = GUICtrlCreateCheckbox("7-Zip Portable", 392, 88, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox62Click")
$Checkbox63 = GUICtrlCreateCheckbox("OpenOffice Portable", 392, 104, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox63Click")
$Checkbox64 = GUICtrlCreateCheckbox("Thunderbird Portable", 392, 120, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox64Click")
$Checkbox65 = GUICtrlCreateCheckbox("FoxitReader Portable", 392, 136, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox65Click")
$Checkbox66 = GUICtrlCreateCheckbox("FileZilla Portable", 392, 152, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox66Click")
$Checkbox67 = GUICtrlCreateCheckbox("Spybot Portable", 392, 168, 153, 17)
GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Checkbox67Click")
;$Checkbox68 = GUICtrlCreateCheckbox("Checkbox68", 392, 184, 153, 17)
;GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
;GUICtrlSetOnEvent(-1, "Checkbox68Click")
;$Checkbox69 = GUICtrlCreateCheckbox("Checkbox69", 392, 200, 153, 17)
;GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
;GUICtrlSetOnEvent(-1, "Checkbox69Click")
;$Checkbox70 = GUICtrlCreateCheckbox("Checkbox70", 392, 216, 153, 17)
;GUICtrlSetFont(-1, 10, 400, 0, "Myriad Web Pro")
;GUICtrlSetOnEvent(-1, "Checkbox70Click")
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessen, hat gefehlt !!$bnInstall = GUICtrlCreateButton("Install", 392, 480, 83, 22) ;i zu viele Worte für die ButtonBreite
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 9, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Button5Click")
$bnExit = GUICtrlCreateButton("Exit", 480, 480, 75, 22)
GUICtrlSetFont(-1, 9, 400, 0, "Myriad Web Pro")
GUICtrlSetOnEvent(-1, "Form1Close") ;i verwechselt mit Button5Click$UncheckInstalled = 1
[/autoit] [autoit][/autoit] [autoit]
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(100)
WEndFunc Button5Click()
[/autoit] [autoit][/autoit] [autoit]
If MsgBox(32 + 4, "Installation", "Soll mit der Installation begonnen werden ?" & @TAB) = 7 Then ConsoleWrite("Abbruch!" & @CRLF)Sleep(1000)
[/autoit] [autoit][/autoit] [autoit]
If GUICtrlRead($Checkbox1) = 1 Then
If FileExists(@ProgramFilesDir & "\VLC\vlc.exe") Then
MsgBox(48, "Fehler", "Programm VLC Media Player ist schon vorhanden." & @CR & _
"Bitte deinstalliere erst die alte Version!!", 3)
ElseIf FileExists(@ProgramFilesDir & "\VideoLAN\VLC\vlc.exe") Then
MsgBox(48, "Fehler", "Programm VLC Media Player ist schon vorhanden." & @CR & _
"Bitte deinstalliere erst die alte Version!!", 3)
Else
MsgBox(1, "Programmauswahl", "!Programm wurde zur Installationsliste hinzugefügt!", 2)
RunWait(@ScriptDir & "\Software\vlc\vlc.exe")
MsgBox(1, "Fertig", "Vlc wurde erfolgreich installiert", 2)
EndIf
If $UncheckInstalled = 1 Then GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
Sleep(1000)
EndIfIf GUICtrlRead($Checkbox5) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
If FileExists(@ProgramFilesDir & "\unlocker\unlocker.exe") Then
MsgBox(48, "Fehler", "Programm Unlocker ist schon vorhanden." & @CR & _
"Bitte deinstalliere erst die alte Version!!", 3)
Else
MsgBox(1, "Programmauswahl", "!Programm wurde zur Installationsliste hinzugefügt!", 2)
RunWait(@ScriptDir & "\Software\unlocker\Unlocker.exe")
MsgBox(1, "Erfolg", "Unlocker wurde erfolgreich installiert", 2)
EndIf
If $UncheckInstalled = 1 Then GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
Sleep(1000)
EndIfIf GUICtrlRead($Checkbox59) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
MsgBox(64, "Ordner erstellen", "Es wird nun ein Desktop Ordner für PortableApps erstellt", 5)
DirCreate(@DesktopDir & "\PortableApps\FirefoxPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\FirefoxPortable", @DesktopDir & "\PortableApps\FirefoxPortable", 1)
MsgBox(1, "PortableApps", "Programm FirefoxPortable wurde in den PortableApps Ordner integriert", 3)
EndIf
If GUICtrlRead($Checkbox60) = 1 Then
DirCreate(@DesktopDir & "\PortableApps\VLCPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\VLCPortable", @DesktopDir & "\PortableApps\VLCPortable", 1)
MsgBox(1, "PortableApps", "Programm Vlc Media Player Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox61) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\TeamViewerPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\TeamViewerPortable", @DesktopDir & "\PortableApps\TeamViewerPortable", 1)
MsgBox(1, "PortableApps", "Programm TeamViewer Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox62) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\7-ZipPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\7-ZipPortable", @DesktopDir & "\PortableApps\7-ZipPortable", 1)
MsgBox(1, "PortableApps", "Programm 7-Zip Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox63) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\OpenOfficePortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\OpenOfficePortable", @DesktopDir & "\PortableApps\OpenOfficePortable", 1)
MsgBox(1, "PortableApps", "Programm OpenOffice Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox64) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\ThunderbirdPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\ThunderbirdPortable", @DesktopDir & "\PortableApps\ThunderbirdPortable", 1)
MsgBox(1, "PortableApps", "Programm Thunderbird Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox65) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\FoxitReaderPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\FoxitReaderPortable", @DesktopDir & "\PortableApps\FoxitReaderPortable", 1)
MsgBox(1, "PortableApps", "Programm FoxitReader Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox66) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\FileZillaPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\FileZillaPortable", @DesktopDir & "\PortableApps\FileZillaPortable", 1)
MsgBox(1, "PortableApps", "Programm FileZilla Portable wurde in den PortableApps Ordner integriert", 3)
EndIfIf GUICtrlRead($Checkbox67) = 1 Then
[/autoit] [autoit][/autoit] [autoit]
DirCreate(@DesktopDir & "\PortableApps\SpybotPortable\")
Sleep(500)
DirCopy(@ScriptDir & "\PortableApps\SpybotPortable", @DesktopDir & "\PortableApps\SpybotPortable", 1)
MsgBox(1, "PortableApps", "Programm Spybot Portable wurde in den PortableApps Ordner integriert", 3)
EndIf
EndFunc ;==>Button5ClickFunc Button6Click()
[/autoit] [autoit][/autoit] [autoit]
$Msg = MsgBox(32, "Verlassen", "Wollen Sie den Installer nun verlassen?" & @TAB)
If $Msg = 7 Then
ConsoleWrite("Abbruch!" & @CRLF)
Else
; [...]
EndIf
EndFunc ;==>Button6ClickFunc Form1Close()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFunc ;==>Form1Close#cs
[/autoit] [autoit][/autoit] [autoit]
Func Form1Maximize()
;### ???
EndFunc ;==>Form1MaximizeFunc Form1Minimize()
[/autoit] [autoit][/autoit] [autoit]
;### ???
EndFunc ;==>Form1MinimizeFunc Form1Restore()
[/autoit] [autoit][/autoit] [autoit]
;### ???
EndFunc ;==>Form1Restore
#ce; Ende
[/autoit] -
Weitere Kommentare, Meinungen, Hinweise oder Hilfestellungen ?
-
Hi, so vielleicht?
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#include <ButtonConstants.au3>Opt('MustDeclareVars', 1)
[/autoit] [autoit][/autoit] [autoit]Example()
[/autoit] [autoit][/autoit] [autoit]Func Example()
[/autoit] [autoit][/autoit] [autoit]
Local $checkCN, $msgLocal $hGUI = GUICreate("My GUI Checkbox") ; will create a dialog box that when displayed is centered
[/autoit] [autoit][/autoit] [autoit]
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)
$checkCN = GUICtrlCreateCheckbox("CheckBox 1", 20, 20, 120, 30, BitOR($BS_PUSHLIKE, $BS_AUTOCHECKBOX))
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 7)Local $btnState = GUICtrlCreateButton("Get State", 20, 120, 120, 30)
[/autoit] [autoit][/autoit] [autoit]GUISetState() ; will display an dialog box with 1 checkbox
[/autoit] [autoit][/autoit] [autoit]; Run the GUI until the dialog is closed
[/autoit] [autoit][/autoit] [autoit][/autoit]
While 1
Switch GUIGetMsg()
Case -3
Exit
Case $checkCN
If BitAND(GUICtrlRead($checkCN), 1) Then
WinSetTitle($hGUI, "", "My GUI Checkbox - checked")
Else
WinSetTitle($hGUI, "", "My GUI Checkbox - unchecked")
EndIf
Case $btnState
If BitAND(GUICtrlRead($checkCN), 1) Then
MsgBox(0, '', "Button - checked")
Else
MsgBox(0, '', "Button - unchecked")
EndIf
EndSwitch
WEnd
EndFunc ;==>Example -
Hi,
Ja habe ich und sorry hab mich verlesen!
Hier der Link: http://www.piriform.com/ccleaner -
Hi,
Du musst Dir erst die Kommandozeilen-Befehle von Pitform hohlen. -
Hi,
hier einmal mein Checkbox-Tut:
[autoit]
[/autoit][autoit][/autoit][autoit]
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>$Form1_1 = GUICreate("Big Checkbox", 210, 210, 300, 233)
[/autoit][autoit][/autoit][autoit]
;i normale Checkbox
$Checkbox0 = GUICtrlCreateCheckbox("Checkbox basic", 30, 10, 150, 35)
;i Checkbox color
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox color", 30, 50, 150, 35)
GUICtrlSetColor(-1, 0xFF0000) ;i rot
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 7)
;i große Checkbox Schriftart und Größe anders
$Checkbox2 = GUICtrlCreateCheckbox("Checkbox", 30, 90, 150, 35, BitOR($BS_CHECKBOX,$BS_AUTOCHECKBOX,$BS_PUSHLIKE,$WS_TABSTOP))
GUICtrlSetFont(-1, 12, 400, 0, "Wingdings")
;i große Checkbox ALS Icon
$Checkbox3 = GUICtrlCreateCheckbox("&s", 30, 130, 150, 35, BitOR($BS_ICON, $BS_PUSHLIKE))
GUICtrlSetImage(-1, "shell32.dll", 7)
;i große Checkbox mit Icon
$Checkbox4 = GUICtrlCreateCheckbox("button", 30, 170, 180, 35, $BS_ICON)
GUICtrlSetImage(-1, "shell32.dll", 22)GUISetState(@SW_SHOW)
[/autoit][autoit][/autoit][autoit]While 1
[/autoit][autoit][/autoit][autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd;i ENDE
[/autoit] -
Hallo DFPWare!
Dieses Beginner-Tut soll dabei helfen, den Einstieg in AutoIt zu erleichtern. Sicherlich ist es der Einfachste, eindringlichste Weg zu einem Taschenrechner und es kommt bei der Vielzahl an Rechnern zu Ähnlichkeiten. Entscheidend sind hier aber die Unterschiede. Meine Bitte an Dich DFPWare: „Auf beide Scripte einmal den Obfuscator (/striponly) anwenden und erneut vergleichen. Du wirst überrascht sein!“

-
Das Programm namens „TRechner-Demo“ stellt einen sehr einfachen Taschenrechner mit den vier
Grundrechenarten zur Verfügung. Der Rechner ist vom inneren Aufbau her bewusst einfach gestaltet.
Er besteht im Wesentlichen aus einem Hauptfenster. Includes werden keine benötigt. TRechner-Demo
ist weder fertig, noch vollständig, er ist ein erster Anhaltspunkt und soll zu Veränderung,
Verbesserung und zur Anpassung an Deine Anforderungen dienen !Viel Spaß mit TRechner-Demo !
TRechner-Demo
[autoit]
[/autoit] [autoit][/autoit] [autoit]
; TRechner - Demo by RR04
$GUI = GUICreate("TRechner - Demo", 320, 200)
$input = GUICtrlCreateInput("", 10, 10, 300, 20)
$bnPlus = GUICtrlCreateButton("+", 10, 40, 75, 30)
$bnMinus = GUICtrlCreateButton("-", 85, 40, 75, 30)
$bnDiv = GUICtrlCreateButton("/", 160, 40, 75, 30)
$bnMulti = GUICtrlCreateButton("*", 235, 40, 75, 30)
$bn7 = GUICtrlCreateButton("7", 10, 70, 75, 30)
$bn8 = GUICtrlCreateButton("8", 85, 70, 75, 30)
$bn9 = GUICtrlCreateButton("9", 160, 70, 75, 30)
$bnC = GUICtrlCreateButton("C", 235, 70, 75, 60)
$bn4 = GUICtrlCreateButton("4", 10, 100, 75, 30)
$bn5 = GUICtrlCreateButton("5", 85, 100, 75, 30)
$bn6 = GUICtrlCreateButton("6", 160, 100, 75, 30)
$bn1 = GUICtrlCreateButton("1", 10, 130, 75, 30)
$bn2 = GUICtrlCreateButton("2", 85, 130, 75, 30)
$bn3 = GUICtrlCreateButton("3", 160, 130, 75, 30)
$bnResultat = GUICtrlCreateButton("=", 235, 130, 75, 60)
$bn0 = GUICtrlCreateButton("0", 10, 160, 150, 30)
$bnKoma = GUICtrlCreateButton(".", 160, 160, 75, 30)GUISetState()
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]
Switch GUIGetMsg()
Case -3
MsgBox(64, "TRechner - Demo", "Viel Spaß wünscht RR04 !" & @TAB, 3)
Exit
Case $bnC
GUICtrlSetData($input, "")
Case $bn1
GUICtrlSetData($input, GUICtrlRead($input) & "1")
Case $bn2
GUICtrlSetData($input, GUICtrlRead($input) & "2")
Case $bn3
GUICtrlSetData($input, GUICtrlRead($input) & "3")
Case $bn4
GUICtrlSetData($input, GUICtrlRead($input) & "4")
Case $bn5
GUICtrlSetData($input, GUICtrlRead($input) & "5")
Case $bn6
GUICtrlSetData($input, GUICtrlRead($input) & "6")
Case $bn7
GUICtrlSetData($input, GUICtrlRead($input) & "7")
Case $bn8
GUICtrlSetData($input, GUICtrlRead($input) & "8")
Case $bn9
GUICtrlSetData($input, GUICtrlRead($input) & "9")
Case $bnPlus
GUICtrlSetData($input, GUICtrlRead($input) & "+")
Case $bnMinus
GUICtrlSetData($input, GUICtrlRead($input) & "-")
Case $bnDiv
GUICtrlSetData($input, GUICtrlRead($input) & "/")
Case $bnMulti
GUICtrlSetData($input, GUICtrlRead($input) & "*")
Case $bn0
GUICtrlSetData($input, GUICtrlRead($input) & "0")
Case $bnKoma
GUICtrlSetData($input, GUICtrlRead($input) & ".")
Case $bnResultat
If GUICtrlRead($input) = "" Then
MsgBox(64, "Fehler", "Bitte machen Sie erst Ihre Eingaben !" & @TAB)
Else
GUICtrlSetData($input, Execute(GUICtrlRead($input)))
EndIf
EndSwitch
WEnd; Ende
[/autoit]