Jump to content

zPlayer - My own little audio/video player


Recommended Posts

Starting at line 34 I have:

Else
    $playList = _FileListToArrayRec($sFolder, StringReplace("*." & $fileTypes, " ", ";*."))
    If Not IsArray($playlist) Then
        MsgBox(0, "", "This program should reside in the driectory where video files are located.")
        Exit
    EndIf
    $playList[0] = $playList[1]
    $currentFile = $playList[0]
    $playID = 1
EndIf
 

is this correct?

 

After I save the file into the video directory I can run it and the buttons work!

I'll move the compiled program to the laptop I'm using (until the tablet arrives) and try it with my TV as the video output source.  I should be able to get it tested later tonight.

Thanks,

Carl

Link to post
Share on other sites
  • Replies 119
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

zPlayer is the name I used when I introduced the early version of this player in my blog back in early 2009 and, therefore, has nothing to do with the mobile media player of the same name which starte

It's great to see that you did it. I enjoyed helping you help your dad. Cheers to you and your daddy! GUICtrlSetFont(-1, $vcWidth/8, 900) I like this. Good job!

I have my "final" version!  (yes, I know what a joke that is . . .) It works and my dad can Play-Paus easily with the giant button filling most of the 10.1" display on his tablet.  Here is the cu

Posted Images

Under the current setup, you will have to drag the video window to the 2nd monitor manually. You can try to let the video start in the 2nd monitor automatically by changing the left of $videoGUI to the @DesktopWidth of the tablet at its creation time. I didn't test this and I will be interested in knowing how it performs.
 

Global $videoGUI = GUICreate("zPlayer Video Control", $videoWidth, $videoHeight, @DesktopWidth, -1, $WS_OVERLAPPEDWINDOW)

 

Link to post
Share on other sites

zPlayer uses Windows Media Player embedded in Internet Explorer. Take a look at Func MyWMPlayer() at the end of the code. You wanted to have a bare-bone video player and this is what it is. You can add other functions if you want to.

I tested automatic display of video window in the 2nd monitor and it worked perfectly. Of course, the 2nd monitor must be set as an extension for this to work.

Link to post
Share on other sites

That check is good (and it works).  

The Monk videos I have contain the English audio on track 2 and the English captions on the second channel.  I've been unable to get WMP to show me the subtitles, but they are visible in the VLC player.  Is there any way for me to substitute the VLC player for the call to WMP?

My tablet is supposed to be here next Monday (instead of today, as promised), so I've been tweaking button sizes to make the exit button much smaller (and harder to  accidently hit).

 

Later,

Carl

Link to post
Share on other sites

I have no experience with VLC. You could probably control VLC through generic Send("{MEDIA_*}") keys.

For Windows Media Player, you may be able to solve the problems with plugins, but my experience is limited to local subtitle plugin, which worked OK. I'm sorry I can't help you further. Unfortunately I don't have a file with 2nd track and 2nd channel, so I'm undable to do a study.

Edited by CYCho
Link to post
Share on other sites

My initial searches for how to start experiments with the send media keys was unsuccessful.  I was unable to locate the starting point as how to invoke the media player so I could send keys/commands to it.  Are there some search terms that would help me to find that starting point?  

Thanks,
Carl

Link to post
Share on other sites

Below is a quick and dirty version that uses VLC. Please give it a try.
 

; File name: zPlayer-VLC.au3
#include <File.au3>
#include <Array.au3>
#include <GuiConstants.au3>

Opt("WinTitleMatchMode", 2)

HotKeySet("^!{END}", "MyExit")

$vlcPath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\vlc.exe", "")
If $vlcPath = "" Then Exit MsgBox(0, "", "VLC is not installed!")

Global $fileTypes = "mp4 wmv avi mkv flv webM"
Global $aList, $guiMsg, $lPaused

