
apbonn
Active Members-
Posts
34 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
apbonn's Achievements

Seeker (1/7)
0
Reputation
-
Hi, im using this statement to get a specific content between two tags: StringRegExp($content,'<resource>xy:/resources/([^<]*)<\/resource>',3) It works fine. But now i have to add a functionality, because it can happen, that after "<resource" another tags comes up, but the regex should ignore it the content can be like this <resource>xy:/resources/xyz/123</resource> <resource mytag="xy">xy:/resources/xyz/123</resource> what do i have to change to my rule, that is has something like StringRegExp($content,'<resource I_DONT_CARE_WHAT_STANDS_HERE>xyz:/resources/([^<]*)<\/resource>',3) any ideas?
-
update, i did this local $sFile1 = GUICtrlRead($hEdit) Local $each = StringSplit($sfile1, "@CR") For $xyz = 1 to UBound($each) -1 MsgBox($MB_SYSTEMMODAL, "", $each[$xyz]) Next this gives my by this input: C:\Users\xy\Documents\sourcetree\resources\a\packages\graphics\cliparts\wedding.xml C:\Users\xy\Documents\sourcetree\resources\a\packages\graphics\cliparts\nature.xml C:\Users\xy\Documents\sourcetree\resources\a\packages\graphics\cliparts\ornaments.xml this output by the MsgBox EMPTY FIELD :\Users\xy\Documents\sourcetree\resources\a\packages\graphics\cliparts\wedding.xml :\Users\xy\Documents\sourcetree\resources\a\packages\graphics\cliparts\nature.xml :\Users\xy\Documents\sourcetree\resources\a\packages\graphics\cliparts\ornaments.xml why is there an empty field and why is the "C" missing of "C:\...." `?
-
thank you when i do this: local $sFile1 = GUICtrlRead($hEdit) is the content of $sFile1 an array or a long string ? so i could split the string by each new line ?
-
i changed it, works too. thanks. but any idea how to read it out
-
i activated the wrong window, my fault, sorry now it works and may you also know how i read every line after pressing the "check" button? i a way where i call my function for each line ?
-
super nice, thank you i dont know why, but if i drop i file there, i will also open the file in the application for it, so i drop a word file there, word will also open with the file?! have an idea?
-
wrong text
-
hi i did this to create a mutliline inputbox, Local $edit = GUICtrlCreateEdit("Drop Here", 20, 60, 400, 200, $ES_AUTOVSCROLL + $WS_VSCROLL + $ES_MULTILINE) ; But i have some problems: 1. I want the box to empty, but if i remove "Drop here" i get an error 2. If i drop multiple files , each file has its own line like the documentation says, but if i want to add just one file to list, it is in the same line as the last one. So need an option like newContent -> newLine 3. After dropping files the dropped files are highlighted, and if i drop new the old entries are overwritten, i dont want the text to be highlighted after dropping andy ideas?
-
Enable checkbox by clicking another checkbox
apbonn replied to apbonn's topic in AutoIt General Help and Support
🙄 holy, im totally sorry. now it works -
Enable checkbox by clicking another checkbox
apbonn replied to apbonn's topic in AutoIt General Help and Support
im sorry , but i dont get it, i dont have any switch case code, and you see all of my code, the rest is only a big function which is only called if a button is pressed. so the issue has to be in that code snipped i allready posted. i never used a switch case statement -
Enable checkbox by clicking another checkbox
apbonn replied to apbonn's topic in AutoIt General Help and Support
it looks like this now Opt("MustDeclareVars", 1) Local $dropFile_1, $dropFile_2, $label, $msg, $dropFile_3, $dropFile_4, $dropFile_5, $dropFile_6, $dropFile_7, $dropFile_8, $dropFile_9, $dropFile_10 local $myGUI = GUICreate('XML ressource checker', 530, 470, @DesktopWidth / 2 - 192, _ @DesktopHeight / 2 - 235, -1, $WS_EX_ACCEPTFILES + $WS_EX_TOPMOST) GUICtrlCreateGroup("XML Files", 5, 5, 510, 460) GUICtrlCreateLabel('File 1:', 20, 30) $dropFile_1 = GUICtrlCreateInput("", 80, 30, 400, 20, -1) GUICtrlSetState($dropFile_1, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_1, 'You can drag & drop files here...') GUICtrlCreateLabel('File 2:', 20, 60) $dropFile_2 = GUICtrlCreateInput("", 80, 60, 400, 20, -1) GUICtrlSetState($dropFile_2, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_2, 'You can drag & drop files here...') GUICtrlCreateLabel('File 3:', 20, 90) $dropFile_3 = GUICtrlCreateInput("", 80, 90, 400, 20, -1) GUICtrlSetState($dropFile_3, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_3, 'You can drag & drop files here...') GUICtrlCreateLabel('File 4:', 20, 120) $dropFile_4 = GUICtrlCreateInput("", 80, 120, 400, 20, -1) GUICtrlSetState($dropFile_4, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_4, 'You can drag & drop files here...') GUICtrlCreateLabel('File 5:', 20, 150) $dropFile_5 = GUICtrlCreateInput("", 80, 150, 400, 20, -1) GUICtrlSetState($dropFile_5, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_5, 'You can drag & drop files here...') GUICtrlCreateLabel('File 6:', 20, 180) $dropFile_6 = GUICtrlCreateInput("", 80, 180, 400, 20, -1) GUICtrlSetState($dropFile_6, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_6, 'You can drag & drop files here...') GUICtrlCreateLabel('File 7:', 20, 210) $dropFile_7 = GUICtrlCreateInput("", 80, 210, 400, 20, -1) GUICtrlSetState($dropFile_7, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_7, 'You can drag & drop files here...') GUICtrlCreateLabel('File 8:', 20, 240) $dropFile_8 = GUICtrlCreateInput("", 80, 240, 400, 20, -1) GUICtrlSetState($dropFile_8, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_8, 'You can drag & drop files here...') GUICtrlCreateLabel('File 9:', 20, 270) $dropFile_9 = GUICtrlCreateInput("", 80, 270, 400, 20, -1) GUICtrlSetState($dropFile_9, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_9, 'You can drag & drop files here...') GUICtrlCreateLabel('File 10:', 20, 300) $dropFile_10 = GUICtrlCreateInput("", 80, 300, 400, 20, -1) GUICtrlSetState($dropFile_10, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_10, 'You can drag & drop files here...') Local $idCheckboxUseless = GUICtrlCreateCheckbox ( "Suche fehlende Ressourcen", 80, 320 ) Local $idCheckbox = GUICtrlCreateCheckbox ( "Log mit Timestamp", 80, 400 ) Local $idCheckboxGroup = GUICtrlCreateCheckbox ( "Suche fehlende Ressourcen anhand der GroupID", 80, 360 ) Local $idCheckboxFixGroup = GUICtrlCreateCheckbox ("Adde gefundene Ressoucren mit identischer GroupID", 80, 380 ) Local $idCheckboxRef = GUICtrlCreateCheckbox ( "Lösche nicht gefundene Ressourcen ", 80, 340 ) Local $idStart = GUICtrlCreateButton("XMLs prüfen", 215, 420, 100, 25) Local $sFile1, $sFile2,$sFile3, $sFile4,$sFile5, $sFile6,$sFile7, $sFile8,$sFile9, $sFile10 GUICtrlSetState($idCheckboxUseless, $GUI_DISABLE) GUICtrlSetState($idCheckboxUseless, $GUI_CHECKED) GUICtrlSetState($idCheckboxFixGroup, $GUI_DISABLE) Case $idCheckboxGroup ; This is the code to run when your checkbox is clicked, previously your Checkbox1Click() function If GUICtrlRead($idCheckboxGroup) = $GUI_CHECKED Then GUICtrlSetState($idCheckboxFixGroup, $GUI_ENABLE) Else GUICtrlSetState($idCheckboxFixGroup, $GUI_DISABLE) EndIf GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE GUIDelete() ExitLoop Case $GUI_EVENT_DROPPED If @GUI_DropId = $dropFile_1 Then GUICtrlSetData($dropFile_1, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_2 Then GUICtrlSetData($dropFile_2, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_3 Then GUICtrlSetData($dropFile_3, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_4 Then GUICtrlSetData($dropFile_4, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_5 Then GUICtrlSetData($dropFile_5, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_6 Then GUICtrlSetData($dropFile_6, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_7 Then GUICtrlSetData($dropFile_7, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_8 Then GUICtrlSetData($dropFile_8, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_9 Then GUICtrlSetData($dropFile_9, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_10 Then GUICtrlSetData($dropFile_10, @GUI_DragFile) EndIf Case $idStart $sFile1 = GUICtrlRead($dropFile_1) $sFile2 = GUICtrlRead($dropFile_2) $sFile3 = GUICtrlRead($dropFile_3) $sFile4 = GUICtrlRead($dropFile_4) $sFile5 = GUICtrlRead($dropFile_5) $sFile6 = GUICtrlRead($dropFile_6) $sFile7 = GUICtrlRead($dropFile_7) $sFile8 = GUICtrlRead($dropFile_8) $sFile9 = GUICtrlRead($dropFile_9) $sFile10 = GUICtrlRead($dropFile_10) If GUICtrlRead($idCheckbox) = $GUI_CHECKED Then local $withLog = 1 Else local $withLog = 0 EndIf If GUICtrlRead($idCheckboxRef) = $GUI_CHECKED Then local $withRef = 1 Else local $withRef = 0 EndIf If GUICtrlRead($idCheckboxGroup) = $GUI_CHECKED Then local $withGroup = 1 Else local $withGroup = 0 EndIf If GUICtrlRead($idCheckboxFixGroup) = $GUI_CHECKED Then local $withGroupCorrect = 1 Else local $withGroupCorrect = 0 EndIf if $sFile1 <> "" Then mainStart($sFile1, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile2 <> "" Then mainStart($sFile2, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile3 <> "" Then mainStart($sFile3, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile4 <> "" Then mainStart($sFile4, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile5 <> "" Then mainStart($sFile5, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile6 <> "" Then mainStart($sFile6, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile7 <> "" Then mainStart($sFile7, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile8 <> "" Then mainStart($sFile8, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile9 <> "" Then mainStart($sFile9, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile10 <> "" Then mainStart($sFile10, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf MsgBox($MB_SYSTEMMODAL, "XML ressource checker", "Vorgang vollständig beendet. Sofern es Fehler gab, existiert ein Log", 0, $myGUI) ; DropIn Felder leeren GUICtrlSetData($dropFile_1, "") GUICtrlSetData($dropFile_2, "") GUICtrlSetData($dropFile_3, "") GUICtrlSetData($dropFile_4, "") GUICtrlSetData($dropFile_5, "") GUICtrlSetData($dropFile_6, "") GUICtrlSetData($dropFile_7, "") GUICtrlSetData($dropFile_8, "") GUICtrlSetData($dropFile_9, "") GUICtrlSetData($dropFile_10, "") EndSwitch WEnd -
Enable checkbox by clicking another checkbox
apbonn replied to apbonn's topic in AutoIt General Help and Support
"No machting select oder switch statement" i guess i missed a point, i removed both events and replaced your with my old function. -
Enable checkbox by clicking another checkbox
apbonn replied to apbonn's topic in AutoIt General Help and Support
great, now my MSG Boxes are over the main window, thank you but if i add Opt("GUIOnEventMode", 1) no button is working anymore and the cpu goes crazy -
Enable checkbox by clicking another checkbox
apbonn replied to apbonn's topic in AutoIt General Help and Support
this is the gui code (first code with autoIT, sorry that it looks shitty i guess) Opt("GUIOnEventMode", 1) Opt("MustDeclareVars", 1) Local $dropFile_1, $dropFile_2, $label, $msg, $dropFile_3, $dropFile_4, $dropFile_5, $dropFile_6, $dropFile_7, $dropFile_8, $dropFile_9, $dropFile_10 GUICreate('XML ressource checker', 530, 470, @DesktopWidth / 2 - 192, _ @DesktopHeight / 2 - 235, -1, $WS_EX_ACCEPTFILES + $WS_EX_TOPMOST) GUICtrlCreateGroup("XML Files", 5, 5, 510, 460) GUICtrlCreateLabel('File 1:', 20, 30) $dropFile_1 = GUICtrlCreateInput("", 80, 30, 400, 20, -1) GUICtrlSetState($dropFile_1, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_1, 'You can drag & drop files here...') GUICtrlCreateLabel('File 2:', 20, 60) $dropFile_2 = GUICtrlCreateInput("", 80, 60, 400, 20, -1) GUICtrlSetState($dropFile_2, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_2, 'You can drag & drop files here...') GUICtrlCreateLabel('File 3:', 20, 90) $dropFile_3 = GUICtrlCreateInput("", 80, 90, 400, 20, -1) GUICtrlSetState($dropFile_3, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_3, 'You can drag & drop files here...') GUICtrlCreateLabel('File 4:', 20, 120) $dropFile_4 = GUICtrlCreateInput("", 80, 120, 400, 20, -1) GUICtrlSetState($dropFile_4, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_4, 'You can drag & drop files here...') GUICtrlCreateLabel('File 5:', 20, 150) $dropFile_5 = GUICtrlCreateInput("", 80, 150, 400, 20, -1) GUICtrlSetState($dropFile_5, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_5, 'You can drag & drop files here...') GUICtrlCreateLabel('File 6:', 20, 180) $dropFile_6 = GUICtrlCreateInput("", 80, 180, 400, 20, -1) GUICtrlSetState($dropFile_6, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_6, 'You can drag & drop files here...') GUICtrlCreateLabel('File 7:', 20, 210) $dropFile_7 = GUICtrlCreateInput("", 80, 210, 400, 20, -1) GUICtrlSetState($dropFile_7, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_7, 'You can drag & drop files here...') GUICtrlCreateLabel('File 8:', 20, 240) $dropFile_8 = GUICtrlCreateInput("", 80, 240, 400, 20, -1) GUICtrlSetState($dropFile_8, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_8, 'You can drag & drop files here...') GUICtrlCreateLabel('File 9:', 20, 270) $dropFile_9 = GUICtrlCreateInput("", 80, 270, 400, 20, -1) GUICtrlSetState($dropFile_9, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_9, 'You can drag & drop files here...') GUICtrlCreateLabel('File 10:', 20, 300) $dropFile_10 = GUICtrlCreateInput("", 80, 300, 400, 20, -1) GUICtrlSetState($dropFile_10, $GUI_DROPACCEPTED) GUICtrlSetTip($dropFile_10, 'You can drag & drop files here...') Local $idCheckboxUseless = GUICtrlCreateCheckbox ( "Suche fehlende Ressourcen", 80, 320 ) Local $idCheckbox = GUICtrlCreateCheckbox ( "Log mit Timestamp", 80, 400 ) Local $idCheckboxGroup = GUICtrlCreateCheckbox ( "Suche fehlende Ressourcen anhand der GroupID", 80, 360 ) GUICtrlSetOnEvent($idCheckboxGroup, "Checkbox1Click" ) Local $idCheckboxFixGroup = GUICtrlCreateCheckbox ("Adde gefundene Ressoucren mit identischer GroupID", 80, 380 ) Local $idCheckboxRef = GUICtrlCreateCheckbox ( "Lösche nicht gefundene Ressourcen ", 80, 340 ) Local $idStart = GUICtrlCreateButton("XMLs prüfen", 215, 420, 100, 25) Local $sFile1, $sFile2,$sFile3, $sFile4,$sFile5, $sFile6,$sFile7, $sFile8,$sFile9, $sFile10 GUICtrlSetState($idCheckboxUseless, $GUI_DISABLE) GUICtrlSetState($idCheckboxUseless, $GUI_CHECKED) GUICtrlSetState($idCheckboxFixGroup, $GUI_DISABLE) Func Checkbox1Click() If GUICtrlRead($idCheckboxGroup) = $GUI_CHECKED Then GUICtrlSetState($idCheckboxFixGroup, $GUI_ENABLE) Else GUICtrlSetState($idCheckboxFixGroup, $GUI_DISABLE) EndIf EndFunc GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE GUIDelete() ExitLoop Case $GUI_EVENT_DROPPED If @GUI_DropId = $dropFile_1 Then GUICtrlSetData($dropFile_1, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_2 Then GUICtrlSetData($dropFile_2, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_3 Then GUICtrlSetData($dropFile_3, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_4 Then GUICtrlSetData($dropFile_4, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_5 Then GUICtrlSetData($dropFile_5, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_6 Then GUICtrlSetData($dropFile_6, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_7 Then GUICtrlSetData($dropFile_7, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_8 Then GUICtrlSetData($dropFile_8, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_9 Then GUICtrlSetData($dropFile_9, @GUI_DragFile) ElseIf @GUI_DropId = $dropFile_10 Then GUICtrlSetData($dropFile_10, @GUI_DragFile) EndIf Case $idStart $sFile1 = GUICtrlRead($dropFile_1) $sFile2 = GUICtrlRead($dropFile_2) $sFile3 = GUICtrlRead($dropFile_3) $sFile4 = GUICtrlRead($dropFile_4) $sFile5 = GUICtrlRead($dropFile_5) $sFile6 = GUICtrlRead($dropFile_6) $sFile7 = GUICtrlRead($dropFile_7) $sFile8 = GUICtrlRead($dropFile_8) $sFile9 = GUICtrlRead($dropFile_9) $sFile10 = GUICtrlRead($dropFile_10) If GUICtrlRead($idCheckbox) = $GUI_CHECKED Then local $withLog = 1 Else local $withLog = 0 EndIf If GUICtrlRead($idCheckboxRef) = $GUI_CHECKED Then local $withRef = 1 Else local $withRef = 0 EndIf If GUICtrlRead($idCheckboxGroup) = $GUI_CHECKED Then local $withGroup = 1 Else local $withGroup = 0 EndIf If GUICtrlRead($idCheckboxFixGroup) = $GUI_CHECKED Then local $withGroupCorrect = 1 Else local $withGroupCorrect = 0 EndIf if $sFile1 <> "" Then mainStart($sFile1, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile2 <> "" Then mainStart($sFile2, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile3 <> "" Then mainStart($sFile3, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile4 <> "" Then mainStart($sFile4, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile5 <> "" Then mainStart($sFile5, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile6 <> "" Then mainStart($sFile6, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile7 <> "" Then mainStart($sFile7, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile8 <> "" Then mainStart($sFile8, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile9 <> "" Then mainStart($sFile9, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf if $sFile10 <> "" Then mainStart($sFile10, $withLog, $withRef, $withGroup, $withGroupCorrect) EndIf MsgBox($MB_SYSTEMMODAL, "checker", "Vorgang vollständig beendet. Sofern es Fehler gab, existiert ein Log") ; DropIn Felder leeren GUICtrlSetData($dropFile_1, "") GUICtrlSetData($dropFile_2, "") GUICtrlSetData($dropFile_3, "") GUICtrlSetData($dropFile_4, "") GUICtrlSetData($dropFile_5, "") GUICtrlSetData($dropFile_6, "") GUICtrlSetData($dropFile_7, "") GUICtrlSetData($dropFile_8, "") GUICtrlSetData($dropFile_9, "") GUICtrlSetData($dropFile_10, "") EndSwitch WEnd -
Enable checkbox by clicking another checkbox
apbonn replied to apbonn's topic in AutoIt General Help and Support
difficult to know what is important and what is not, it has 300 lines