Jump to content
Sign in to follow this  
aNewLyfe

Direct Sound Output Error

Recommended Posts

aNewLyfe

hi, i m writing a music player its almost finished.

but today i noticed something. i got an error on generic hosts bla bla on my comp then direct sound create goes.

when i play a file on wnamp it gives this error,

Posted Image

but in my player it just goes to next song then next then next until i exit or stop.

i tried _soundopen @error modes ( including @extended ) but cant get it to work.

it s not important but if anybody thinks this is easy to do then please help :P

thanks


:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Share this post


Link to post
Share on other sites
Kryptonite

Do you have the correct codecs installed?

EDIT: Typo

Edited by Kryptonite

Share this post


Link to post
Share on other sites
aNewLyfe

Do you have the correct codecs installed?

EDIT: Typo

yup but for what ? i dont need to fix this, im just asking for how to get this error on my script

like

$mSND = _SoundOpen($pathway)

if @error = 4 then msgbox(directsound create error)


:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Share this post


Link to post
Share on other sites
Kryptonite

It looks like the error is coming from Winamp and not from your system.

Perhaps autoit cannot catch this error.

Share this post


Link to post
Share on other sites
aNewLyfe

Perhaps autoit cannot catch this error.

hmm thats too bad :P but maybe with a DllCall . ?

btw tnx for replys


:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Share this post


Link to post
Share on other sites
Kryptonite

Just throwing out ideas, but maybe you could use winamp as a backend to pick up this error, like before trying to play a song in your app, it tries to run it through Winamp (A hidden window though, of course) and if this error comes up (By checking for the text in the hidden window), then you could make the alert in your script.

Probably not the most versatile idea though.

Share this post


Link to post
Share on other sites
aNewLyfe

Just throwing out ideas, but maybe you could use winamp as a backend to pick up this error, like before trying to play a song in your app, it tries to run it through Winamp (A hidden window though, of course) and if this error comes up (By checking for the text in the hidden window), then you could make the alert in your script.

Probably not the most versatile idea though.

so why i am using my script man i can use winamp :P

btw it s not so important as i said, tnx for your relation


:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Share this post


Link to post
Share on other sites
JustinReno

Why not post your code?

Share this post


Link to post
Share on other sites
aNewLyfe

Why not post your code?

sorry, my english is bad, maybe i couldnt explain my problem exactly

there isnt an error in my script, i just want to catch this error in my script.

but if u want to, of course i can post my code

here it is,

#include <GUIConstants.au3>
#include <guilist.au3>
#include <file.au3>
#include <array.au3>
#include <string.au3>
#include <sound.au3>
#include <misc.au3>
#Include <Date.au3>
#AutoIt3Wrapper_useupx = 0

Opt("GUIOnEventMode", 1)

Global $iSng
Global $playing = 0
Dim $ar
Dim $lst = @ScriptDir & "\filelist.txt"
Dim $mSND
Global $pathway
Global $timelabmode = 1
Global $mkucuk = ""
Global $skucuk = ""
Global $playmode = 1
Global $willcon = 1
Global $r
Global $time
Global $willAroll = 1
Global $willanime = 1
Global $willsetpos = 1

