Click here to Skip to main content
15,881,600 members
Home / Discussions / Free Tools
   

Free Tools

This forum is for discussing and recommending Free tools for software development. Please post direct links to tools, and not just links to pages that review or list tools.No shareware and no commercial products allowed. Please report spammers by voting to remove their messages and reporting their accounts.

 
GeneralRe: EXIFTOOL Pin
Michael Haephrati11-Jun-17 10:00
professionalMichael Haephrati11-Jun-17 10:00 
GeneralRe: EXIFTOOL Pin
Richard MacCutchan11-Jun-17 21:45
mveRichard MacCutchan11-Jun-17 21:45 
GeneralProgram to Play Wave File in Batch File, with Bonus for Programmers Pin
David A. Gray9-May-17 21:25
David A. Gray9-May-17 21:25 
GeneralRe: Program to Play Wave File in Batch File, with Bonus for Programmers Pin
Pat O'Brien31-Jul-17 10:02
Pat O'Brien31-Jul-17 10:02 
GeneralRe: Program to Play Wave File in Batch File, with Bonus for Programmers Pin
David A. Gray29-May-18 11:03
David A. Gray29-May-18 11:03 
Though I could easily have implemented it as a Visual Basic script, I prefer a compiled EXE because its use does not depend upon a working Visual Basic Scripting interpreter, which is not a given in some locked down environments.

Nevertheless, for fun, below is my improved implementation, which took maybe an hour to cobble together and test.
VB
<pre lang="vb">
Option Explicit

' ============================================================================
'
' Script Name: SoundOff.VBS
'
' Objective: Cause a shell script to play a sound file to completion.
'
' Command Arguments: SoundFileName = Name of sound file to play
'
' Remarks: This script is a port of SountOff.exe.
'
' ----------------------------------------------------------------------------
' Revision History
' ----------------------------------------------------------------------------
'
' Date By Synopsis
' ---------- --- -------------------------------------------------------------
' 2018/05/28 DAG Script created, tested, and deployed
' ============================================================================

const ARGS_NONE = 0
const ARRAY_FIRST_ELEMENT = 0

const ERROR_SUCCESS = 0 ' The status code variable is initialized with the standard Windows "success" status code.
const ERROR_NEEDS_CSCRIPT = 1 ' Status code 1 is reserved for scripts run in Wscript that require CScript.
const ERROR_NO_ARGS = 2 ' Status code 2 is reserved for scripts that require one or more command line arguments to report being called without any.
const ERROR_FILE_NOT_FOUND = 3

const SLEEP_TIME_100_MILISECS = 100
const WMP_PLAY_STATE_STOPPED = 1

dim intExitCode : intExitCode = ERROR_SUCCESS ' Anticipate success.
dim oArgs : Set oArgs = WScript.Arguments
dim iArgLast : iArgLast = oArgs.Count

if iArgLast > ARGS_NONE then
dim sFileSpec : sFileSpec = oArgs ( ARRAY_FIRST_ELEMENT )
dim oFSO : set oFSO                 = CreateObject ( "Scripting.FileSystemObject" )

if oFSO.FileExists ( sFileSpec ) then
dim oPlayer : Set oPlayer = CreateObject ( "WMPlayer.OCX" )
oPlayer.URL = sFileSpec ' Define the location / name of the file.
oPlayer.controls.play

While oPlayer.playState <> WMP_PLAY_STATE_STOPPED
WScript.Sleep SLEEP_TIME_100_MILISECS
Wend ' While oPlayer.playState <> WMP_PLAY_STATE_STOPPED

oPlayer.close ' Release the audio file.
else
intExitCode = ReportFileNotFound ( sFileSpec )
end if ' if oFSO.FileExists ( sFileSpec ) then
else
intExitCode = ShowSyntax ( )
end if ' if iArgLast > ARGS_NONE then

WScript.Quit ( intExitCode )

function ReportFileNotFound ( psFileSpec )

' ------------------------------------------------------------------------
'
' Function Name: ReportFileNotFound
'
' Synopsis: Display brief instructions about the syntax, and return
' a nonzero status code, which becomes the return value of
' the script.
'
' Arguments: psFileSpec = Name of file that cannot be found
'
' Returns: The return value is always ERROR_NO_ARGS.
'
' Remarks: This script displays its entire message at once, so that
' it behaves appropriately when run by WScript.exe. Since
' the script is otherwise silent, this adjustment of my
' standard practice permits it to run in either host.
' ------------------------------------------------------------------------