;If Not FileExists(@ScriptDir & "\VLC-Playlist.txt") Then
    $aList = _FileListToArrayRec(@ScriptDir, StringReplace("*." & $fileTypes, " ", ";*."), 1, 0, 0, 2)
    If Not IsArray($aList) Then
        MsgBox(0, "", "This program should reside in the driectory where video files are located.")
        Exit
    EndIf

    Global $playList = ''
    $playList &= '<?xml version="1.0" encoding="UTF-8"?>' & @CR
    $playList &= '<playlist xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/" version="1">' & @CR
    $playList &= @TAB & '<title>Playlist</title>' & @CR
    $playList &= @TAB & '<trackList>' & @CR
    For $i = 1 To $aList[0]
        $playList &= @TAB & @TAB & '<track>' & @CR
        $playList &= @TAB & @TAB & @TAB & '<location>file:///' & URLEncode($aList[$i]) & '</location>' & @CR
        $playList &= @TAB & @TAB & @TAB & '<extension application="http://www.videolan.org/vlc/playlist/0">' & @CR
        $playList &= @TAB & @TAB & @TAB & @TAB & '<vlc:id>' & $i-1 & '</vlc:id>' & @CR
        $playList &= @TAB & @TAB & @TAB & @TAB & '<vlc:option>file-caching=1000</vlc:option>' & @CR
        $playList &= @TAB & @TAB & @TAB & '</extension>' & @CR
        $playList &= @TAB & @TAB & '</track>' & @CR
    Next
    $playList &= @TAB & '</trackList>' & @CR
    $playList &= @TAB & '<extension application="http://www.videolan.org/vlc/playlist/0">' & @CR
    For $i = 1 To $aList[0]
        $playList &= @TAB & @TAB & '<vlc:item tid="' & $i-1 & '"/>' & @CR
    Next
    $playList &= @TAB & '</extension>' & @CR
    $playList &= '</playlist>' & @CR

    $fh = FileOpen(@ScriptDir & "\VLC-Playlist.xspf", 2)
    FileWrite($fh, $playList)
    FileClose($fh)
;EndIf

Global $vcWidth = 600, $shuttleWidth = 24, $sliderLength = $vcWidth-$shuttleWidth, $vcHeight = 565
Global $vcGUI = GUICreate("zPlayer_Carl by C Y Cho", $vcWidth, $vcHeight, -1, -1)
Global $vcPause = GUICtrlCreateButton("Pause", 5, 0, $vcWidth-10, 400)
GUICtrlSetFont(-1, 100, 900)
GUICtrlSetColor(-1, 0x666666)
GUICtrlSetCursor(-1, 0)
Global $vcPrevious = GUICtrlCreateButton("Previous", 5, 400, 355, 80)
GUICtrlSetFont(-1, 40, 900)
GUICtrlSetColor(-1, 0x666666)
GUICtrlSetCursor(-1, 0)
Global $vcNext = GUICtrlCreateButton("Next", 360, 400, 235, 80)
GUICtrlSetFont(-1, 40, 900)
GUICtrlSetColor(-1, 0x666666)
GUICtrlSetCursor(-1, 0)
Global $vcExit = GUICtrlCreateButton("Exit", 5, 480, 590, 80)
GUICtrlSetFont(-1, 40, 900)
GUICtrlSetColor(-1, 0x666666)
GUICtrlSetCursor(-1, 0)
GUISetState(@SW_SHOW, $vcGUI)
WinSetOnTop($vcGUI, "", 1)

Run($vlcPath & " " & @ScriptDir & "\VLC-Playlist.xspf")
Sleep(1000)
$hWnd = WinGetHandle("[CLASS:Qt5QWindowIcon]", "VLC")   ; Please check if your VLC window class matches with this
;WinMove($hWnd, "", @DesktopWidth, 0)   ; This line should be uncommented when using dual monitors
WinSetState($hWnd, "", @SW_MAXIMIZE)

