Hallo Trainman,
egal ob du die Variablen aus einer log oder ini liest, wenn deine Programmlogik nicht passt wirst du auch wieder das gleiche Problem haben. Poste doch das dazugehörige Skript und die log-Datei,
mfg (Auto)Bert
Hallo Trainman,
egal ob du die Variablen aus einer log oder ini liest, wenn deine Programmlogik nicht passt wirst du auch wieder das gleiche Problem haben. Poste doch das dazugehörige Skript und die log-Datei,
mfg (Auto)Bert
Hallo subzero007,
lies dir die Hilfe zu
[autoit]_GUICtrlListView_AddArray
[/autoit]durch,
mfg (Auto)Bert
@Pinguin94,
du hast $Button2 unterschlagen:
MsgBox(0, "! ! ! !", "ACHTUNG: sie müssen anschließend ein Passwort eingeben...")
$pw1 = InputBox("Passwortcheck", "Bitte geben sie das Passwort ein: (5 - stellig)", "", "*")
If $pw1 = "K4H81" Then
MsgBox(0, "INFORMATION", "Sie haben das richtige Passwort eingegeben! Drücken sie OK um fortzufahren")
ProgressOn("Der Installer lädt einen kleinen Moment bitte", "Bitte warten ...")
For $i = 0 To 500
ProgressSet($i / 500 * 100, Int($i / 500 * 100) & "%")
Sleep(10)
Next
ProgressOff()
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("GTA vice city - INSTALLATION", 420, 162, 194, 124)
GUISetBkColor(0xABABAB)
$Label1 = GUICtrlCreateLabel("GTA Intaller: hier können sie GTA vice city installieren !", 8, 8, 401, 22)
GUICtrlSetFont(-1, 10, 400, 0, "Arial Black")
$Label2 = GUICtrlCreateLabel("GTA vice city wird in folgendem Pfad installiert:", 8, 32, 279, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Arial")
$Label3 = GUICtrlCreateLabel("C:\GTA vice city.zip", 288, 32, 119, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Arial")
$Button1 = GUICtrlCreateButton("Installieren !", 216, 64, 193, 89, 0)
GUICtrlSetFont(-1, 20, 400, 0, "Arial")
$Button2 = GUICtrlCreateButton("Doch nicht !", 8, 64, 201, 89, 0)
GUICtrlSetFont(-1, 20, 400, 0, "Arial")
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
MsgBox(0, "INSTALLATIONSABBRUCH", "GTA vice city wird nicht installiert...")
Exit
ExitLoop
Case $Button1
MsgBox(0, "INFO", "INFO: sobald die Installation fertig ist, kommt eine meldung!")
FileInstall("C:\Users\Sandro\Desktop\GTA vice city.zip", "C:\GTA vice city.zip", 1)
MsgBox(0, "FERTIG !", "Die Installation ist fertig! Sie müssen nur noch das .zip archiv irgendwohin entpacken und schon können sie losspielen !")
EndSwitch
WEnd
EndIf
[/autoit]mfg (Auto)Bert
Hallo crocojunk,
durch das Include-File scheinen die normalen Messages für GuiGetMsg nicht mehr zu funktionieren. Hier einmal das Skript zu Testzwecken mit AdLibRegister so abgeändert, dass 10 Sekunden aufgenommen werden:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <AVIWriter.au3>
#include <File.au3>
#include <ScreenCapture.au3>
#include <SliderConstants.au3>
#include <GUIListBox.au3>
Global $Capture
[/autoit] [autoit][/autoit] [autoit]HotKeySet("^v")
HotKeySet("{ESC}", "close")
HotKeySet("^p")
;_StartAviLibrary()
;$avi = _CreateAvi("C:\Crocoframe\Videos\" & "\crocoframe.avi", 5,200,200)
;Break (0)
DirCreate("C:\Crocoframe\")
DirCreate("C:\Crocoframe\Videos\")
DirCreate("C:\Crocoframe\Bilder\")
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("CrocoFrame © CrocoJunk ", 548, 250, 192, 124)
$Pic1 = GUICtrlCreatePic("", 0, 0, 545, 89, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("Video aufnehmen", 8, 112, 87, 17)
$Button1 = GUICtrlCreateButton("Play (STRG+V) ", 120, 112, 100, 25, $WS_GROUP)
$Label2 = GUICtrlCreateLabel("Video Pausieren", 8, 152, 81, 17)
$Button2 = GUICtrlCreateButton("Pause (P)", 120, 152, 75, 25, $WS_GROUP)
$Label3 = GUICtrlCreateLabel("Video stoppen", 8, 192, 72, 17)
$Button3 = GUICtrlCreateButton("Video Beenden (ESC)", 120, 200, 120, 25, $WS_GROUP)
$Checkbox1 = GUICtrlCreateCheckbox("Video starten nachdem aufgenommen", 256, 120, 193, 17)
$Checkbox2 = GUICtrlCreateCheckbox("Video starten nach", 256, 168, 113, 17)
$menu1 = GUICtrlCreateMenu("Datei")
$item1 = GUICtrlCreateMenuItem("Optionen", $menu1)
$item2 = GUICtrlCreateMenuItem("Easy Screen", $menu1)
GUICtrlCreateInput("", 376, 168, 57, 21)
$Label4 = GUICtrlCreateLabel("Sekunden", 448, 168, 53, 17)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If Not @error Then
MsgBox(64, "Video", "Das Video startet jetz!")
EndIf
$Capture = True
_StartAviLibrary()
$avi = _CreateAvi("C:\Crocoframe\Videos\" & "\crocoframe.avi", 5, 200, 200)
AdlibRegister("close",10000) ;vorsichtshalber Buttons funktionieren nicht Hotkey ESC klappt aber
ConsoleWrite("STARTED" & @CRLF)
While $Capture
$m = MouseGetPos()
$hBmp = _ScreenCapture_Capture("", $m[0] - 100, $m[1] - 100, $m[0] + 100, $m[1] + 100, True)
_AddHBitmapToAvi($avi, $hBmp)
_WinAPI_DeleteObject($hBmp)
Sleep(200)
WEnd
ConsoleWrite("STOPPED" & @CRLF)
AdlibUnRegister("close")
Case $Button2
Case $Button3
ConsoleWrite("STOP" & @CRLF)
close()
Case $Checkbox1
Case $Checkbox2
Case $item1
_optionen()
Case $item2
_screen()
EndSwitch
WEnd
Func _optionen()
[/autoit] [autoit][/autoit] [autoit]EndFunc ;==>_optionen
Func _screen()
EndFunc ;==>_screen
Func close()
_CloseAvi($avi)
_StopAviLibrary()
$Capture = False
EndFunc ;==>close
hier gibt es ein funktionierendes Skript AviCapture
also soll es so ausehen.
C0047D333
Zitat von qonTrue
C0047D33das kommt bei deinem raus, merkste nix?
wennde zB hinter das C noch 5 andere buchstaben setzt, wirds vll klarer
die Ausgabe von @Nut 's 2. Post:
stimmt doch,
mfg (Auto)Bert
Hallo Stinger2k,
ändere Zeile 3 in
[autoit]Global $MainGUI, $SubGUI=-1, $back, $next
[/autoit]
und es klappt.
mfg (Auto)Bert
$SS_NOTIFY ist in StaticConstants.au3 definiert
Zitat von Hilfe$SS_NOTIFY 0x0100 Sendet die STN_CLICKED-Benachrichtigung an das "parent"-Fenster, wenn der Nutzer auf das Control klickt.
mfg (Auto)Bert
Alles anzeigenkriege diesen fehler:
[autoit]#Include <string.au3>
[/autoit]
$str=_StringBetween("C0047D333.test.com","",".")
msgbox(0,"",$str)
01.au3 (3) : ==> Subscript used with non-Array variable.:
msgbox(0,"",$str[0])
msgbox(0,"",$str^ ERROR
->18:26:17 AutoIT3.exe ended.rc:1Was läuft falsch?
StringBetween liefert ein Array zurück also so:
[autoit]#Include <string.au3>
$str=_StringBetween("C0047D333.test.com","",".")
msgbox(0,"",$str[0])
Hallo Button421,
hier meine Version:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Sound.au3>
Global $Musik, $Sound
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 518, 340, 192, 124)
$Button1 = GUICtrlCreateButton("Laden", 8, 8, 75, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Play", 208, 296, 75, 25, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Stop", 368, 296, 75, 25, $WS_GROUP)
$Button4 = GUICtrlCreateButton("Pause", 288, 296, 75, 25, $WS_GROUP)
GUICtrlSetState($Button2,$GUI_DISABLE)
GUICtrlSetState($Button3,$GUI_DISABLE)
GUICtrlSetState($Button4,$GUI_DISABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Musik = FileOpenDialog("...",@DesktopDir,"Datei (*.*)", 1);Variable(soll bei Button1 ausgeführt werden)
; $Musik = FileOpenDialog("...",@DesktopDir,"Datei (*.*)", 1+4);Mehrfachauswahl erfordert weitere Änderungen
GUICtrlSetState($Button2,$GUI_ENABLE)
Case $Button2
if IsArray($Sound) Then
_SoundResume($Sound)
Else
$Sound = _SoundOpen($Musik)
_SoundPlay($Sound)
EndIf
GUICtrlSetState($Button3,$GUI_ENABLE)
GUICtrlSetState($Button4,$GUI_ENABLE)
Case $Button3
_SoundStop($Sound)
$Sound =""
GUICtrlSetState($Button3,$GUI_DISABLE)
GUICtrlSetState($Button4,$GUI_DISABLE)
Case $Button4
_SoundPause($Sound)
GUICtrlSetState($Button3,$GUI_DISABLE)
GUICtrlSetState($Button4,$GUI_DISABLE)
EndSwitch
WEnd
mfg (Auto)Bert
Hallo Btton421,
du musst selbst wissen wann du deiner bereits Global definierten Variable einen Wert zuweissen willst. Du kannst aber auch dein bisheriges Skript posten, dann sehen auch andere wo es sinnvoll ist,
mfg (Auto)Bert
schau dir diesen Thread [ offen ] Anderer Skin? an. Er enthält einige nützliche Links dazu,
mfg (Auto)Bert
Hallo EliteMatthias,
poste dein komplettes Skript, der Code-Schnipsel funktioniert
mfg (Auto)Bert
Hallo button421,
[autoit]
Global $var
;anderer Skriptteil
$var = FileOpenDialog( ... )
;Koda Script
Case $ButtonInKoda
;$var = FileOpenDialog( ... ) ;vielleicht auch hier
afair bist du in deinen anderem Thread zum gleichen Thema ausreichend informiert worden und hast aber dein Skript nicht gepostet du solltest zum besseren Verstehn die Hilfe durcharbeiten,
mfg (Auto)Bert
Hallo SchrotterCH,
anscheinend nicht, aber nach nicht einmal 1 Stunde sein Thema schon zu pushen wird hier gar nicht gern gesehen, noch dazu scheint es sich um einen Teil eines BOT 's zu handeln.
mfg (Auto)Bert
Zitat von black_skorpi0-basierende array:
[autoit]For $i = 0 To UBound($array)
[/autoit]
If GUICtrlRead($auslese) = $array[$i] Then ;...
Next
so wäre es richtig:
[autoit]For $i = 0 To UBound($array)-1
If GUICtrlRead($auslese) = $array[$i] Then ;...
Next
weil ja das 1. Element $array[0] ist und das n. Element $array[$n-1]
mfg (Auto)Bert
Hallo EliteMatthias,
poste doch einfach dein bisheriges Skript und netterweise auch eine genaue Beschreibung was es machen soll,
denn seit kurzem funktioniert meine Glaskugel nicht mehr,
mfg (Auto)Bert
Hallo eketrix,
das komplette Skript wäre hilfreich. Das sollte aber klappen (vorausgesetzt Summe = 100%):
[autoit]GUICtrlSetData($strahlmittel_siebanalyse_Anzahl_1, Round(GUICtrlRead($strahlmittel_siebanalyse_gewicht_1) / _
GUICtrlRead($strahlmittel_siebanalyse_gewicht_summe) *100,2)
mfg (Auto)Bert
Hallo Zocker-SZ,
und hier eine Version mit ComboBox und INI-File, daher individuell veränderbar:
#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]Const $sElect = "bitte eine URL auswählen"
Global $URL
If Not FileExists(@ScriptDir & "\URL.INI") Then
$sData = "AutoIt=http://www.autoit.de" & @LF & "Dein Thread=http://www.autoit.de/index.php?page=Thread&postID=156685#post156685" & @LF & "AutoIt V3=http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe"
IniWriteSection(@ScriptDir & "\URL.INI", "URLs", $sData)
EndIf
$hGui = GUICreate("Combobox mit INI für URL-Aufruf", 300, 160, 302, 218)
$hcboProg = GUICtrlCreateCombo($sElect, 8, 8, 200, 25)
$hbtnAdd = GUICtrlCreateButton("&Hinzufügen", 213, ![]()
$hlblURL = GUICtrlCreateLabel("", 8, 35, 200, 50)
$list1 = IniReadSection(@ScriptDir & "\URL.INI", "URLs")
ConsoleWrite($list1 & @CRLF)
For $i = 1 To $list1[0][0]
GUICtrlSetData($hcboProg, $list1[$i][0])
Next
$hbtnOpen = GUICtrlCreateButton("&Öffnen", 8, 85)
GUICtrlSetState($hbtnOpen, $GUI_DISABLE)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $hbtnAdd
$write1 = InputBox("URL", "Bitte eine gülzige eingeben")
If $write1 <> "" Then
$write2 = InputBox("URL verwalten unter", "Bitte Kurzbegriff eingeben")
If $write2 <> "" Then IniWrite(@ScriptDir & "\URL.INI", "URLs", $write2, $write1)
GUICtrlSetData($hcboProg, $write2, $write2)
EndIf
show_Selection()
Case $hcboProg
show_Selection()
Case $hbtnOpen
ShellExecute($url)
;ConsoleWrite($URL & @CRLF)
EndSwitch
WEnd
Func show_Selection()
If GUICtrlRead($hcboProg) = $sElect Then
GUICtrlSetState($hbtnOpen, $GUI_DISABLE)
GUICtrlSetData($hlblURL, "")
Else
GUICtrlSetState($hbtnOpen, $GUI_ENABLE)
$Prog = GUICtrlRead($hcboProg)
ConsoleWrite("ausgewählt: " & $Prog & @CRLF)
$URL = IniRead(@ScriptDir & "\URL.INI", "URLs", $Prog, "")
GUICtrlSetData($hlblURL, $URL)
EndIf
EndFunc ;==>show_Selection
PS.: solche Anfragen gehören eigentlich ins Forum Hilfe und Unterstützung,
mfg (Auto)Bert
Zitat von HilfeIniReadSection
Liest alle Schlüssel-/Wert-Paare aus einer Sektion einer standardkonformen .ini-Datei.
IniReadSection ( "filename", "section" )
hier ein zusammenkopiertes Beispiel aus der Hilfe zu IniReadSectionNames und IniReadSection:
$sIniName = @WindowsDir & "\win.ini"
$var = IniReadSectionNames($sIniName)
If @error Then
MsgBox(4096, "", "Es ist ein Fehler aufgetreten. Wahrscheinlich keine INI Datei vorhanden.")
Else
For $i = 1 To $var[0]
_readSectionKeys($var[$i])
Next
EndIf
Func _readSectionKeys($sSection)
Local $var2 = IniReadSection($sIniName, $sSection)
If @error Then
MsgBox(4096, "", "Es ist ein Fehler aufgetreten. Warscheinlich keine INI Datei vorhanden.")
Else
For $i = 1 To $var2[0][0]
MsgBox(4096, $sSection, "Schlüssel: " & $var2[$i][0] & @CRLF & "Wert: " & $var2[$i][1])
Next
EndIf
EndFunc
mfg (Auto)Bert