#Region ### START Koda GUI section ### Form=C:\Documents and Settings\eLyeL\Desktop\éasyMusic\mainform.kxf
$Form1 = GUICreate("éasyMusic v313", 691, 35, -1, 0,BitOR($WS_BORDER,$WS_POPUP),BitOR($WS_EX_TOPMOST,$WS_EX_TOOLWINDOW))
GUISetBkColor(0xA6CAF0)
$Label1 = GUICtrlCreateLabel("éasyMusic v313 Player / Generated by codegenX      --== Durduruldu ==--    ", 270, 4, 178, 27, BitOR($SS_CENTER,$SS_CENTERIMAGE), $WS_EX_STATICEDGE)
GUICtrlSetFont(-1, 9, 400, 2, "Verdana")
GUICtrlSetColor(-1,0x00F0F0)
GUICtrlSetBkColor(-1,0x000000)
GUICtrlSetOnEvent(-1, "Label1Click")
GUICtrlSetCursor (-1, 0)
$timelabel = GUICtrlCreateLabel("00:00",210,4,59,27,BitOR($SS_CENTER,$SS_CENTERIMAGE), $WS_EX_STATICEDGE)
GUICtrlSetFont(-1, 15, 800, 1, "Times New Roman")
GUICtrlSetColor(-1,0x00FF00)
GUICtrlSetBkColor(-1,0x000000)
GUICtrlSetOnEvent(-1, "timelabelClick")
GUICtrlSetCursor (-1, 0)
$Pic1 = GUICtrlCreateIcon("res\stop.ico",-1, 41, 3, 42, 28, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetOnEvent(-1, "Pic1Click")
GUICtrlSetCursor (-1, 0)
$Pic2 = GUICtrlCreateIcon("res\volumebar\vb1.ico",-1,4, 20, 7, 10, BitOR($SS_NOTIFY,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUICtrlSetOnEvent(-1, "Pic2Click")
GUICtrlSetCursor (-1, 0)
$Pic3 = GUICtrlCreateIcon("res\volumebar\vb2.ico",-1, 11, 16, 7, 14, BitOR($SS_NOTIFY,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUICtrlSetOnEvent(-1, "Pic3Click")
GUICtrlSetCursor (-1, 0)
$Pic4 = GUICtrlCreateIcon("res\volumebar\vb3.ico",-1, 18, 12, 7, 18, BitOR($SS_NOTIFY,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUICtrlSetOnEvent(-1, "Pic4Click")
GUICtrlSetCursor (-1, 0)
$Pic5 = GUICtrlCreateIcon("res\volumebar\vb4.ico",-1, 25, 8, 7, 22, BitOR($SS_NOTIFY,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUICtrlSetOnEvent(-1, "Pic5Click")
GUICtrlSetCursor (-1, 0)
$Pic6 = GUICtrlCreateIcon("res\volumebar\vb5.ico",-1, 32, 4, 7, 26, BitOR($SS_NOTIFY,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUICtrlSetOnEvent(-1, "Pic6Click")
GUICtrlSetCursor (-1, 0)
$Pic7 = GUICtrlCreateIcon("res\set.ico",-1, 167, 3, 42, 28, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetOnEvent(-1, "Pic7Click")
GUICtrlSetCursor (-1, 4)
$Pic9 = GUICtrlCreateIcon("res\back.ico",-1, 83, 3, 42, 28, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetCursor (-1, 0)
GUICtrlSetOnEvent(-1, "Pic9Click")
$Pic10 = GUICtrlCreateIcon("res\forw.ico",-1, 125, 3, 42, 28, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetOnEvent(-1, "Pic10Click")
GUICtrlSetCursor (-1, 0)
$Pic11 = GUICtrlCreateIcon("res\bar\fiestaOFF.ico",-1, 449, 3, 97, 28, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetCursor (-1, 0)
GUICtrlSetOnEvent(-1, "Pic11Click")
$Pic12 = GUICtrlCreateIcon("res\bar\postkOFF.ico",-1, 547, 3, 97, 28, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetCursor (-1, 0)
GUICtrlSetOnEvent(-1, "Pic12Click")
$Pic13 = GUICtrlCreateIcon("res\bar\exit.ico",-1, 645, 3, 42, 28, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetCursor (-1, 0)
GUICtrlSetOnEvent(-1, "Pic12Click")
GUISetState(@SW_SHOW,$Form1)
#EndRegion ### END Koda GUI section ###



#Region ### START Koda GUI section ### Form=C:\Documents and Settings\eLyeL\Desktop\éasyMusic\playlistform.kxf
$playlist = GUICreate("é Playlist", 369, 254, -1, -1,BitOR($WS_BORDER,$WS_POPUP),BitOR($WS_EX_TOPMOST,$WS_EX_TOOLWINDOW))
GUISetBkColor(0xA6CAF0)
$List1 = GUICtrlCreateList("", 8, 8, 355, 222,BitOR($WS_BORDER,$WS_VSCROLL))
GUICtrlSetOnEvent(-1, "List1Click")
GUICtrlSetFont(-1, 7, 800, 0, "Verdana")
GUICtrlSetColor(-1, 0x00FF00)
GUICtrlSetBkColor(-1, 0x000000)
$insert1 = GUICtrlCreateLabel("Klasör Ekle", 10, 228, 85, 18)
GUICtrlSetFont(-1, 9, 800, 1, "Verdana")
GUICtrlSetColor(-1, 0xFF00FF)
GUICtrlSetOnEvent(-1, "_insertClick")
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetCursor (-1, 0)
$insert2 = GUICtrlCreateLabel("Klasör Ekle", 12, 230, 85, 18)
GUICtrlSetFont(-1, 9, 800, 1, "Verdana")
GUICtrlSetOnEvent(-1, "_insertClick")
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetCursor (-1, 0)

$insert3 = GUICtrlCreateLabel("Dosya Ekle", 100, 228, 85, 18)
GUICtrlSetFont(-1, 9, 800, 1, "Verdana")
GUICtrlSetColor(-1, 0xFFFF00)
GUICtrlSetOnEvent(-1, "_insertFileClick")
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetCursor (-1, 0)
$insert4 = GUICtrlCreateLabel("Dosya Ekle", 102, 230, 85, 18)
GUICtrlSetFont(-1, 9, 800, 1, "Verdana")
GUICtrlSetOnEvent(-1, "_insertFileClick")
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetCursor (-1, 0)

$insert5 = GUICtrlCreateLabel("Listeyi Temizle", 256, 228, 120, 18)
GUICtrlSetFont(-1, 9, 800, 1, "Verdana")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetOnEvent(-1, "_ClearListClick")
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetCursor (-1, 0)
$insert6 = GUICtrlCreateLabel("Listeyi Temizle", 258, 230, 120, 18)
GUICtrlSetFont(-1, 9, 800, 1, "Verdana")
GUICtrlSetOnEvent(-1, "_ClearListClick")
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetCursor (-1, 0)

GUICtrlSetState($list1,$GUI_hide)
GUICtrlSetState($insert1,$GUI_hide)
GUICtrlSetState($insert2,$GUI_hide)
GUICtrlSetState($insert3,$GUI_hide)
GUICtrlSetState($insert4,$GUI_hide)
GUICtrlSetState($insert5,$GUI_hide)
GUICtrlSetState($insert6,$GUI_hide)
#EndRegion ### END Koda GUI section ###

#Region ### START Koda GUI section ### Form=c:\documents and settings\313\desktop\éasymusic\setupform.kxf
$ayarform = GUICreate("Ayarlar", 445, 470, -1, -1, $WS_BORDER,$WS_EX_TOPMOST)
GUISetBkColor(0xA6CAF0)
$Tab1 = GUICtrlCreateTab(8, 8, 425, 401,BitOR($TCS_BUTTONS,$TCS_FLATBUTTONS),$WS_EX_STATICEDGE)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("Genel Ayarlar")
GUICtrlSetState(-1,$GUI_SHOW)
$Group1 = GUICtrlCreateGroup("", 24, 40, 393, 353)
$al2 = GUICtrlCreateLabel("Dil                     :", 56, 82, 88, 17)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$dilcombo = GUICtrlCreateCombo("Türkçe (TR)", 152, 80, 185, 25,$CBS_DROPDOWNLIST)
$splash = GUICtrlCreateCheckbox("Açılış Resmini Göster", 56, 112, 225, 17)
$multiac = GUICtrlCreateCheckbox("Çoklu Açmaya İzin Ver", 56, 128, 201, 17)
$checknew = GUICtrlCreateCheckbox("Açılışta Yeni Version Kontrolü Yap", 56, 144, 233, 17)
$al3 = GUICtrlCreateLabel("Görünüm Ayarları :", 56, 168, 90, 17)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$baslatgoster = GUICtrlCreateRadio("Başlat Menüsünde Göster", 56, 192, 185, 17)
$systraygoster = GUICtrlCreateRadio("System Trayda Göster", 56, 208, 177, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$gosterme = GUICtrlCreateRadio("Gösterme", 56, 224, 73, 17)
$rollbaslatmenu = GUICtrlCreateCheckbox("Başlat Menüsünde Parça İsmini Kaydır", 56, 240, 249, 17)
$systrayparcaismi = GUICtrlCreateCheckbox("System Trayda Parça İsmini Göster", 56, 256, 241, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$kisaexit = GUICtrlCreateCheckbox("CTRL + X Bastığımda Kapat", 56, 272, 249, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$al1 = GUICtrlCreateLabel("Genel :", 48, 58, 45, 17)
GUICtrlSetFont(-1, 7, 800, 4, "MS Sans Serif")
$al4 = GUICtrlCreateLabel("Oynatma :", 48, 320, 61, 17)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1, 7, 800, 4, "MS Sans Serif")
$continue = GUICtrlCreateCheckbox("Parça Bittiğinde Sıradakini Çal", 56, 344, 193, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$shuffle = GUICtrlCreateCheckbox("Karışık Çal", 56, 360, 137, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet2 = GUICtrlCreateTabItem("Playlist / Ana Pencere Ayarlar")
$Group2 = GUICtrlCreateGroup("", 24, 40, 393, 353)
$al9 = GUICtrlCreateLabel("Playlist Font Boyutu    :", 56, 210, 120, 17)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$plwfontsize = GUICtrlCreateInput("7", 184, 208, 41, 21)
$al10 = GUICtrlCreateLabel("Playlist Fontu               :", 56, 235, 120, 17)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$plwfont = GUICtrlCreateCombo("", 184, 232, 185, 25,$CBS_DROPDOWNLIST)
GUICtrlSetData(-1,"Arial|Comic Sans MS|Courier|Fixedsys|Franklin Gothic Medium|Georgia|Impact|Lucida Console|Microsoft Sans Serif|MS Serif|Palatino Linotype|Sylfaen|System|Tahoma|Times New Roman|Trebuchet MS|Verdana","Verdana")
$al11 = GUICtrlCreateLabel("Playlist Font Rengi      :", 56, 259, 121, 17)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$plwfontcolor = GUICtrlCreateButton("Renk Seç", 184, 256, 185, 22)
GUICtrlSetOnEvent(-1,"_pickplwfontcolor")
$al12 = GUICtrlCreateLabel("Playlist Arka Plan Rengi :", 56, 283, 122, 17)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$plwfontbkcolor = GUICtrlCreateButton("Renk Seç", 184, 280, 185, 22)
GUICtrlSetOnEvent(-1,"_pickplwfontbkcol")
$animateplw = GUICtrlCreateCheckbox("Playlist Animasyonla Açılsın / Kapansın", 56, 312, 241, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$hideplw = GUICtrlCreateCheckbox("Playlisti Herzaman Gizle", 56, 328, 217, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$setposplw = GUICtrlCreateCheckbox("Playlisti Ana Pencereye Hizala", 56, 344, 233, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$playonclick = GUICtrlCreateCheckbox("Parçanın Üzerine Tıkladığımda Çal", 56, 360, 209, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$al8 = GUICtrlCreateLabel("Playlist :", 48, 184, 52, 17)
GUICtrlSetFont(-1, 7, 800, 4, "MS Sans Serif")
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$al5 = GUICtrlCreateLabel("Ana Pencere :", 48, 58, 85, 17)
GUICtrlSetFont(-1, 7, 800, 4, "MS Sans Serif")
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$al6 = GUICtrlCreateLabel("Arkaplan Rengi            :", 56, 83, 119, 17)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$anapenrenk = GUICtrlCreateButton("Renk Seç", 184, 80, 185, 22)
$alontop = GUICtrlCreateCheckbox("Herzaman Üstte", 56, 104, 153, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$anapenroll = GUICtrlCreateCheckbox("Parça İsmini Kaydır", 56, 120, 193, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$al7 = GUICtrlCreateLabel("Pozisyon                    :", 56, 144, 118, 17)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$ust = GUICtrlCreateRadio("Üst", 184, 144, 41, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$alt = GUICtrlCreateRadio("Alt", 232, 144, 33, 17)
$baslatust = GUICtrlCreateRadio("Başlat Üstü", 280, 144, 81, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet3 = GUICtrlCreateTabItem("FiestaBot / PostKasar Setup")
$Group4 = GUICtrlCreateGroup("", 24, 40, 393, 353)
$al15 = GUICtrlCreateLabel("FiestaBot :", 48, 58, 65, 17)
GUICtrlSetFont(-1, 7, 800, 4, "MS Sans Serif")
$usefiesta = GUICtrlCreateCheckbox("Fiesta Bot Kullan", 56, 80, 177, 17)
$firstpostkasar = GUICtrlCreateCheckbox("PostKasar a Öncelik Ver", 56, 96, 193, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$censoreklam = GUICtrlCreateCheckbox("Reklamları Sansürle", 56, 112, 193, 17)
$relogon30 = GUICtrlCreateCheckbox("30dk Dolduğunda Relog At", 56, 128, 241, 17)
$al16 = GUICtrlCreateLabel("Post Kasar :", 48, 168, 73, 17)
GUICtrlSetFont(-1, 7, 800, 4, "MS Sans Serif")
$al17 = GUICtrlCreateLabel("Gönderilicek Mesaj :", 56, 195, 100, 17)
$pkmesaj = GUICtrlCreateInput("Paylaşım için teşekkürler...", 160, 192, 185, 21)
$al18 = GUICtrlCreateLabel("Sayfa Aralığı            :", 56, 219, 101, 17)
$pksayfa = GUICtrlCreateCombo("1-50 Sayfalar", 160, 216, 185, 25)
$al19 = GUICtrlCreateLabel("Spam Aralığı         :", 56, 243, 101, 17)
$pksleep = GUICtrlCreateCombo("1 Dakika", 160, 240, 185, 25)
$yazilanayazma = GUICtrlCreateCheckbox("Yazılan Konulara Birdaha Yazma", 56, 272, 289, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$yazmabitincedurdur = GUICtrlCreateCheckbox("Yazma İşlemi Bitince PostKasar ı Durdur (Önerilir)", 56, 288, 297, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$rastgelerep = GUICtrlCreateCheckbox("Rasgele Kullanıcıya Rep Puanı Ver", 56, 304, 249, 17)
$ifpmthenstop = GUICtrlCreateCheckbox("Özel Mesaj Alınırsa PostKasar ı Durdur", 56, 320, 273, 17)
$ifmoderatorthenyazma = GUICtrlCreateCheckbox("Konuda Moderator Varsa Yazma", 56, 336, 273, 17)
$ifquotethenstop = GUICtrlCreateCheckbox("Mesajımdan Alıntı Yapılırsa PostKasar ı Durdur", 56, 352, 273, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateTabItem("")
$maincancel = GUICtrlCreateButton("Iptal", 358, 414, 75, 25, 0)
$mainok = GUICtrlCreateButton("Tamam", 280, 414, 75, 25, 0)

GUICtrlSetOnEvent($mainok,"_applysets")
GUICtrlSetOnEvent($anapenrenk,"_renksec")
GUICtrlSetLimit($plwfontsize,2)
#EndRegion ### END Koda GUI section ###

SoundSetWaveVolume(100)

$topin = _GUICtrlListGetTopIndex($list1)
_GUICtrlListSelectIndex($list1,$topin)


if FileExists(@ScriptDir&"\filelist.txt") Then
    Dim $AudF2
    $filelistpath = _FileReadToArray(@ScriptDir&"\filelist.txt",$AudF2)
    If IsArray($AudF2) Then
    For $i = 1 To $AudF2[0]
        $ss = StringSplit ($AudF2[$i], "\")
        _GUICtrlListAddItem ($List1,$i&". "&_StringProper(StringTrimRight ($ss[$ss[0]], 4)))
    Next
        _GUICtrlListSelectIndex ($List1, 0)
        $cnt = _GUICtrlListCount ($List1)
        _GUICtrlListDeleteItem($List1,$cnt-1)
    EndIf
EndIf

While 1
    Sleep(250)
    if $willAroll = 1 Then
    scrolltitle()
    EndIf
    
if $playing = 1 Then
    if $willcon = 1 Then
        if _SoundPos($mSND, 1) = _SoundLength($mSND,1) Then
            Pic10Click()
        EndIf
    elseif $willcon = 0 Then
        if _SoundPos($mSND,1) = _SoundLength($mSND,1) Then
        GUICtrlSetData($Label1,$r&" ("&$time&")"&"    --== Durdu ==--     ")
        _SoundSeek($mSND,"0","0","0/1")
        EndIf
    EndIf
    
    $slength = _SoundLength($mSND,1)
    $spos = _SoundPos($mSND,1)
    $slengthview = StringTrimLeft($slength,3)
    $sposview = StringTrimLeft($spos,3)
    if $timelabmode = 1 Then
        GUICtrlSetData($timelabel,$sposview)
    elseif $timelabmode = 2 Then
        $pos = _SoundPos($mSND, 2)
        $len = _SoundLength($mSND,2)
        $mainremtime = $len-$pos
        Dim $hour, $min, $sec
        _TicksToTime($mainremtime,$hour,$min,$sec)
        if $min < 10 Then
            $mkucuk = "0"
        Else
            $mkucuk = ""
        EndIf
        if $sec < 10 Then
            $skucuk = "0"
        Else
            $skucuk = ""
        EndIf
            
        GUICtrlSetData($timelabel,$mkucuk&$min&":"&$skucuk&$sec)
        
    EndIf
    
EndIf

WEnd

Func List1Click()
        $r = GUICtrlRead ($List1)
        $222 = StringTrimLeft($r,5)
        If $222 = "" Then Return
        _FileReadToArray($lst,$ar)
        $s = _ArraySearch ($ar, $222, 0, 0, 0, True)
        $pathway = FileReadLine($lst, $s)
        _SoundClose($mSND)
        $mSND = _SoundOpen($pathway)
        _SoundPlay($mSND)
        $time = StringTrimLeft(_SoundLength($mSND,1),3)
        GUICtrlSetData($Label1,$r&" ("&$time&")"&"    --== Çalıyor ==--     ")
        GUICtrlSetImage($Pic1,@ScriptDir&"\res\play.ico",-1)
        if GUICtrlRead($systrayparcaismi) = $GUI_CHECKED Then
        TraySetToolTip($r&" ("&$time&")"&" - éasyMusic")
        Else
        TraySetToolTip("éasyMusic a.k.a. 313 ToolZ")
        EndIf
        $playing = 1
EndFunc

Func _insertClick()
    WinSetOnTop($Form1,"",0)
    WinSetOnTop($playlist,"",0)
    
    $AudF = _SubDirFileListToArray("*.wav;*.mp3","Eklemek Istediğiniz Klasörü Seçin.. ")
    If IsArray($AudF) Then
    For $i = 1 To $AudF[0]
        $ss = StringSplit ($AudF[$i], "\")
    Next
    $str1 = _ArrayToString ($AudF, @CRLF, 1)
    $str2 = _StringInsert($str1,@CRLF,StringLen($str1))
    FileWrite(@ScriptDir&"\filelist.txt",$str2)
    $total = _FileCountLines(@ScriptDir&"\filelist.txt")
    GUICtrlSetData ($Label1, $total & " Dosya Listeye Eklendi..   --== Durduruldu ==--    ")
    _GUICtrlListClear($List1)
    Dim $AudF2
    $filelistpath = _FileReadToArray(@ScriptDir&"\filelist.txt",$AudF2)
    If IsArray($AudF2) Then
    For $i = 1 To $AudF2[0]
        $ss = StringSplit ($AudF2[$i], "\")
        _GUICtrlListAddItem ($List1,$i&". "&_StringProper(StringTrimRight ($ss[$ss[0]], 4)))
    Next
        _GUICtrlListSelectIndex ($List1, 0)
        $cnt = _GUICtrlListCount ($List1)
        _GUICtrlListDeleteItem($List1,$cnt-1)
    EndIf
    _GUICtrlListSelectIndex ($List1, 0)
    EndIf
    
    
    WinSetOnTop($Form1,"",1)
    WinSetOnTop($playlist,"",1)
EndFunc

Func _insertFileClick()
    $fod = FileOpenDialog ("Müzik Dosyası Seçin", @HomeDrive, "Müzik Dosyası (*.mp3;*.wav)", 4)
    If @error = 1 Then Return
    $ss = StringSplit ($fod, "\")
    $Mss = StringSplit ($fod, "|")
    If @error = 1 Then
        $o = FileOpen ($lst, 1)
        FileWrite ($o, $fod & @CRLF)
        FileClose ($o)
        _GUICtrlListClear($List1)
        Dim $AudF2
    $filelistpath = _FileReadToArray(@ScriptDir&"\filelist.txt",$AudF2)
    If IsArray($AudF2) Then
    For $i = 1 To $AudF2[0]
        $ss = StringSplit ($AudF2[$i], "\")
        _GUICtrlListAddItem ($List1,$i&". "&_StringProper(StringTrimRight ($ss[$ss[0]], 4)))
    Next
        _GUICtrlListSelectIndex ($List1, 0)
        $cnt = _GUICtrlListCount ($List1)
        _GUICtrlListDeleteItem($List1,$cnt-1)
    EndIf
    _GUICtrlListSelectIndex ($List1, 0)
    Else
        $o = FileOpen ($lst, 1)
        $SDir = $Mss[1] & "\"
        For $i = 2 To $Mss[0]
            FileWrite ($o, $Mss[1] & "\" & $Mss[$i] & @CRLF)
        Next
        FileClose ($o)
        _GUICtrlListClear($List1)
        Dim $AudF2
    $filelistpath = _FileReadToArray(@ScriptDir&"\filelist.txt",$AudF2)
    If IsArray($AudF2) Then
    For $i = 1 To $AudF2[0]
        $ss = StringSplit ($AudF2[$i], "\")
        _GUICtrlListAddItem ($List1,$i&". "&_StringProper(StringTrimRight ($ss[$ss[0]], 4)))
    Next
        _GUICtrlListSelectIndex ($List1, 0)
        $cnt = _GUICtrlListCount ($List1)
        _GUICtrlListDeleteItem($List1,$cnt-1)
    EndIf
    _GUICtrlListSelectIndex ($List1, 0)
    EndIf
    _GUICtrlListSelectIndex ($List1, 0)
EndFunc

Func _ClearListClick()
    _GUICtrlListClear($List1)
    FileDelete(@ScriptDir&"\filelist.txt")
EndFunc

Func exxx()
    Exit
EndFunc

Func Label1Click()
$state2 = WinGetState($playlist)
If BitAnd($state2,2) Then
    if $willanime = 1 Then
    $plw = WinGetPos($Form1)
    if $willsetpos = 1 Then
        $xpos = $plw[0]+142
        $ypos = $plw[1]+37
    Else
        $xpos = Random(20,@DesktopWidth-372)
        $ypos = Random(80,@DesktopHeight-286)
    EndIf
    WinMove($playlist,"",$xpos,$ypos)
    for $iHh = 254 to 1 Step -8
    GUISetState(@SW_SHOW,$playlist)
    GUICtrlSetState($list1,$GUI_hide)
    GUICtrlSetState($insert1,$GUI_hide)
    GUICtrlSetState($insert2,$GUI_hide)
    GUICtrlSetState($insert3,$GUI_hide)
    GUICtrlSetState($insert4,$GUI_hide)
    GUICtrlSetState($insert5,$GUI_hide)
    GUICtrlSetState($insert6,$GUI_hide)
    WinMove($playlist,"",$xpos,$ypos,369,$iHh)
    Sleep(10)
    Next
    GUISetState(@SW_HIDE,$playlist)
    Else
    $plw = WinGetPos($Form1)
    if $willsetpos = 1 Then
        $xpos = $plw[0]+142
        $ypos = $plw[1]+37
    Else
        $xpos = Random(20,@DesktopWidth-372)
        $ypos = Random(80,@DesktopHeight-286)
    EndIf
    WinMove($playlist,"",$xpos,$ypos)
    GUICtrlSetState($list1,$GUI_hide)
    GUICtrlSetState($insert1,$GUI_hide)
    GUICtrlSetState($insert2,$GUI_hide)
    GUICtrlSetState($insert3,$GUI_hide)
    GUICtrlSetState($insert4,$GUI_hide)
    GUICtrlSetState($insert5,$GUI_hide)
    GUICtrlSetState($insert6,$GUI_hide)
    WinMove($playlist,"",$xpos,$ypos,369,1)
    GUISetState(@SW_HIDE,$playlist)
    EndIf
Else
    if $willanime = 1 Then
    $plw = WinGetPos($Form1)
    if $willsetpos = 1 Then
        $xpos = $plw[0]+142
        $ypos = $plw[1]+37
    Else
        $xpos = Random(20,@DesktopWidth-372)
        $ypos = Random(80,@DesktopHeight-286)
    EndIf
    WinMove($playlist,"",$xpos,$ypos)
    for $iHs = 1 to 254 Step 8
    GUISetState(@SW_SHOW,$playlist)
    WinMove($playlist,"",$xpos,$ypos,369,$iHs)
    Sleep(10)
    Next
    GUICtrlSetState($list1,$GUI_SHOW)
    GUICtrlSetState($insert1,$GUI_SHOW)
    GUICtrlSetState($insert2,$GUI_SHOW)
    GUICtrlSetState($insert3,$GUI_SHOW)
    GUICtrlSetState($insert4,$GUI_SHOW)
    GUICtrlSetState($insert5,$GUI_SHOW)
    GUICtrlSetState($insert6,$GUI_SHOW)
    Else
    $plw = WinGetPos($Form1)
    if $willsetpos = 1 Then
        $xpos = $plw[0]+142
        $ypos = $plw[1]+37
    Else
        $xpos = Random(20,@DesktopWidth-372)
        $ypos = Random(80,@DesktopHeight-286)
    EndIf
    WinMove($playlist,"",$xpos,$ypos)
    WinMove($playlist,"",$xpos,$ypos,369,254)
    GUICtrlSetState($list1,$GUI_SHOW)
    GUICtrlSetState($insert1,$GUI_SHOW)
    GUICtrlSetState($insert2,$GUI_SHOW)
    GUICtrlSetState($insert3,$GUI_SHOW)
    GUICtrlSetState($insert4,$GUI_SHOW)
    GUICtrlSetState($insert5,$GUI_SHOW)
    GUICtrlSetState($insert6,$GUI_SHOW)
    GUISetState(@SW_SHOW,$playlist)
    EndIf
EndIf
EndFunc

Func timelabelClick()
    if $timelabmode = 1 Then
        Global $timelabmode = 2
    elseif $timelabmode = 2 Then
        Global $timelabmode = 1
    EndIf
EndFunc

Func Pic1Click()
if _GUICtrlListGetAnchorIndex($List1) = 0 Then
    Sleep(10)
    Else
    if $playing = 0 Then
        $r = GUICtrlRead ($List1)
        _SoundClose($mSND)
        $222 = StringTrimLeft($r,5)
        If $222 = "" Then Return
        _FileReadToArray($lst,$ar)
        $s = _ArraySearch ($ar, $222, 0, 0, 0, True)
        $pathway = FileReadLine($lst, $s)
        $mSND = _SoundOpen($pathway)
        _SoundPlay($mSND)
        $time = StringTrimLeft(_SoundLength($mSND,1),3)
        GUICtrlSetData($Label1,$r&" ("&$time&")"&"    --== Çalıyor ==--     ")
        GUICtrlSetImage($Pic1,@ScriptDir&"\res\play.ico",-1)
        if GUICtrlRead($systrayparcaismi) = $GUI_CHECKED Then
        TraySetToolTip($r&" ("&$time&")"&" - éasyMusic")
        Else
        TraySetToolTip("éasyMusic a.k.a. 313 ToolZ")
        EndIf
        Global $playing = 1
        Elseif $playing = 1 Then
        _SoundPause($mSND)
        $r = GUICtrlRead ($List1)
        $time = StringTrimLeft(_SoundLength($mSND,1),3)
        GUICtrlSetData($Label1,$r&" ("&$time&")"&"    --== Duraklatıldı ==--    ")
        GUICtrlSetImage($Pic1,@ScriptDir&"\res\pause.ico",-1)
        Global $playing = 2
        ElseIf $playing = 2 Then
        _SoundResume($mSND)
        $r = GUICtrlRead ($List1)
        $time = StringTrimLeft(_SoundLength($mSND,1),3)
        GUICtrlSetData($Label1,$r&" ("&$time&")"&"    --== Çalıyor ==--     ")
        GUICtrlSetImage($Pic1,@ScriptDir&"\res\play.ico",-1)
        Global $playing = 1
    EndIf
EndIf
EndFunc

Func Pic2Click()
    GUICtrlSetImage($Pic3,"res\volumebar\vb2_2.ico",-1)
    GUICtrlSetImage($Pic4,"res\volumebar\vb3_2.ico",-1)
    GUICtrlSetImage($Pic5,"res\volumebar\vb4_2.ico",-1)
    GUICtrlSetImage($Pic6,"res\volumebar\vb5_2.ico",-1)
    SoundSetWaveVolume(10)
EndFunc
Func Pic3Click()
    GUICtrlSetImage($Pic3,"res\volumebar\vb2.ico",-1)
    GUICtrlSetImage($Pic4,"res\volumebar\vb3_2.ico",-1)
    GUICtrlSetImage($Pic5,"res\volumebar\vb4_2.ico",-1)
    GUICtrlSetImage($Pic6,"res\volumebar\vb5_2.ico",-1)
    SoundSetWaveVolume(25)
EndFunc
Func Pic4Click()
    GUICtrlSetImage($Pic3,"res\volumebar\vb2.ico",-1)
    GUICtrlSetImage($Pic4,"res\volumebar\vb3.ico",-1)
    GUICtrlSetImage($Pic5,"res\volumebar\vb4_2.ico",-1)
    GUICtrlSetImage($Pic6,"res\volumebar\vb5_2.ico",-1)
    SoundSetWaveVolume(50)
EndFunc
Func Pic5Click()
    GUICtrlSetImage($Pic3,"res\volumebar\vb2.ico",-1)
    GUICtrlSetImage($Pic4,"res\volumebar\vb3.ico",-1)
    GUICtrlSetImage($Pic5,"res\volumebar\vb4.ico",-1)
    GUICtrlSetImage($Pic6,"res\volumebar\vb5_2.ico",-1)
    SoundSetWaveVolume(75)
EndFunc
Func Pic6Click()
    GUICtrlSetImage($Pic3,"res\volumebar\vb2.ico",-1)
    GUICtrlSetImage($Pic4,"res\volumebar\vb3.ico",-1)
    GUICtrlSetImage($Pic5,"res\volumebar\vb4.ico",-1)
    GUICtrlSetImage($Pic6,"res\volumebar\vb5.ico",-1)
    SoundSetWaveVolume(100)
EndFunc
Func Pic7Click()
    WinSetOnTop($Form1,"",0)
    WinSetOnTop($playlist,"",0)
    GUISetState(@SW_SHOW,$ayarform)
EndFunc

Func Pic9Click()
    $playing = 0
    $si = _GUICtrlListSelectedIndex ($list1)
    $cnt = _GUICtrlListCount ($List1)
    
    If $si = 0 Then
        _GUICtrlListSelectIndex ($List1, $cnt-1)
        Pic1Click()
    Return
    EndIf
    
    If $playmode = 2 Then
        _GUICtrlListSelectIndex ($List1, Random (1, $cnt))
        Pic1Click()
        Return
    Else
        _GUICtrlListSelectIndex ($List1, $si - 1)
    $si = _GUICtrlListSelectedIndex ($list1)
    Pic1Click()
    EndIf
    
EndFunc

Func Pic10Click()
    $playing = 0
    $si = _GUICtrlListSelectedIndex ($list1)
    $cnt = _GUICtrlListCount ($List1)
    
    If $cnt = $si+1 Then
        _GUICtrlListSelectIndex ($List1, 0)
        Pic1Click()
        Return
    EndIf
    
    If $playmode = 2 Then
        _GUICtrlListSelectIndex ($List1, Random (1, $cnt))
        Pic1Click()
        Return
    Else
        _GUICtrlListSelectIndex ($List1, $si + 1)
    $si = _GUICtrlListSelectedIndex ($list1)
    Pic1Click()
    EndIf
    
EndFunc

Func Pic11Click()
EndFunc

Func Pic12Click()
EndFunc

Func _renksec()
    WinSetOnTop($ayarform,"",0)
    $Pickcolor = _ChooseColor (2, 0x0000FF, 1)
    If (@error) Then
        Sleep(10)
    Else
        GUICtrlSetData($anapenrenk,$Pickcolor)
        GUICtrlSetColor($anapenrenk,$Pickcolor)
    EndIf
    WinSetOnTop($ayarform,"",1)
EndFunc

Func _pickplwfontcolor()
    WinSetOnTop($ayarform,"",0)
    $Pickcolor = _ChooseColor (2, 0x0000FF, 1)
    If (@error) Then
        Sleep(10)
    Else
        GUICtrlSetData($plwfontcolor,$Pickcolor)
        GUICtrlSetColor($plwfontcolor,$Pickcolor)
    EndIf
    WinSetOnTop($ayarform,"",1)
EndFunc

Func _pickplwfontbkcol()
    WinSetOnTop($ayarform,"",0)
    $Pickcolor = _ChooseColor (2, 0x0000FF, 1)
    If (@error) Then
        Sleep(10)
    Else
        GUICtrlSetData($plwfontbkcolor,$Pickcolor)
        GUICtrlSetColor($plwfontbkcolor,$Pickcolor)
    EndIf
    WinSetOnTop($ayarform,"",1)
EndFunc

Func _applysets()
    $mwcolor = GUICtrlRead($anapenrenk)
    if $mwcolor = "Renk Seç" Then
        Sleep(10)
    Else
        GUISetBkColor($mwcolor,$Form1)
        GUISetBkColor($mwcolor,$playlist)
        GUISetBkColor($mwcolor,$ayarform)
    EndIf
    
    $plwFcolor = GUICtrlRead($plwfontcolor)
    if $plwFcolor = "Renk Seç" Then
        Sleep(10)
    Else
        GUICtrlSetColor($List1,$plwFcolor)
    EndIf
    
    $plwBKcolor = GUICtrlRead($plwfontbkcolor)
    if $plwBKcolor = "Renk Seç" Then
        Sleep(10)
    Else
        GUICtrlSetBkColor($List1,$plwBKcolor)
    EndIf
    
    if GUICtrlRead($shuffle) = $GUI_CHECKED Then
        $playmode = 2
    Else
        $playmode = 1
    EndIf
    
    if GUICtrlRead($kisaexit) = $GUI_CHECKED Then
        HotKeySet("^x","exxx")
    Else
        HotKeySet("^x","_doNothing")
    EndIf
    
    if GUICtrlRead($continue) = $GUI_CHECKED Then
        $willcon = 1
    Else
        $willcon = 0
    EndIf
    
    if GUICtrlRead($alontop) = $GUI_CHECKED Then
        WinSetOnTop($Form1,"",1)
        WinSetOnTop($playlist,"",1)
    Else
        WinSetOnTop($Form1,"",0)
        WinSetOnTop($playlist,"",0)
    EndIf
    
    if GUICtrlRead($anapenroll) = $GUI_CHECKED Then
        $willAroll = 1
    Else
        $willAroll = 0
    EndIf
        
    $fontsize = GUICtrlRead($plwfontsize)
    $fontname = GUICtrlRead($plwfont)
    GUICtrlSetFont($List1, $fontsize, 800, 0, $fontname)
    
    if GUICtrlRead($animateplw) = $GUI_CHECKED Then
        $willanime = 1
    Else
        $willanime = 0
    EndIf
    
    if GUICtrlRead($setposplw) = $GUI_CHECKED Then
        $willsetpos = 1
    Else
        $willsetpos = 0
    EndIf
    
    
    
    GUISetState(@SW_HIDE,$ayarform)
    WinSetOnTop($Form1,"",1)
    WinSetOnTop($playlist,"",1)
EndFunc

Func _doNothing()
EndFunc

Func scrolltitle()
        $text=GUICtrlRead($Label1)
        $split=StringSplit($text,"")
        $temp=$split[1]
        $color1 = "000"
        $color2 = "999"
        For $i=1 To $split[0]-1
            $split[$i]=$split[$i+1]
        Next
        $split[$i]=$temp
        $msg=""
        For $i=1 To $split[0]
            $msg=$msg&$split[$i]
            Next
        GUICtrlSetData($Label1,$msg)
EndFunc

;~ Func setplaylistpos()
;~  $state = WinGetState($playlist)
;~  If BitAnd($state,2) Then
;~  $plw = WinGetPos($Form1)
;~  WinMove($playlist,"",$plw[0]+1,$plw[1]+36)
;~ EndIf
;~ EndFunc

Func _SubDirFileListToArray($filter = "*.*",$dtext = "",$rootdir = "",$flag = "",$initialdir ="");=== now supports multiple filters "*.xyz;*.abc"
    Dim $list[1]=[0]
    $fsf = FileSelectFolder ($dtext,$rootdir,$flag,$initialdir)
    If @error = 1 Then Return
    $sFilter = StringSplit($filter,";")
    If @error = 1 Then
    $sFilter[0]= 1
    $sFilter[1]=$filter
    EndIf
    For $y =  1 To $sFilter[0]
    $fla1 = _FileListToArray ($fsf, $sFilter[$y], 1)
    If @error = 2 Then Return 0
    If IsArray ($fla1) Then
        For $i = 1 To $fla1[0]
        _ArrayAdd ($list, $fsf&"\"&$fla1[$i])
        Next
    EndIf
    $DLTA = _DirListToArray($fsf)
     If IsArray ($DLTA) Then
        For $i = 1 To $DLTA[0]
        $fla = _FileListToArray ($DLTA[$i],$sFilter[$y], 1)
            If IsArray ($fla) Then
                For $x = 1 To $fla[0]
                    _ArrayAdd ($list,  $DLTA[$i]&"\"&$fla[$x])
                Next
            EndIf
        Next
    EndIf
    Next
        $list [0] = UBound ($list) - 1
        Return $list
EndFunc
    
Func _DirListToArray($sPath);======= By: MsCreatoR
    Local $i, $j, $rlist[1]=[0], $blist, $alist=_FileListToArray ($sPath, '*', 2)
    If IsArray ($alist) Then
        For $i=1 To $alist [0]
            _ArrayAdd ($rlist, $sPath & "\" & $alist [$i])
            $blist = _DirListToArray ($sPath & "\" & $alist [$i])
            If $blist[0]>0 Then
                For $j=1 To $blist [0]
                    _ArrayAdd ($rlist, $blist [$j])
                Next
            EndIf
        Next
    EndIf
    $rlist [0] = UBound ($rlist) - 1
    Return $rlist
EndFunc 

Func _gettag()

EndFunc

its almost in my language

Edited by mistakilla

:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×