While 1
    $guiMsg = GUIGetMsg()
    Switch $guiMsg
        Case $vcNext
            WinActivate($hWnd)
            Send("{MEDIA_NEXT}")
            If $lPaused = True Then
                GUICtrlSetData($vcPause, "Pause")
                $lPaused = False
            EndIf
        Case $vcPrevious
            WinActivate($hWnd)
            Send("{MEDIA_PREV}")
            If $lPaused = True Then
                GUICtrlSetData($vcPause, "Pause")
                $lPaused = False
            EndIf
        Case $vcPause
            WinActivate($hWnd)
            If $lPaused = False Then
                GUICtrlSetData($vcPause, "Play")
                $lPaused = True
            Else
                GUICtrlSetData($vcPause, "Pause")
                $lPaused = False
            EndIf
            Send("{MEDIA_PLAY_PAUSE}")
        Case $vcExit, $GUI_EVENT_CLOSE
            MyExit()
    EndSwitch
    If Not WinExists($hWnd) Then MyExit()
WEnd

Func URLEncode($sFileName)
    Local $sBinary = StringToBinary($sFileName, 4)
    Local $sEncodedName = ""
    For $j = 1 To BinaryLen($sBinary)
        Local $sByte = StringTrimLeft(BinaryMid($sBinary, $j, 1), 2)
        Local $ascii = Dec($sByte)
        If ($ascii >= 48 And $ascii <= 57) Or ($ascii >= 65 And $ascii <= 90) Or ($ascii >= 97 And $ascii <= 122) _
            Or StringInStr("45 46 58 91 93 95", StringRight(1000+$ascii, 2)) Then
            $sEncodedName &= Chr($ascii)
        ElseIf $ascii = 92 Then
            $sEncodedName &= "/"
        Else
            $sEncodedName &= "%" & $sByte
        EndIf
    Next
    Return $sEncodedName
EndFunc

Func MyExit()
    ProcessClose("vlc.exe")
    Exit
EndFunc

 

Edited by CYCho
Link to post
Share on other sites
1 hour ago, carlvanwormer said:

This doesn't seem to do anything in stand-alone mode

I don't quite get what you mean. Did you save this code in an au3 file (any name other than vlc.au3), for example, zPlayer-VLC.au3 in the media file directory, compile it and run? Of course, the VLC must have been installed in that computer.

Please look through the code and raise any question. You will note that the code first makes an xml playlist and plays that playlist instead of individual media files. So, in your case, the directory had better not contain any video files other than Monk. Please bear in mind that the playlist will contain the file names in alphabetical order, and you may have to change the file names to keep the playing order as intended.

You will also note that the file names in the playlist are encoded to UTF-8 as VLC requires, and so they should work OK with unicode characters.

I hope this works for you.

Edited by CYCho
Link to post
Share on other sites

I pasted the code into a new SciTE file, but I didn't save it out.  I hit the F5 key and nothing happened, so I figured something was broken in the file.  After reading your question, I made a new file, pasted the text into it, and then saved it out with an arbitrary filename.  After that process, I hit the F5 again and got VLC errors"

Your input can't be opened:

VLC is unable to open the MRL 'file:///C:/Users/Carl/Documents/AutoIt/Monk'. Check the log for details.

Your input can't be opened:

VLC is unable to open the MRL 'file:///C:/Users/Carl/Documents/AutoIt/Monk%20Season%201/Season'. Check the log for details.

Your input can't be opened:

VLC is unable to open the MRL 'file:///C:/Users/Carl/Documents/AutoIt/Monk%20Season%201/1/VLC-Playlist.xspf'. Check the log for details.

 

I will check the log tomorrow morning to see what other things I can do.  You've worked hard today . . . you can take the rest of the day off  . . .

 

It looks like AutoIt doesn't accept the F5 key (Go) until after the file is saved with a filename.  I tested this with a blank file - File/New, then hit F5 - nothing happened.  File/Save (give arbitrary filename) then F5 performs the Go action on the empty (but named) file.

Thanks for all the help,
Carl

 

