Ah, das X in der Titelleiste meint Ihr!
Sorry, weil ja unten Controls kamen. ![]()
Ah, das X in der Titelleiste meint Ihr!
Sorry, weil ja unten Controls kamen. ![]()
Hi,
schau Dir mal
GUICtrlSetState(-1, $GUI_DISABLE) ;i bzw. $GUI_ENABLE
genauer an. ![]()
Hi,
Deine Software liegt im Ordner: "S:\Betriebssysteme\Auto Install Software\Scripts\"! Warum liest Du den Ordner nicht aus und erstellst die Controls dynamisch? ![]()
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#RequireAdmin
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1) ;i Eine Gute Wahl -> mehr Macros, leichtere Fenstertechnik
[/autoit] [autoit][/autoit] [autoit]#region ### START Koda GUI section ###
GUICreate("Software Installer", 896, 560)
GUISetOnEvent($GUI_EVENT_CLOSE, "_ende")
GUICtrlCreateGroup("", 170, 31, 185, 485)
GUICtrlCreateLabel("Silent Install", 182, 16, 185, 17)
;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], $aLBColumn1[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], 178, 40 + $i * 19, 13, 13)
$aLBColumn1[$i] = GUICtrlCreateLabel($aLBckbColumn1[$i], 200, 40 + $i * 19, 120, 17)
Next
;i #### Ende Checkboxarray ###
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessen
GUICtrlCreateGroup("", 355, 31, 185, 485)
GUICtrlCreateLabel("User default", 367, 16, 185, 17)
;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], $aLBColumn2[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], 363, 40 + $i * 19, 13, 13)
$aLBColumn2[$i] = GUICtrlCreateLabel($aLBckbColumn2[$i], 386, 40 + $i * 19, 120, 17)
; create 25x Checkbox
Next
;i #### Ende Checkboxarray ###
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessen
GUICtrlCreateGroup("", 540, 31, 185, 485)
GUICtrlCreateLabel("Portable Apps", 552, 16, 185, 17)
;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], $aLBColumn3[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], 548, 40 + $i * 19, 13, 13)
$aLBColumn2[$i] = GUICtrlCreateLabel($aLBckbColumn3[$i], 571, 40 + $i * 19, 120, 17)
; create 25x Checkbox
Next
;i #### Ende Checkboxarray ###
GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessen
Global $bnInstall = GUICtrlCreateButton("Install", 355, 526, 75, 22)
GUICtrlSetOnEvent(-1, "_start")
Global $bnExit = GUICtrlCreateButton("Exit", 465, 526, 75, 22)
GUICtrlSetOnEvent(-1, "_ende")
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func _start()
MsgBox(0, "Start", "Start der Installation ..." & @TAB)
Exit
EndFunc ;==>_start
Func _ende()
Exit
EndFunc ;==>_ende
;~ Ende
[/autoit]Hi Jonathan,
hier ein Beispiel:
[autoit]
Global $ar[3], $tate = 4
Opt("GUIOnEventMode", 1)
GUICreate('All On/Off')
GUISetOnEvent(-3, "_exit")
$ar[0] = GUICtrlCreateCheckbox("hello", 20, 4)
GUICtrlSetState(-1, 4)
$ar[1] = GUICtrlCreateCheckbox("world", 20, 40)
GUICtrlSetState(-1, 4)
$ar[2] = GUICtrlCreateCheckbox("universe", 20, 70)
GUICtrlSetState(-1, 4)
$bn = GUICtrlCreateButton('All On/Off', 20, 300, 75, 22)
GUICtrlSetOnEvent(-1, "_ckb")
GUISetState()
While Sleep(100)
WEnd
Func _ckb()
$tate = BitXOR($tate, 4, 1)
For $i = 0 To 2
GUICtrlSetState($ar[$i], $tate)
Next
EndFunc ;==>_SelectAll
Func _exit()
Exit
EndFunc ;==>_exit
; Ende
[/autoit]Hi,
ich habe vor einiger Zeit "Complementary" eingestellt, vielleicht hilft es Dir weiter. ![]()
Hi,
bei den verschiedenen Versionen von CCleaner würde ich raten, den Pfad zum Programm vom Nutzer eingeben zulassen. ![]()
Hi, schau es Dir mal an.
[autoit]
GUICreate("Form1", 615, 438)
$checkbox = GUICtrlCreateCheckbox("Programm beenden ?", 56, 80, 200, 17)
$button = GUICtrlCreateButton("OK", 10, 400, 75, 22)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case -3
Exit
Case $button
If GUICtrlRead($checkbox) = 1 Then ;i Abfrage, ob Checkbox gewählt ist!
;i Hier wird Deine Aktion ausgeführt!
$box = MsgBox(0, "", "Hier Deine Aktion einfügen !" & @TAB)
EndIf
EndSwitch
WEnd
; Ende
[/autoit]Zitat:
"PS:
Ich muß die kpl Gui löschen da die Anzahl der Elemente
und die Elemente unterschiedlich sind."
Hier werden immer 11 Checkboxen erstellt ?
[autoit]
For $i = 0 To 10
$checkCN = GUICtrlCreateCheckbox("CHECKBOX " & $i +1, $Links, $oben + $i * 30, 120, 20)
Next
Hi, besser so:
[autoit]
Global $ar[2], $tate = 128
Opt("GUIOnEventMode", 1)
GUICreate('', 100, 100)
GUISetOnEvent(-3, "_exit")
$ckb = GUICtrlCreateCheckbox("hello", 4, 4)
GUICtrlSetOnEvent(-1, "_ckb")
$ar[0] = GUICtrlCreateRadio("world", 4, 40)
GUICtrlSetState(-1, 128)
$ar[1] = GUICtrlCreateRadio("universe", 4, 70)
GUICtrlSetState(-1, 128)
GUISetState()
[/autoit][autoit][/autoit][autoit]While Sleep(100)
WEnd
Func _ckb()
$tate = BitXOR($tate, 64, 128)
For $i = 0 To 1
GUICtrlSetState($ar[$i], $tate)
Next
EndFunc ;==>_ckb
Func _exit()
Exit
EndFunc ;==>_exit
; Ende
[/autoit]
Hi,
oder ganz anders ...
Global $ckb[2]
GUICreate("Checkbox", 150, 80)
$ckb[0] = GUICtrlCreateCheckbox("Ja", 8, 16, 49, 17)
$ckb[1] = GUICtrlCreateCheckbox("Nein", 96, 16, 49, 17)
$klick = GUICtrlCreateButton("klick", 32, 48, 75, 22)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case -3
Exit
Case $klick
If BitAND(GUICtrlRead($ckb[0]), 1) And BitAND(GUICtrlRead($ckb[1]), 1) Then
MsgBox(64, "Beide", "Beide Checkboxen sind aktiviert !" & @TAB)
Else
For $i = 0 To 1 ;i statisch kein Ubound
If BitAND(GUICtrlRead($ckb[$i]), 1) Then
Switch $i
Case 0 ;GUICtrlRead($ckb[0]) = 1
MsgBox(64, "Ja", "Checkbox Ja ist aktiviert !" & @TAB)
Case 1 ;GUICtrlRead($ckb[1]) = 1
MsgBox(64, "Nein", "Checkbox Nein ist aktiviert !" & @TAB)
EndSwitch
EndIf
Next
EndIf
EndSwitch
WEnd
; Ende
Gibt es keine Möglichkeit das er sich die datei merkt?? Weil muss Sie jetzt immerwieder angeben.
und es kommt folgender Fehler:
!No udf path found : RegRead("HKCU\Software\AutoIt v3\Autoit", "Include")Funktionieren tut es jedoch trotzdem.
OI sucht den Schlüssel in der Registry. Den Schlüssel einfach selbst erstellen, oder den Pfad in Sciteconfig eintragen (siehe OI Beitrag von Bernd670). ![]()
Opt("GUIOnEventMode", 1)
GUICreate("test", 250, 150)
GUISetOnEvent(-3, "_SpecialEvents")
$button1 = GUICtrlCreateButton("Button1", 50, 50)
GUICtrlSetOnEvent(-1, "_SpecialEvents")
$button2 = GUICtrlCreateButton("Button2", 100, 100)
GUICtrlSetOnEvent(-1, "_SpecialEvents")
$button3 = GUICtrlCreateButton("Button3", 150, 50)
GUICtrlSetOnEvent(-1, "_SpecialEvents")
GUISetState(@SW_SHOW)
[/autoit][autoit][/autoit][autoit]While Sleep(1000)
WEnd
Func _SpecialEvents()
Switch @GUI_CtrlId
Case -3
Exit
Case $button1
MsgBox(262144 + 64, "gedrückt...", "ID = " & @GUI_CTRLID) ;i zur abfrage der @GUI_CTRLID
Case $button2
MsgBox(262144 + 64, "gedrückt...", "ID = " & @GUI_CTRLID) ;i zur abfrage der @GUI_CTRLID
Case $button3
MsgBox(262144 + 64, "gedrückt...", "ID = " & @GUI_CTRLID) ;i zur abfrage der @GUI_CTRLID
EndSwitch
EndFunc ;==>SpecialEvents
;i Bitteschön! ![]()
Hi,
Du gibst nur den Pfad an, wo die Daten auf DEINEM PC liegen. Auch die Exe-Datei wird die Daten dort suchen!
Schau Dir mal "FileInstall" an.
Global $sIconPath = @ScriptDir & '\icons\'
$Pic1 = GUICtrlCreatePic("G:\Allg.Informationen, Formulare, Vorlagen\Vorlagen\LB_Logo\Logo Farbe 72.jpg", 0, 17, 480, 105)
Global $suche = GUICtrlCreateIcon($sIconPath & 'Search.ico', -1, 376, 184, 16, 16)
Opt("GUIOnEventMode", 1)
GUICreate("test", 250, 150)
GUISetOnEvent(-3, "_SpecialEvents")
$button1 = GUICtrlCreateButton("Button1", 50, 50)
GUICtrlSetOnEvent(-1, "_SpecialEvents")
$button2 = GUICtrlCreateButton("Button2", 100, 100)
GUICtrlSetOnEvent(-1, "_SpecialEvents")
$button3 = GUICtrlCreateButton("Button3", 150, 50)
GUICtrlSetOnEvent(-1, "_SpecialEvents")
GUISetState(@SW_SHOW)
[/autoit][autoit][/autoit][autoit]While Sleep(1000)
WEnd
Func _SpecialEvents()
Switch @GUI_CtrlId
Case -3
Exit
Case $button1
MsgBox(0, "1", "1")
Case $button2
MsgBox(0, "2", "2")
Case $button3
MsgBox(0, "3", "3")
EndSwitch
EndFunc ;==>SpecialEvents
;i Jetzt kommt der Vorteil vom GUIOnEventMode besser zur Geltung,
;i wenn man Macros, wie "@GUI_CtrlId" verwenden kann.
;i In der dt/en Hilfe ist das unter GUI-Referenz sehr gut beschrieben.
Hier ein Link zu C++.de und Tutorials in de und en. :
http://www.c-plusplus.de/cms/modules.php?op=modload&name=Downloads&file=index
Hi,
der Ansatz mit der autostart.inf ist genau richtig. Anders wird es nicht funktionieren.
Allerdings muss dann auch das automatische Starten von CDD/DVD/Wechselmedien aktiviert sein.
Gruß
Greenhorn
Die autorun.inf-Dateien werden zur zeit von den Antivirenprog. deaktiviert (nur zur Info)! ![]()
Hi,
schau mal hier:
Global $GUIwidth = @DesktopWidth
Global $GUIheight = @DesktopHeight
Hier ein Auszug aus der Scite -Hilfe.
;Adding Extra Ico's to the program resources.
;Example adding additional Icon to the Program resources and using it in your script.
;To test, compile the below script and run the exe:
[/autoit] [autoit][/autoit] [autoit]; Example 1
[/autoit] [autoit][/autoit] [autoit]#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\au3.ico
[/autoit] [autoit][/autoit] [autoit]#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype1.ico
[/autoit] [autoit][/autoit] [autoit]#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype2.ico
[/autoit] [autoit][/autoit] [autoit]#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype3.ico
[/autoit] [autoit][/autoit] [autoit]#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype-blank.ico
[/autoit] [autoit][/autoit] [autoit]#include <ButtonConstants.au3>
[/autoit] [autoit][/autoit] [autoit]GUICreate("Demo resource ICO's")
[/autoit] [autoit][/autoit] [autoit]$h_Button1 = GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON)
[/autoit] [autoit][/autoit] [autoit]GUISetState()
[/autoit] [autoit][/autoit] [autoit]For $x = 0 To 9
[/autoit] [autoit][/autoit] [autoit]$rc = TraySetIcon(@ScriptFullPath, -$x)
[/autoit] [autoit][/autoit] [autoit]$rc2 = GUICtrlSetImage($h_Button1, @ScriptFullPath, -$x)
[/autoit] [autoit][/autoit] [autoit]If $x < 5 Then
[/autoit] [autoit][/autoit] [autoit]TrayTip("Default ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3)
[/autoit] [autoit][/autoit] [autoit]Else
[/autoit] [autoit][/autoit] [autoit]TrayTip("New ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3)
[/autoit] [autoit][/autoit] [autoit]EndIf
[/autoit] [autoit][/autoit] [autoit]Sleep(2000)
[/autoit] [autoit][/autoit] [autoit]Next
[/autoit] [autoit][/autoit] [autoit]GUIDelete()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]; Example 2
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]#AutoIt3Wrapper_Res_File_Add=C:\WINDOWS\Media\tada.wav, SOUND, MYWAV
Global Const $SND_RESOURCE = 0x00040004
Global Const $SND_ASYNC = 1
DllCall("winmm.dll", "int", "PlaySound", "str", "MYWAV", "hwnd", 0, "int", $SND_RESOURCE)
DllCall("winmm.dll", "int", "PlaySound", "str", "MYWAV", "hwnd", 0, "int", BitOR($SND_RESOURCE, $SND_ASYNC))
For $n = 1 To 100
Sleep(15)
ToolTip("Asynch! " & $n)
Next
Und wenn Du die Icons einfach ins ScriptDir legst, wird doch nur einmal benötigt ?
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=iconPLUS1.exe
#AutoIt3Wrapper_UseUpx=n ;############ übersehen ???
#AutoIt3Wrapper_Res_Icon_Add=C:\Test\1.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Test\2.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Test\3.ico
#AutoIt3Wrapper_Run_Tidy=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/striponly
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
Gruß Prixma,
ich habe es eben nocheinmal mit neuen beliebigen Icons bei mir probiert und es hat funktioniert (siehe Anhang) ! ![]()
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=iconPLUS1.exe
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Icon_Add=C:\Test\1.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Test\2.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Test\3.ico
#AutoIt3Wrapper_Run_Tidy=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/striponly
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#region - GUI Create
GUICreate(' iconPLUS', 400, 400)
$Checkbox = GUICtrlCreateCheckbox("cb", 30, 90, 150, 40, BitOR($BS_ICON, $BS_PUSHLIKE))
GUICtrlSetImage(-1, @ScriptFullPath, -7)
$bnOK = GUICtrlCreateButton("OK", 20, 350, 75, 40, $BS_ICON)
GUICtrlSetImage(-1, @ScriptFullPath, -5)
$bnClose = GUICtrlCreateButton("b", 305, 350, 75, 40, $BS_ICON)
GUICtrlSetImage(-1, @ScriptFullPath, -6)
GUISetState()
#endregion - GUI Create
#region - GUI SelectLoop
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE Or $msg = $bnClose
MsgBox(64, " iconPLUS - Example", "Viel Spaß wünscht RR04 !" & @TAB, 3)
Exit
Case $msg = $bnOK
MsgBox(64, " iconPLUS - Example", "OK wurde gedrückt !" & @TAB)
Case $msg = $Checkbox
MsgBox(64, " iconPLUS - Example", "CheckBox wurde gedrückt !" & @TAB)
EndSelect
WEnd
#endregion - GUI SelectLoop
; Ende