meinst du nicht @DesktopWidth statt @DesktopDir ?
autsch ich idiot ![]()
jup meinte ich natürlich.
ein falscher buchstabe und schon wirds falsch vervollständigt^^
meinst du nicht @DesktopWidth statt @DesktopDir ?
autsch ich idiot ![]()
jup meinte ich natürlich.
ein falscher buchstabe und schon wirds falsch vervollständigt^^
Timerinit()
Timerdiff()
das sollte helfen ![]()
vllt hilft dir das:
OCR für QWidget-Controls
so z.B.
#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]$gui = GUICreate("Test", 200, 100)
$button = GUICtrlCreateButton("Ich oder du?", 50, 25, 100, 50)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $button
Switch Random(1, 2, 1)
Case 1
MsgBox(0,"","Ich")
Case 2
MsgBox(0,"","Du")
EndSwitch
EndSwitch
WEnd
Um was für ein Programm handelt es sich denn?
Liefert das Window info Tool garkeine Informationen?
ist es im gleichen Ordner wie dein Script? Heißt es genau so?
ansonsten bitte wie Autobert schon sagte:
ZitatHänge bitte das BG.jpg (in Post #1) mit an ,
Der scriptteil ist fehlerfrei.
Ich denke mal die Meldung die du hast ist:
"possibly used before declaration."
Wenn ja dann musst du der Variable die in der Fehlermeldung steht einen Wert geben
Da reicht doch ein einfaches Fileexists. Oder willst du etwas anderes testen?
[autoit]FileExists(@SystemDir & "\winmm.dll")
[/autoit]oder gleich so?
[autoit]$varResolution = @DesktopWidth & "x" & @DesktopHeight
[/autoit]Achja Geheimtipp:
[autoit]@Desktopwidth
@Desktopheight
(Bei deiner Lösung bekomm ich Kopfweh
)
Bis vor PixelSearch klappt alles, aber dann streikt es Oo
1. wenn überhaupt brauchen wir ne Fehlerbeschreibung mit der man was anfangen kann. Es streikt? was streikt, wann streikt es? wie verhält sich dieser ominöse Streik?
2. Für was ist das Script gedacht?
ich denke AutoBert meinte den hier:
ZIP - Packen / Entpacken mit Windows eigener Funktion
gibt aber noch weitere "Unzipper" wenn ich mich recht erinnere
Herzlich willkommen im Forum.
Ersteinmal: Für was möchtest du den die Memory werte ändern?
ProcessExists prüft ob ein Prozess vorhanden ist
Memoryopen gibt ein handle zu einem Prozess zurück
hab auch grad was gebastelt ![]()
$String1 = "1 5 7 12 23 34"
$String2 = "5 12 21 34 39 45"
$a1 = StringSplit($String1 & " " & $String2, " ")
For $i = 1 To $a1[0] - 1
For $i2 = $i + 1 To $a1[0]
If $a1[$i] = $a1[$i2] Then MsgBox(0,"",$a1[$i])
Next
Next
ZitatWofür braucht man denn sowas?
Er wollte das für ein Spiel.
Ist schon gemeldet. ![]()
Hab dir da mal was zusammengebastelt.
Ich hoffe es hilft dir / entspricht deinen Vorstellungen.
#include <File.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$pfad = FileSelectFolder("Bitte Bildpfad wählen", @MyDocumentsDir)
$bilder = _FileListToArray($pfad, "*.jpg")
$bildakt = 0
$gui = GUICreate("", 500, 330)
$gPic = GUICtrlCreatePic("", 0, 0, 521, 305, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetState($gPic, $GUI_DISABLE)
$gButton = GUICtrlCreateButton("", 0, 300, 500, 30)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $gButton
Do
$rnd = Random(1, $bilder[0], 1)
Until $rnd <> $bildakt
$bildakt = $rnd
GUICtrlSetImage($gPic, $pfad & "\" & $bilder[$bildakt])
EndSwitch
WEnd
Für was nen Decrypter? ![]()
$sErg = ""
$aSplit = StringSplit("50:61:73:73:77:6f:72:64:3a:20:77:78:33", ":")
For $i = 1 To $aSplit[0]
$sErg &= Chr("0x" & $aSplit[$i])
Next
InputBox("","", $sErg)
Der andere Thread wurde aus gutem Grund geschlossen.
Da brauchst du nicht nochmal den selben Thread aufmachen ....
Hallo button421, dann hänge doch bitte die INI Datei an.
Die ini wird erstellt wenn du eine der checkboxen anklickst.
Idealerweise beschreibst du auch welche CheckBoxen dadurch gesetzt werden sollen (Oder ScrennShot manuell markiert),
Zitat"Ausgang Ein/Ausschalten" bei "Aktion hinzufügen"
durch das Auswählen von Ausgang Ein/Ausschalten wird eine Combo erstellt. und um die gehts ![]()
Naja das ganze drumrum verwirrt bei deinen Beiträgen sehr. Deswegen wird auch noch niemand geantwortet haben...
Ich schätze jetz mal du willst es so:
#region includes ;########################
#include <k8055udf.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiStatusBar.au3>
#include <ListViewConstants.au3>
#include <ComboConstants.au3>
#endregion includes
;##########################################
Global $adressebin=""
Global $aktion="Programm erfolgreich gestartet"
Global $ini=@ScriptDir&"\logdatei.ini"
IniDelete($ini,"log")
IniWrite($ini,"log","Startdaten",@HOUR&":"&@MIN&":"&@SEC&":"&@MSEC&"-Datum:"&@MDAY&"."&@MON&"."&@YEAR)
#Region ### START Verbindungsform ### Form=
$verbindungsform = GUICreate("Verbindung", 184, 100, 190, 126, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
$SK5 = GUICtrlCreateCheckbox("SK5", 24, 16, 41, 17)
$SK6 = GUICtrlCreateCheckbox("SK6", 128, 16, 41, 17)
$Adresse = GUICtrlCreateGroup("Adresse", 8, 0, 169, 41)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateLabel("<---------------->", 64, 16, 64, 17)
$Progress1 = GUICtrlCreateProgress(0, 80, 182, 17)
$mitboardverbinden = GUICtrlCreateButton("Mit K8055 Board verbinden", 8, 48, 171, 25, $WS_GROUP)
GUISetState(@SW_HIDE)
#EndRegion ### END Verbindungsform ###
;##########################################
#Region ### START Hauptform ### Form=c:\users\jonathan verbeek\desktop\k8055 programmer\hauptform.kxf
$Form1_1 = GUICreate("K8055 Board Programmer Basicpack - created by button421", 519, 412, 187, 121)
$statusleiste = _GUICtrlStatusBar_Create($Form1_1)
Dim $statusleiste_PartsWidth[2] = [439, -1]
_GUICtrlStatusBar_SetParts($statusleiste, $statusleiste_PartsWidth)
_GUICtrlStatusBar_SetText($statusleiste, $aktion, 0)
_GUICtrlStatusBar_SetText($statusleiste, "Verbunden", 1)
$DigitaleEingaenge = GUICtrlCreateGroup("Digitale Eingänge", 8, 0, 169, 41)
$I1 = GUICtrlCreateCheckbox("I1", 16, 16, 25, 17)
$I2 = GUICtrlCreateCheckbox("I2", 48, 16, 25, 17)
$I3 = GUICtrlCreateCheckbox("I3", 80, 16, 25, 17)
$I4 = GUICtrlCreateCheckbox("I4", 112, 16, 25, 17)
$I5 = GUICtrlCreateCheckbox("I5", 144, 16, 25, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$DigitaleAusgaenge = GUICtrlCreateGroup("Digitale Ausgänge", 184, 0, 329, 41)
$O1 = GUICtrlCreateCheckbox("O1", 192, 16, 33, 17)
$O2 = GUICtrlCreateCheckbox("O2", 232, 16, 33, 17)
$O3 = GUICtrlCreateCheckbox("O3", 272, 16, 33, 17)
$O4 = GUICtrlCreateCheckbox("O4", 312, 16, 33, 17)
$O5 = GUICtrlCreateCheckbox("O5", 352, 16, 33, 17)
$O6 = GUICtrlCreateCheckbox("O6", 392, 16, 33, 17)
$O7 = GUICtrlCreateCheckbox("O7", 432, 16, 33, 17)
$O8 = GUICtrlCreateCheckbox("O8", 472, 16, 33, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$ListView1 = GUICtrlCreateListView("Aktionen", 8, 48, 506, 310)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 502)
$addaktion = GUICtrlCreateButton("Aktion hinzufügen", 8, 360, 107, 25, $WS_GROUP)
$delaktion = GUICtrlCreateButton("Aktion löschen", 120, 360, 91, 25, $WS_GROUP)
$anleitung = GUICtrlCreateButton("Anleitung für Experimente", 216, 360, 131, 25, $WS_GROUP)
$hilfe = GUICtrlCreateButton("Hilfe und Info", 352, 360, 75, 25, $WS_GROUP)
$beenden = GUICtrlCreateButton("Beenden", 432, 360, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Hauptform ###
;#######################################
#Region ### START Aktion hinzufügen ### Form=
$actionadd = GUICreate("Aktion hinzufügen", 246, 187, 192, 124, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
$Aktionlabel = GUICtrlCreateLabel("Aktion:", 8, 8, 37, 17)
$aktioncombo = GUICtrlCreateCombo("", 48, 8, 193, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Meldung anzeigen|Digitalen Ausgang ein/ausschalten|Abfrage ob Digitaler Eingang ein/aus|Wert für 7-Segment Display festlegen")
$probs = GUICtrlCreateGroup("Einstellungen für Aktion festlegen", 8, 32, 233, 121)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$cancelactionadd = GUICtrlCreateButton("Abbrechen", 168, 160, 75, 25, $WS_GROUP)
$okactionadd = GUICtrlCreateButton("OK", 88, 160, 75, 25, $WS_GROUP)
GUISetState(@SW_HIDE)
#EndRegion ### END Aktion hinzufügen ###
;#######################################
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3, $beenden
Exit
Case $SK5
If BitAND(GUICtrlRead($SK5),$GUI_CHECKED) Then
$adressebin = "SK5/"
EndIf
Case $SK6
If BitAND(GUICtrlRead($SK6),$GUI_CHECKED) Then
$adressebin = "SK6/"
EndIf
Case $mitboardverbinden
If GUICtrlRead($adressebin) = "SK5/SK6/" Then
USB_DLLOpen()
initial_board(0)
GUICtrlSetState($Progress1, 100)
MsgBox(64,"Info","Mit Board verbunden!")
GUISetState(@SW_SHOW, $Form1_1)
GUISetState(@SW_HIDE, $verbindungsform)
ElseIf GUICtrlRead($adressebin) = "SK6/" Then
USB_DLLOpen()
initial_board(1)
GUICtrlSetState($Progress1, 100)
MsgBox(64,"Info","Mit Board verbunden!")
GUISetState(@SW_SHOW, $Form1_1)
GUISetState(@SW_HIDE, $verbindungsform)
ElseIf GUICtrlRead($adressebin) = "SK5/" Then
USB_DLLOpen()
initial_board(2)
GUICtrlSetState($Progress1, 100)
MsgBox(64,"Info","Mit Board verbunden!")
GUISetState(@SW_SHOW, $Form1_1)
GUISetState(@SW_HIDE, $verbindungsform)
Else
USB_DLLOpen()
initial_board(3)
GUICtrlSetState($Progress1, 100)
MsgBox(64,"Info","Mit Board verbunden!")
GUISetState(@SW_SHOW, $Form1_1)
GUISetState(@SW_HIDE, $verbindungsform)
EndIf
Case $I1
If BitAND(GUICtrlRead($I1),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs")
IniWrite($ini,"inputsandoutputs","I1","1")
Else
IniDelete($ini,"inputsandoutputs")
IniWrite($ini,"inputsandoutputs","I1","0")
EndIf
Case $I2
If BitAND(GUICtrlRead($I2),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs","I2")
IniWrite($ini,"inputsandoutputs","I2","1")
Else
IniDelete($ini,"inputsandoutputs","I2")
IniWrite($ini,"inputsandoutputs","I2","0")
EndIf
Case $I3
If BitAND(GUICtrlRead($I3),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs","I3")
IniWrite($ini,"inputsandoutputs","I3","1")
Else
IniDelete($ini,"inputsandoutputs","I3")
IniWrite($ini,"inputsandoutputs","I3","0")
EndIf
Case $I4
If BitAND(GUICtrlRead($I4),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs","I4")
IniWrite($ini,"inputsandoutputs","I4","1")
Else
IniDelete($ini,"inputsandoutputs","I4")
IniWrite($ini,"inputsandoutputs","I4","0")
EndIf
Case $I5
If BitAND(GUICtrlRead($I5),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs","I5")
IniWrite($ini,"inputsandoutputs","I5","1")
Else
IniDelete($ini,"inputsandoutputs","I5")
IniWrite($ini,"inputsandoutputs","I5","0")
EndIf
Case $O1
If BitAND(GUICtrlRead($O1),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs","O1")
IniWrite($ini,"inputsandoutputs","O1","1")
Else
IniDelete($ini,"inputsandoutputs","O2")
IniWrite($ini,"inputsandoutputs","O1","0")
EndIf
Case $O2
If BitAND(GUICtrlRead($O2),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs","O2")
IniWrite($ini,"inputsandoutputs","O2","1")
Else
IniDelete($ini,"inputsandoutputs","O2")
IniWrite($ini,"inputsandoutputs","O2","0")
EndIf
Case $O3
If BitAND(GUICtrlRead($O3),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs","O3")
IniWrite($ini,"inputsandoutputs","O3","1")
Else
IniDelete($ini,"inputsandoutputs","O3")
IniWrite($ini,"inputsandoutputs","O3","0")
EndIf
Case $O4
If BitAND(GUICtrlRead($O4),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs","O4")
IniWrite($ini,"inputsandoutputs","O4","1")
Else
IniDelete($ini,"inputsandoutputs","O4")
IniWrite($ini,"inputsandoutputs","O4","0")
EndIf
Case $O5
If BitAND(GUICtrlRead($O5),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs","O5")
IniWrite($ini,"inputsandoutputs","O5","1")
Else
IniDelete($ini,"inputsandoutputs","O5")
IniWrite($ini,"inputsandoutputs","O5","0")
EndIf
Case $O6
If BitAND(GUICtrlRead($O6),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs","O6")
IniWrite($ini,"inputsandoutputs","O6","1")
Else
IniDelete($ini,"inputsandoutputs","O6")
IniWrite($ini,"inputsandoutputs","O6","0")
EndIf
Case $O7
If BitAND(GUICtrlRead($O7),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs","O7")
IniWrite($ini,"inputsandoutputs","O7","1")
Else
IniDelete($ini,"inputsandoutputs","O7")
IniWrite($ini,"inputsandoutputs","O7","0")
EndIf
Case $O8
If BitAND(GUICtrlRead($O8),$GUI_CHECKED)Then
IniDelete($ini,"inputsandoutputs","O8")
IniWrite($ini,"inputsandoutputs","O8","1")
Else
IniDelete($ini,"inputsandoutputs","O8")
IniWrite($ini,"inputsandoutputs","O8","0")
EndIf
Case $addaktion
GUISetState(@SW_SHOW, $actionadd)
GUICtrlDelete($probs)
Case $aktioncombo
If GUICtrlRead($aktioncombo) = "Meldung anzeigen" Then
$probs = GUICtrlCreateGroup("Einstellungen für Meldung festlegen", 8, 32, 233, 121)
$title = GUICtrlCreateInput("Titel der Meldung",17,45,217,21)
$text = GUICtrlCreateInput("Text der Meldung",17,70,217,73)
IniWrite($ini,"aktion","Msg","1")
EndIf
If GUICtrlRead($aktioncombo) = "Digitalen Ausgang Ein/Ausschalten" Then
$probs = GUICtrlCreateGroup("Einstellungen für Ausgang festlegen", 8, 32, 233, 121)
$outputlabel = GUICtrlCreateLabel("Ausgang:",8,24,49,17)
$outputcombo = GUICtrlCreateCombo("",64,24,153,17, $CBS_DROPDOWNLIST)
$inisection = IniReadSection($ini, "inputsandoutputs")
For $i = 1 To $inisection[0][0]
If $inisection[$i][1] Then GUICtrlSetData($outputcombo, $inisection[$i][0])
Next
$valueoutput = GUICtrlCreateLabel("Wert:",8,56,30,17)
$onoutput = GUICtrlCreateRadio("Einschalten",32,72,81,17,$BS_AUTORADIOBUTTON)
EndIf
EndSwitch
WEnd
Wenn nicht bitte genauer beschreiben und das ganze drum rum ruhig weglassen, das verwirrt nur^^
Gruß
Schnitzel