Wann wird was weiß?
Beiträge von Xenobiologist
-
-
-
Hi,
ich schenke:
Eltern : GOP Karten + ne Flasche Champagne + neues Telefon
Freundin : Buch Jilliane Hoffmann Vater unser + externe HDD zur Datensicherung + ... mal sehenMega
-
-
Hi,
hier mal Bsp:
Spoiler anzeigen
[autoit]#include <Array.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <File.au3>; Testdaten
[/autoit] [autoit][/autoit] [autoit];~ For $i = 1 To 20
[/autoit] [autoit][/autoit] [autoit]
;~ FileWrite(FileOpen(@ScriptDir & '\F--_Title_01_Chapter ' & $i & '.mp3', 1), '')
;~ NextGlobal $FileList = _FileListToArray(@ScriptDir, '*.mp3')
[/autoit] [autoit][/autoit] [autoit]If (Not IsArray($FileList)) And (@error = 1) Then
[/autoit] [autoit][/autoit] [autoit]
MsgBox(0, "", "No Files\Folders Found.")
Exit
EndIfGlobal $FileList_sort[UBound($FileList)][2]
[/autoit] [autoit][/autoit] [autoit]For $i = 1 To UBound($FileList_sort, 1) - 1
[/autoit]
$FileList_sort[$i][0] = $FileList[$i]
$FileList_sort[$i][1] = Int(StringRegExpReplace($FileList[$i], '.* |\.mp3', ''))
Next
_ArrayDisplay($FileList_sort)
_ArraySort($FileList_sort, 0, 0, 0, 1)
_ArrayDisplay($FileList_sort)Mega
-
-
Hi,
die Frage ist doch : Wie sieht der gesamte Workflow aus?
Ich nutze dein Programm und will dann warum auch immer was suchen. Dann öffnest du die Suche und übergibst den Begriff?
Und dann muss es ja irgendiwie weitergehen.
Mega
-
Hi,
nimm Tabs, oder mach dir 3 GUIS und verstecke die nicht benötigten beiden beim Klick auf den jeweiligen Button
Mega
-
Warum das?
Kannts du nicht einfach so suchen?
-
Glückwunsch!!!
Halt dich wuchtig!
Mega
-
Herzlichen Glückwunsch!
Ich wünsche dir viele tolle Geschenke, eine gute Flasche Wein und entspanntes Ausschlafen morgen früh.

Mach weiter so!
Mega
-
Spoiler anzeigen
[autoit]#Include <File.au3>
[/autoit] [autoit][/autoit] [autoit]
#Include <Array.au3>Global $SongLength = 85, $songCounted=0
[/autoit] [autoit][/autoit] [autoit]
Global $directory = FileSelectFolder("Ordner auswählen aus dem die MP3-Dateien zu einer Playlist umgewandelt werden sollen: ", "", 4, "d:") & "\"Global $FileList = _FileListToArray($directory, '*.mp3')
[/autoit] [autoit][/autoit] [autoit]If (Not IsArray($FileList)) and (@error = 1) Then
[/autoit] [autoit][/autoit] [autoit]
MsgBox(0, "", "No Files\Folders Found.")
Exit
EndIf
$file = FileOpen(@DesktopDir & '\Playlist_' & @MDAY & '_' & @MON & '_' & @YEAR & '.txt', 2 +
If $file = -1 Then
[/autoit] [autoit][/autoit] [autoit]
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf; Headline
[/autoit] [autoit][/autoit] [autoit]
FileWriteLine($file, 'Nr.' & " | " & 'Song ' & "| " & 'Duration')
FileWriteLine($file, '-------------------------------------------------------------------------------------------------------')For $i = 1 To UBound($FileList) - 1
[/autoit] [autoit][/autoit] [autoit]
If StringLen($FileList[$i]) >= $SongLength Then
$songCounted = StringLeft($FileList[$i], $SongLength)
FileWriteLine($file, StringFormat('%0.3d' ,$i) & " | " & $FileList[$i] & " | " & _GetExtProperty($directory & $FileList[$i], 21))
Else
$FileList[$i] = fullfill($SongLength, $FileList[$i], ' ')
FileWriteLine($file, StringFormat('%0.3d' ,$i) & " | " & $FileList[$i] & " | " & _GetExtProperty($directory & $FileList[$i], 21))
EndIf
Next
FileWriteLine($file, '-------------------------------------------------------------------------------------------------------')
MsgBox(64, 'Info', 'Die Playlist wurde in' & @CRLF & @CRLF & _
@DesktopDir & '\Playlist_' & @MDAY & '_' & @MON & '_' & @YEAR & '.txt' & @CRLF & @CRLF & "gespeichert.")
FileClose($file)Func _GetExtProperty($sPath, $iProp)
[/autoit] [autoit][/autoit] [autoit]
Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty
$iExist = FileExists($sPath)
If $iExist = 0 Then
SetError(1)
Return 0
Else
$sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1))
$sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1)))
$oShellApp = ObjCreate("shell.application")
$oDir = $oShellApp.NameSpace ($sDir)
$oFile = $oDir.Parsename ($sFile)
If $iProp = -1 Then
Local $aProperty[35]
For $i = 0 To 34
$aProperty[$i] = $oDir.GetDetailsOf ($oFile, $i)
Next
Return $aProperty
Else
$sProperty = $oDir.GetDetailsOf ($oFile, $iProp)
If $sProperty = "" Then
Return 0
Else
Return $sProperty
EndIf
EndIf
EndIf
EndFunc ;==>_GetExtProperty; ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]
; Author: Thorsten Meger
; Script Function: Func fullfill
; ----------------------------------------------------------------------------Func fullfill($maxLength, $string, $fullFillChar)
[/autoit]
; $maxLength = maximum string size
; $fullFillChar = char to fullfill the string
While 1
If StringLen($string) < $maxLength Then
$string &= $fullFillChar
ContinueLoop
EndIf
ExitLoop
WEnd
Return $string
EndFunc ;==>fullfillProbiers mal aus

Mega
-
HI,
funktioniert es ohne Autoit?
Wie wäre ControlSend?Mega
-
Hi,
zeig die Dinge einfach anders an. (ToolTip, oder Splash, Statusbar etc.)
Oder du schreibst ein Log mit z.B. _FileWriteLogMega
-
Kein Problem.

-
-
Hi,
gib auch noch die winlock.dll.
Mega
-
Hi,
laß dir doch mal den Rückgabewert ausgeben und evtl. ein If FileExists then ... davor.
Mega
-
Such mal nach net view
Mega
-
[autoit]
For $i = 1 To UBound($splitted) -1
[/autoit]
ConsoleWrite("IniWrite('" & $splitted[$i] & "', ""section"", ""KEY"")" & @CRLF)
Next