Link to post
Share on other sites

I found that I could make it work if I changed my folder structure to remove spaces.  I set out to "fix" the problem by changing the line:

$fh = FileOpen(@ScriptDir & "\VLC-Playlist.xspf", 2)

to 

$newstring = '"' & @ScriptDir & "\VLC-Playlist.xspf" & '"'
    $fh = FileOpen($newstring, 2)
    ConsoleWrite  (" $newstring is " )
    ConsoleWrite  ($newstring)
    ConsoleWrite  (" $newstring" )

when I run this code I still get the same error results, and the console window shows the quoted string as sent to the system:

 $newstring is "C:\Users\Carl\Documents\AutoIt\Monk Season 1\VLC-Playlist.xspf" $newstring

When I copy this quoted string to the windows console (with or without quotes), it runs the video file.

I've attached the playlists from the working (no spaces) and non-working (spaces) runs (removed spaces from folder path).

It looks like the VLC program doesn't cope with spaces very well.

 

I can solve the problem by making my directory structure (and probably my filenames) without any spaces.

Aside from that problem, your VLC implementation works well.  I cannot fully express my gratitude for the help you have given me.  I will try to pay it forward.

Thanks!


Carl

 

VLC-Playlist.xspf VLC-Playlist.xspf

Link to post
Share on other sites

I added some variables for defining the button sizes and locations to allow for quick modification when my tablet arrives next week.  Things seem to be working well with VLC player mods you made.  I found that I could manually run VLC from its install folder, selecting the language and captioning channels and they would stick for subsequent defaults. 

I've attached my updated code for your viewing pleasure.

As I was working out the details, I found that the "file location memory" capability of the original program was no longer available.  The zPlayer.ini file is not referenced in the new code version.  I've spent some time trying to hack that function into the new code from the old system, but I've been unsuccessful.  Do you have any suggestions as to the minimum "necessary and sufficient" items from the old code that need to be added to allow the program to restart where it left off from the previous run?

 

Thanks,
Carl

 

BigPause-10.au3

Link to post
Share on other sites

 

16 hours ago, carlvanwormer said:

to allow the program to restart where it left off from the previous run

During the relatively short time after my last post I looked into that possibility. Since I am new to VLC and I am not using API commands, what I could do was very much limited. One thing I tried for returning to the previous file was to change the order of files in playlist believing that VLC would start playing the first file first. But my belief was betrayed by VLC with its default xspf playlist. Just by a sheer luck I found that an m3u playlist did the trick. What i did was to rearrange the playlist at Exit time so that the current file comes on the top. Please try the code below. Returning to the exact timeline is a task which cannot be achieved without going into API level of VLC.

BigPause-10-m3u.au3

Edited by CYCho
Link to post
Share on other sites

