Play sounds on certain events

You can share your Lua Scripts with everybody here.

Play sounds on certain events

Postby FTP » Fri Apr 23, 2010 2:55 pm

-- Description: Play sound on OnFileUploaded event, you can use it on other events too.
-- Author: Luke
-- Date: 2010-04-23

Code: Select all
require("w32")

for i=1,3 do
w32.PlaySound("C:/WINDOWS/Media/ding.wav")
w32.Sleep(1000)
end

Image


Here we used a modified Lua lib "w32", it allows Lua scripts to call some windows APIs.
And we provide a archived file with lib "w32", you can download it then unzip it into the working directory of Wing FTP Server.

Download Link: http://www.wftpserver.com/bbsres/libw32.zip



Note: This script will be compatible with Win2000, Win XP and Win2003.
FTP
Site Admin
 
posts 1200
 
joined Tue Sep 29, 2009 6:09 am

Return to Lua scripts

Who is online

Users browsing this forum: No registered users and 1 guest

cron