Hack Forums
[Shell] Message Typewriter + Speaking Voice + Download a .mp3 file and play it - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Shell] Message Typewriter + Speaking Voice + Download a .mp3 file and play it (/showthread.php?tid=5227680)



Message Typewriter + Speaking Voice + Download a .mp3 file and play it - Hackoo - Apr 5, 2016

Hi 🤝

Message Typewriter + Speaking Voice 🤗

PHP Code

<?php 
@echo off
Title Typewriter with speaking voice by Hackoo 2016
Color 0A 
& Mode con cols=70 lines=3
set Msg
="This is only a testing string to see if my script really works or not?"
Call :Typewriter %Msg%
set Msg="              What are you doing now dude ?"
Call :Typewriter %Msg%
set Msg="         I want to say Hello for everybody on HackForums.com !"
Call :Typewriter %Msg%
pause>nul
Exit /b
::*********************************************************************
:
TypeWriter
Cls
echo(
(
echo 
strText=wscript.arguments(0^)
echo 
intTextLen = Len(strText^)
echo 
intPause = 150
echo For x = 1 to intTextLen
echo     strTempText = Mid(strText,x,1^)
echo     
WScript.StdOut.Write strTempText
echo     WScript.Sleep intPause
echo Next
echo Set Voice=CreateObject("SAPI.SpVoice"^)
echo 
voice.speak strText
)>%tmp%\%~n0.vbs
@cScript.EXE /noLogo "%tmp%\%~n0.vbs" "%~1"
exit /b
::********************************************************************* 

Message Typewriter + Speaking Voice + Download a .mp3 file and play it 👍 😝

PHP Code

<?php 
@echo off
Title Loading into the Matrix by Hackoo 2016
Color 0A 
& Mode con cols=65 lines=3
Set URL
=http://hackoo.alwaysdata.net/Matrix.mp3
Set DownloadFolder=%tmp%\file
Set PSFile
=%DownloadFolder%\PSFile.ps1
Set VBSFile
=%DownloadFolder%\FileVBS.vbs
set msg
="   Please wait... Loading the Matrix file is in progress..." 
echo(
REM Call :SpeakVoice %msg%
Call :TypeWriter %msg%
Mkdir %DownloadFolder% >nul 2> nul
Call 
:Download %URL% %DownloadFolder%\Matrix.mp3
If Exist %DownloadFolder%\Matrix.mp3
Start 
"" %DownloadFolder%\Matrix.mp3
exit /b
::*********************************************************************
:
Download <url> <file> 
(
    echo 
$down = New-Object System.Net.WebClient; 
    echo 
$url  = '%1';
    echo 
$file = '%2';
    echo 
$down.DownloadFile($url,$file^);
    echo 
$exec = New-Object -com shell.application;
    echo 
$exec.shellexecute($file^);
)>%
PSFile%
Powershell.exe -ExecutionPolicy bypass -file %PSFile%
Del %PSFile%
Goto :
Eof
::*********************************************************************
:
SpeakVoice
(
    echo 
Call SpeakVoice("%~1"^)
    echo Function 
SpeakVoice(msg^)
    echo 
Dim voice
    
echo Set Voice=CreateObject("SAPI.SpVoice"^)
    echo 
voice.speak msg
    
echo end Function
)>%
VBSFile%
Cscript /nologo %VBSFile%
Del %VBSFile%
Goto :
Eof
::*********************************************************************
:
TypeWriter
(
echo 
strText=wscript.arguments(0^)
echo 
intTextLen = Len(strText^)
echo 
intPause = 100
echo For x = 1 to intTextLen
echo     strTempText = Mid(strText,x,1^)
echo     
WScript.StdOut.Write strTempText
echo     WScript.Sleep intPause
echo Next
echo Set Voice=CreateObject("SAPI.SpVoice"^)
echo 
voice.speak strText
)>%tmp%\%~n0.vbs
@cScript.EXE /noLogo "%tmp%\%~n0.vbs" "%~1"
exit /b
::*********************************************************************