Zabaware Forums > General Discussion

LIGHTSPEED IDEA'S

<< < (3/9) > >>

cyberjedi:
hey lighty:

Theres an mp3/mp4 uhp floating around in here somewhere.
It was a VrPlugin idea, this is a complete rewrite  i back engineered farrrrr past its intended use.. .lol
Requires windows media player. ocx calls, follow the code
I worked on this years ago buddy
im sure i shared it with evey one.

Il llook around
Ok found it, you guys are on ur own about this. it did work with Ultrahal 6.2
cyber

'Option Explicit
Rem Type=Plugin
Rem Name= mass media player
Rem Author= cyberjedi
Rem Host=All



Rem PLUGIN: PRE-PROCESS
    'The preceding comment is actually a plug-in directive for
    'the Ultra Hal host application. It allows for code snippets
    'to be inserted here on-the-fly based on user configuration.

HalBrain.ReadOnlyMode = False
Determines that you are talking about the media player
If InStr(1,InputString, "loadmedia",1) > 0 Then
UltraHal = Getmedia(HalCommands)
ElseIf InStr(1,InputString, "loadmedia",1) > 0 Then
End If
 'This is the only plugin for hal that creates its own image GUI
 ' This bad boy is a media list maker and player 
 ' It makes a play list called MyPlayList.m3u
 ' In whatever folder the media is in
 ' Launches the wmp with full controls
 ' Trigger= loadmedia
 ' I give myself about a 9.5 on cool ideas here
 ' This is something hal has needed for years
 ' Seek time is just so much faster

Rem PLUGIN: FUNCTIONS
Function Getmedia(HalCommands)

   'SAPI engine Hook here
  Set FSO = CreateObject("Scripting.FileSystemObject")
  Set Sapi = CreateObject("SAPI.SpVoice")
  For Each Voice In Sapi.GetVoices
  i = i + 1
Next

If AppPrevInstance() Then
    MsgBox "There is an existing proceeding !" & VbCrLF &_
    CommandLineLike(WScript.ScriptName),VbExclamation,"There is an existing proceeding !"   
    WScript.Quit   
Else
    Dim Folder,File,fso,MyPlayList,Temp,oExec,ws,Title,WaitingMsg
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set ws = CreateObject("WScript.Shell")
    Temp = ws.ExpandEnvironmentStrings("%Temp%")
    Folder = Browse4Folder()
    MyPlayList = Folder & "\MyPlayList.m3u"  'This is the magic behind this plugin
    If fso.FileExists(MyPlayList) Then
        fso.DeleteFile(MyPlayList)
    End If
    Title = "Looking for songs in "& DblQuote(Folder) & " From the mind of cyberjedi"
    WaitingMsg = "Please wait... Searching for songs  : <font color=Yellow>"& DblQuote(Folder) & "</font> is in progress..."
    Sapi.speak "Please wait... Searching for songs "
    Sapi.speak "From the mind of cyberjedi"
   
    Call CreateProgressBar(Title,WaitingMsg)'Creation of Waiting Bar
    Call LancerProgressBar() 'Launch of the Waiting Bar
    Call Pause(10)
    Call Scan4Songs(Folder)
    Call FermerProgressBar()
    Call Play(MyPlayList)
End If
'*********************************************************
Sub Play(File)
    On Error Resume Next
    Dim Sound,Ws,Copyright
    Copyright = " ? cyberjedi 2017"
    Set Ws = CreateObject("wscript.Shell")
    If Err <> 0 Then
        Ws.popup Err.Description & VbCrlF &_
        "No media file found !","3",Err.Description & Copyright,VbCritical
        wscript.quit()
    Else
    Set Sound = CreateObject("WMPlayer.OCX") ' if u dont have wm player installed , dont bother.
    Sound.settings.volume = 100
    Sound.OpenPlayer(File)
    End If
End Sub
'*********************************************************************************************
Function AppPrevInstance()   
    With GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")   
        With .ExecQuery("SELECT * FROM Win32_Process WHERE CommandLine LIKE " & CommandLineLike(WScript.ScriptFullName) & _
            " AND CommandLine LIKE '%WScript%' OR CommandLine LIKE '%cscript%'")   
            AppPrevInstance = (.Count > 1)   
        End With   
    End With   