WOW!  That worked as expected.  I was going to upload my latest failure that "almost worked" (except I didn't know how to correctly parse the VLC file), but your working file was waiting for me.  I'll pound on it tomorrow to see if I can break anything else, and then I'll probably be able to run it on the tablet on Tuesday.  I really appreciate the time you've invested in helping me.  Contact me if you ever need any electronics troubleshooting help.

Thanks,

Carl

 

Link to post
Share on other sites

I found an interesting quirk, but it is something I can get around.  After a computer reboot (current win-10 system) I can run the script, but it always exits.  If I manually run VLC and then exit vlc before running the script I get the expected script behavior.  In tracing the reason, I was following the mainloop code and found that the code was taking the exit the first time through the loop because of the "if not winexists($hwnd) at the end of the loop.  

I added a loop at the definition of $hWnd:
Run($vlcPath & " " & @ScriptDir & "\VLC-Playlist.m3u")
for $x=1 to 10
Sleep(1000)
$hWnd = WinGetHandle("[CLASS:Qt5QWindowIcon]", "VLC")  ; Please check if your VLC window class matches with this
ConsoleWrite (" Counting - " & $x & " " & $hWnd )
if $hWnd  <> 0x00000000 then ExitLoop
Next

first run after reboot I got:
Counting - 1 0x00000000 Counting - 2 0x00000000 Counting - 3 0x00000000 Counting - 4 0x00000000 Counting - 5 0x00000000 Counting - 6 0x00000000 Counting - 7 0x00000000 Counting - 8 0x00000000 Counting - 9 0x00000000 Counting - 10 0x00000000 
and the script exited.

After the second run, I got:
Counting - 1 0x0001098C 
and the scrip ran perfectly.

I see your comment about checking my vlc window class, and the summary of that window info is:

>>>> Window <<<<
Title:    8x01 La serie favorita del Sr. Monk - VLC media player
Class:    Qt5QWindowIcon
Position:    203, 58
Size:    1137, 741
Style:    0x96CF0000
ExStyle:    0x00000100
Handle:    0x0000000000020970

>>>> Control <<<<
Class:    VLC video output 000001EA20BE85D0
Instance:    1
ClassnameNN:    VLC video output 000001EA20BE85D01
Name:    
Advanced (Class):    [CLASS:VLC video output 000001EA20BE85D0; INSTANCE:1]
ID:    
Text:    
Position:    1, 21
Size:    1118, 629
ControlClick Coords:    589, 142
Style:    0x50000000
ExStyle:    0x00000000
Handle:    0x0000000000040926

>>>> Visible Text <<<<
QWidgetClassWindow
ControlsWidgetClassWindow
InputControlsWidgetClassWindow
QStackedWidgetClassWindow
VideoWidgetClassWindow
QWidgetClassWindow
VLC (Direct3D11 output)
QMenuBarClassWindow


>>>> Hidden Text <<<<
QStatusBarClassWindow
BackgroundWidgetClassWindow
QWidgetClassWindow


There is something going on here, but I don't know enough to fix it.

thanks,
Carl
 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By CYCho
      This file includes the source code for zPlayer, which is a stand-alone, simple, intuitive and easy-to-use, yet fully functional media player.  I made this to suit my purpose and you can tweak it to your taste. The source code is only about 1600 lines and only standard #include files were used. Also included in the source code file are some image files which are used for drawing the graphical media controls in the main window.
      As of its release date, the compiled exe file of this player, as attached hereto, is not flagged by Windows Defender with latest Security Intelligence Update.
      Hash values for compiled file of the latest version are as follows:
      SHA256: B21A386B916175FB05639BACC398812BE6CEB1B02E463585EA900E329A596A5D
      SHA1: 3AAAFF9B3E8D4FC5FE3D27C49241C23C0C9DF654

      This player has the following features:
      - Play back all formats of media files which can be played back by the Windows Media Player in your computer
      - Depending on the file types specified by the user in zPlayer.ini file this player can be either audio only, video only or both.
      - Video window is independent of other windows and, when maximized, increases the immersion of the user
      - Graphical media controls similar to embedded Windows Media Player
      - Forward, backward, pause, repeat, shuffle function
      - Increase/decrease/mute sound volume
      - Change folders and create playlist for all media files in that folder and its subfolders, and support for manually-made playlists
      - Save play-back environment when terminating and resume that environment when restarting
      - 'Continue playback' option for a file you left off in the middle of playback
      - With one click, you can see internet search results for the file selected in playlist
      - With a double-click, you can play back an item in the playlist
      - Search strings in the playlist
      - Option to see long file names including folder names
      - View file properties for any file in the playlist and copy their values
      - Resize the playlist and video windows, and restore them to their default positions
      - Very small footprint: very low CPU and memory usage, with only about 1MB when compiled
      - You can even hide all the windows and manipulate the player with hotkeys only
      Note: zPlayer is the name I used when I introduced the early version of this player in my blog back in early 2009 and, therefore, has nothing to do with the mobile media player of the same name which started marketing in 2015.
       
    • By PeterVerbeek
      In this post I take the opportunity to show the awesome capabilities of AutoIt and its libraries. My open source project Peace is a long running AutoIt based app located on SourceForge. It provides users with a system-wide equalizer and effects machine. It's an interface using the power of Equalizer APO, an audio processing object software. Peace has been download over 2,600,000 times by various kind of users. Amongst others it gives them possibilities like these:
      Hearing impaired - Amplify the gain of frequencies which are impaired. Home Theatre - Create Equalizer presets for watching movies and listening to music. Music lovers & audiophiles - Create presets for listening to music on their high quality speakers and headphones. Gamers - Enhance frequencies to get an edge over other gamers. Headphones - Improve the sound quality of cheap headphones and get the max out of expensive ones. Bass lovers - Boost low frequencies for extra bass. Voice - Make a microphone sound better and improve the voice, for instance for YouTube usage. Low audio - Boost low audio of an input source to a comfortable level. This list covers the main needs of the Peace user. Many people have contacted me over the years asking for new features and telling me how they use Peace for their (sometimes specific) needs.  I was able to use AutoIt and its libraries for all of their needs. So what are the main features of Peace?
      Equalize your computer audio by using up to 31 sliders. Support of equalizing 9 speakers : left/right, center, subwoofer, left/right rear, left/right side. Per slider a filter can be chosen such as peak, low/high pass, shelving. The graph windows shows your equalization so you see exactly what you're doing. Apply an effect such as crossfeed simple/Jan Meier/Chu Moy, stereo balance, bass/treble, upmix/downmix, channel routing. Save presets (called configurations) and activate by mouse click, hotkey, desktop shortcut or Peace system tray. Select a target device to equalize, microphone as input can also be equalized. Automate: you can let Peace automatically activate presets on a switch to another device and another process. Peace is available in these languages: English, Czech, Deutsch, Français, Italiano, Nederlands, Pусский, Українська So who am I? I'm a Dutch programmer who happens the stumble upon AutoIt 5 years ago and created a small Equalizer interface app of less than 400 program lines with it. Nowadays Peace has grown to more than 18,000 lines as many features were added. Although Peace is open source, the program code isn't of the best possible quality. The reason being that I didn't expect it to become so popular. It caught me by supprise. I've created a Library of functions called Pal (link to forum post) which quality is up to the AutoIt community standard as counterpart to the Peace program code.
      I want to state here that AutoIt is a mature program language as Peace obviously shows. I wish it to be used more extensively for professional or semi-professional apps. In my view AutoIt deserves a place amongst the major programming languages for Windows computers.
      Regards,
      Peter Verbeek








    • By nacerbaaziz
      hello autoit team
      please i need your help
      i found that the youtube provide a way to get any video informations with this link
      https://youtube.com/get_video_info?video_id=id
      but it incoded i can not read it
      can any one tell me how to decode that please?
    • By nacerbaaziz
      goodmorning; autoit team
      please their are any youtube search way working?
      because i was using the get source and split it to get the result but know it does not working any way.
      is the youtube disabled that? and is their any other simple way to do that?
      i tested all examples found in this post but also it don't work
      https://www.autoitscript.com/forum/topic/123945-youtube-search/
      and here is the example that i use to and it don't work any more
      local $hSearchOpenHNDL, $hSearchConnect, $sSearchGet local $a_UrlsArray[1][5] local $b_ButtonsDisabled = false, $b_SearchBTNFocus = false, $b_SearchListFocus, $h_SearchFocusHND local $Return = "0" local $s_OpenStringY = "/feed/trending" local $ChannelUrl = "", $channelName = "" if Not ($a_YoutubeSearchArray[0][0] = 0) then GUICtrlSetData($searchInp, $s_youtubeSearchLastSearch) $s_OpenStringY = "/results?search_query=" & StringReplace(GUICtrlRead($searchInp), " ", "+") $a_UrlsArray = $a_YoutubeSearchArray for $i = 1 to $a_UrlsArray[0][0] _GUICtrlListBox_AddString($SearchList, $a_UrlsArray[$i][0] & $a_UrlsArray[$i][2] & $a_UrlsArray[$i][3]) next _GUICtrlListBox_SetCurSel($SearchList, $I_youtubeSearchLastIndex-1) GUICtrlSetState($SearchList, $GUI_focus) else if Ping("youtube.com", 1000) > 1 then $hSearchOpenHNDL = _WinHttpOpen('') if not (@Error) then $hSearchConnect = _WinHttpConnect($hSearchOpenHNDL, "youtube.com") if Not (@Error) then $sSearchGet = _WinHttpSimpleRequest($hSearchConnect, "get", $s_OpenStringY) if not (@Error) then local $a_strings = _StringBetween($sSearchGet, '<a href="/watch', "<ul") local $title = "" local $url = "" local $length = "" local $result = "" GUICtrlSetData($SearchList, "") ReDim $a_UrlsArray[1][5] for $i = 0 to UBound($a_strings)-1 $url = _StringBetween($a_strings[$i], "?", '"') if @error then ContinueLoop $url = "https://www.youtube.com/watch?" & $url[0] $title = _StringBetween($a_strings[$i], 'dir="', '</a>') if @error then ContinueLoop $title = $title[0] $title = StringRegExpReplace($title, '(.*\"\>)', "") if StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}', 0) = 1 then $length = StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}', 2) elseIf StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}', 0) = 1 then $length = StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}', 2) else $length = "" endIf if IsArray($length) then $length = ": (" & $length[0] & ")" else $length = "" endIf $ChannelUrl = stringRegexpReplace($a_strings[$i], '(^.*?<a.*?\"(\/user|\/channel))+', "$2") $channelName = stringRegexpReplace($ChannelUrl, '(.*?\".*?>)(.*</a>)+', "$2") $ChannelUrl = stringRegexpReplace($ChannelUrl, '(\".*)+', "") $channelName = stringRegexpReplace($channelName, '(</a>.*)+', "") $result &= $title & @crlf & $url & @crlf ReDim $a_UrlsArray[UBound($a_UrlsArray)+1][5] $a_UrlsArray[UBound($a_UrlsArray)-1][0] = $title $a_UrlsArray[UBound($a_UrlsArray)-1][1] = $url $a_UrlsArray[UBound($a_UrlsArray)-1][2] = $length if not ($channelName = "") then $a_UrlsArray[UBound($a_UrlsArray)-1][3] = ", (" & $channelName & ")" if not ($channelUrl = "") then $a_UrlsArray[UBound($a_UrlsArray)-1][4] = "https://www.youtube.com" & $channelUrl $a_UrlsArray[0][0] = UBound($a_UrlsArray)-1 _GUICtrlListBox_AddString($SearchList, $a_UrlsArray[UBound($a_UrlsArray)-1][0] & $length & $a_UrlsArray[UBound($a_UrlsArray)-1][3]) next endIf endIf endIf endIf endIf  
      i hope any one can help me
      thanks in advance
    • By ripdad
      This is a project that I have been working on for several months off and on.
      It's a simple "What You Hear" MP3 @ 320Kbps and WAV audio recorder.
      Features:
      - LoudMax, a Gain Controller and Look-Ahead Limiter
      - Auto Shut-Off after one minute of silence
      - Side-by-Side Simulated LED Meter
      - Running Time Counter
      It started off being a large project, but I eventually stripped it down to its
      bare essentials because I came to realize that it would be very difficult to
      deal with every sound card and every way a PC is set up for audio. It would
      have been a nightmare that I was not willing to go through.
      This project contains the most up-to-date BASS.dll v.2.4.15.0 - December 17, 2019.
      All BASS Dll's are 32bit. Those and the needed UDF's are included in the zip file.
      I will try to explain how it works in the next post.

      Download:
      BASS VST Recorder v1.1.zip
       
×
×
  • Create New...