WScript.Echo Wscript.ScriptName & ": sound file " & psFileSpec & " cannot be found."
ShowSyntax = ERROR_FILE_NOT_FOUND

end function ' ReportFileNotFound

function ShowSyntax ( )

' ------------------------------------------------------------------------
'
' Function Name: ShowSyntax
'
' Synopsis: Display brief instructions about the syntax, and return
' a nonzero status code, which becomes the return value of
' the script.
'
' Arguments: None
'
' Returns: The return value is always ERROR_NO_ARGS.
'
' Remarks: This script displays its entire message at once, so that
' it behaves appropriately when run by WScript.exe. Since
' the script is otherwise silent, this adjustment of my
' standard practice permits it to run in either host.
' ------------------------------------------------------------------------

WScript.Echo "Usage: " & Wscript.ScriptName & " SoundFileName" & vbNewLine & vbNewLine & "where SoundFileName = Name of sound file to play"
ShowSyntax = ERROR_NO_ARGS

end function ' ShowSyntax
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting

GeneralAnybody know of a free font that has the barycenter symbol? Pin
swampwiz7-Apr-17 9:43
swampwiz7-Apr-17 9:43 
GeneralRe: Anybody know of a free font that has the barycenter symbol? Pin
User 41802547-Apr-17 10:02
User 41802547-Apr-17 10:02 
Generalfreeware registry app: RegOwnershipEx 1.0.0.2 (new version) Pin
BillWoodruff30-Mar-17 23:53
professionalBillWoodruff30-Mar-17 23:53 
GeneralIntroducing MluSmartEdit Pin
MCSIDevelopers25-Mar-17 3:59
MCSIDevelopers25-Mar-17 3:59 
GeneralFree PDF Diff Tools Pin
Bassam Abdul-Baki23-Mar-17 4:55
professionalBassam Abdul-Baki23-Mar-17 4:55 
GeneralFormat large Micro SD cards so Android and Windows can read them. Pin
OriginalGriff8-Feb-17 8:10
mveOriginalGriff8-Feb-17 8:10 
GeneralVirtual box / Virtual machines Pin
Roberto64_Ge3-Feb-17 2:23
Roberto64_Ge3-Feb-17 2:23 
GeneralRe: Virtual box / Virtual machines Pin
Jochen Arndt3-Feb-17 3:03
professionalJochen Arndt3-Feb-17 3:03 
General3 new tools Pin
Michael Haephrati30-Jan-17 12:01
professionalMichael Haephrati30-Jan-17 12:01 
GeneralA tool to display (and save to a file) all WiFi credentials Pin
Michael Haephrati8-Jan-17 8:15
professionalMichael Haephrati8-Jan-17 8:15 
GeneralA tool for converting TIF files into PDF Pin
Michael Haephrati6-Jan-17 0:33
professionalMichael Haephrati6-Jan-17 0:33 
GeneralxTracer.exe - terminal program for logging, filtering and analyzing traces on the fly Pin
Nikolay Khilyuk23-Dec-16 9:00
professionalNikolay Khilyuk23-Dec-16 9:00 
General.NET Profiler Pin
Super Lloyd6-Dec-16 0:01
Super Lloyd6-Dec-16 0:01 
GeneralRe: .NET Profiler Pin
Richard Deeming6-Dec-16 2:15
mveRichard Deeming6-Dec-16 2:15 
GeneralRe: .NET Profiler Pin
Super Lloyd6-Dec-16 6:24
Super Lloyd6-Dec-16 6:24 
NewsFree tool to sign executables Pin
Michael Haephrati4-Dec-16 7:15
professionalMichael Haephrati4-Dec-16 7:15 
GeneralRe: Free tool to sign executables Pin
Richard MacCutchan4-Dec-16 21:33
mveRichard MacCutchan4-Dec-16 21:33 
GeneralRe: Free tool to sign executables Pin
Michael Haephrati5-Dec-16 0:33
professionalMichael Haephrati5-Dec-16 0:33 
GeneralRe: Free tool to sign executables Pin
pt140123-Apr-17 20:22
pt140123-Apr-17 20:22 
GeneralRe: Free tool to sign executables Pin
Michael Haephrati11-Jun-17 9:59
professionalMichael Haephrati11-Jun-17 9:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.