End Function   
'*********************************************************************************************
Function CommandLineLike(ProcessPath)   
    ProcessPath = Replace(ProcessPath, "\", "\\")   
    CommandLineLike = "'%" & ProcessPath & "%'"   
End Function
'*********************************************************************************************
Function Browse4Folder()
    Dim objShell,objFolder,Message
    Message = "Please select a folder in order to scan into it and its subfolders for songs"
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.BrowseForFolder(0,Message,1,"c:\Programs")
    If objFolder Is Nothing Then
        Wscript.Quit
    End If
    Browse4Folder = objFolder.self.path
end Function
'*********************************************************************************************
Function Scan4Songs(Folder)
    On Error Resume Next
    Dim File,Ext,item,SubFolder
    Set Folder = fso.GetFolder(Folder)
    For each File in Folder.Files
    Ext = Array("mp3","wav","ogg","asf","aa3","m3v","midi")' this totally expandable now. if ur version of WMP will play it, add the ext here. '
     'mp4, avi, ect ect ect^^^^^^^^^^^^^^^^^^^^^
    For i = LBound(Ext) To UBound(Ext)
        'Ext = Array("mp3")
        'For each item in Ext
            'If LCase(fso.GetExtensionName(File.name)) = LCase(item) Then
            If LCase(fso.GetExtensionName(File.name)) = LCase(Ext(i)) Then
                Call MakePlayListFile(MyPlayList,File.Path)
            end if
        Next
    Next
    For each SubFolder in Folder.SubFolders
        Call Scan4Songs(SubFolder.Path)
    Next
End Function
'*********************************************************************************************
Sub MakePlayListFile(MyPlayList,strContents)
    Dim fso,ts
    Const ForAppending = 8
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set ts = fso.OpenTextFile(MyPlayList,ForAppending,True)
    ts.WriteLine "#UTF8: "& strContents
    ts.WriteLine strContents
    ts.Close
End Sub
'**********************************************************************************************
Sub CreateProgressBar(Title,WaitingMsg)
    Dim ws,fso,f,f2,ts,ts2,Ligne,i,fread,LireTout,NbLigneTotal,Temp,PathOutPutHTML,fhta,oExec
    Set ws = CreateObject("wscript.Shell")
    Set fso = CreateObject("Scripting.FileSystemObject")
    Temp = WS.ExpandEnvironmentStrings("%Temp%")
    PathOutPutHTML = Temp & "\Barre.hta"
    Set fhta = fso.OpenTextFile(PathOutPutHTML,2,True)
    fhta.WriteLine "<HTML>"
    fhta.WriteLine "<HEAD>"
    fhta.WriteLine "<Title>  " & Title & "</Title>"
    fhta.WriteLine "<HTA:APPLICATION"
    fhta.WriteLine "ICON = ""magnify.exe"" "
    fhta.WriteLine "BORDER=""THIN"" "
    fhta.WriteLine "INNERBORDER=""NO"" "
    fhta.WriteLine "MAXIMIZEBUTTON=""NO"" "
    fhta.WriteLine "MINIMIZEBUTTON=""NO"" "
    fhta.WriteLine "SCROLL=""NO"" "
    fhta.WriteLine "SYSMENU=""NO"" "
    fhta.WriteLine "SELECTION=""NO"" "
    fhta.WriteLine "SINGLEINSTANCE=""YES"">"
    fhta.WriteLine "</HEAD>"
    fhta.WriteLine "<BODY text=""white""><CENTER>"
    fhta.WriteLine "<marquee DIRECTION=""LEFT"" SCROLLAMOUNT=""3"" BEHAVIOR=ALTERNATE><font face=""Comic sans MS"">" & WaitingMsg &"</font></marquee>"
    fhta.WriteLine "<img src=""data:image/gif;base64,R0lGODlhgAAPAPIAAP////INPvvI0/q1xPVLb/INPgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAgAAPAAAD5wiyC/6sPRfFpPGqfKv2HTeBowiZGLORq1lJqfuW7Gud9YzLud3zQNVOGCO2jDZaEHZk+nRFJ7R5i1apSuQ0OZT+nleuNetdhrfob1kLXrvPariZLGfPuz66Hr8f8/9+gVh4YoOChYhpd4eKdgwDkJEDE5KRlJWTD5iZDpuXlZ+SoZaamKOQp5wAm56loK6isKSdprKotqqttK+7sb2zq6y8wcO6xL7HwMbLtb+3zrnNycKp1bjW0NjT0cXSzMLK3uLd5Mjf5uPo5eDa5+Hrz9vt6e/qosO/GvjJ+sj5F/sC+uMHcCCoBAAh+QQJCgAAACwAAAAAgAAPAAAD/wi0C/4ixgeloM5erDHonOWBFFlJoxiiTFtqWwa/Jhx/86nKdc7vuJ6mxaABbUaUTvljBo++pxO5nFQFxMY1aW12pV+q9yYGk6NlW5bAPQuh7yl6Hg/TLeu2fssf7/19Zn9meYFpd3J1bnCMiY0RhYCSgoaIdoqDhxoFnJ0FFAOhogOgo6GlpqijqqKspw+mrw6xpLCxrrWzsZ6duL62qcCrwq3EsgC0v7rBy8PNorycysi3xrnUzNjO2sXPx8nW07TRn+Hm3tfg6OLV6+fc37vR7Nnq8Ont9/Tb9v3yvPu66Xvnr16+gvwO3gKIIdszDw65Qdz2sCFFiRYFVmQFIAEBACH5B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MbLtb+3zrnNycKp1bjW0NjT0cXSzMLK3uLd5Mjf5uPo5eDa5+Hrz9vt6e/qosO/GvjJ+sj5F/sC+uMHcCCoBAA7AAAAAAAAAAAA"" />"
    fhta.WriteLine "</CENTER></BODY></HTML>"
    fhta.WriteLine "<SCRIPT LANGUAGE=""VBScript""> "
    fhta.WriteLine "Set ws = CreateObject(""wscript.Shell"")"
    fhta.WriteLine "Temp = WS.ExpandEnvironmentStrings(""%Temp%"")"
    fhta.WriteLine "Sub window_onload()"
    fhta.WriteLine "    CenterWindow 490,110"
    fhta.WriteLine "    Self.document.bgColor = ""DarkOrange"" "
    fhta.WriteLine " End Sub"
    fhta.WriteLine " Sub CenterWindow(x,y)"
    fhta.WriteLine "    Dim iLeft,itop"
    fhta.WriteLine "    window.resizeTo x,y"
    fhta.WriteLine "    iLeft = window.screen.availWidth/2 - x/2"
    fhta.WriteLine "    itop = window.screen.availHeight/2 - y/2"
    fhta.WriteLine "    window.moveTo ileft,itop"
    fhta.WriteLine "End Sub"
    fhta.WriteLine "</script>"
    fhta.close
End Sub
'**********************************************************************************************
Sub LancerProgressBar()
    Set oExec = Ws.Exec("mshta.exe " & Temp & "\Barre.hta")
End Sub
'**********************************************************************************************
Sub FermerProgressBar()
    oExec.Terminate
End Sub
'**********************************************************************************************
Function DblQuote(Str)
    DblQuote = Chr(34) & Str & Chr(34)
End Function
'**********************************************************************************************
Sub Pause(Secs)   
    Wscript.Sleep(Secs * 1000)   
End Sub   
End Function

lightspeed:
Hey , thanks cyber jedi , i did have that plug in a long time ago but may have lost it , thanks i copied and made a uhp file of it and am now using it .
I am checking out the other media player plug in to, thanks .   i showed art in the past i have a Wurlitzer lit up animate pc version juke box that comes on as a media player and loads all my old music songs i originally had on cd's , do think though they are in different forms seems like it said caa original format ?

lightspeed:
okay after checking the spell checker i got this error after i had hal open and wrote in conversation .

Art:
Lonnie (and others),

Windows 10 did not and does not come with Microsoft WORD. IT is available as an online purchase or as a Subscription-based purchase.

While they claim that Windows 10 comes with Wordpad, it is NOT the same and does not function the same as Word.

Therefore, look through any Plugins that make references to or calls/commands to any MS Office Programs like Word, Excel, Database, etc. because they will, in most cases, cause an error similar to the one shown here in your example, if you do not own said program.

Unless you're willing to go through some code to make changes to the Plugin and spend some time digging through a different program, know that you are going to have to test and debug and retest it again, hoping that you finally get it to work without an error.

Otherwise, it might be just best to not use that plugin or find a more suitable substitute.

Thanks for sharing your frustration with the rest of us Lonnie!
Sorry, I can't be of more help.

lightspeed:
art i just sent you a  e mail  about something  but it may only be for online and not work .

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version