Author Topic: VB Script Help for playing a .Wav file as an action  (Read 14070 times)

Offline NCSC_User

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
VB Script Help for playing a .Wav file as an action
« on: April 27, 2007, 02:59:06 AM »
Checked 20 pages of posts and couldn't find anything related to this.  Not sure if my problem is related to upgrading to version 7.2, me going from NT to XP Professional or a little bit of both.

All i need to do is have a .wav file on my C: play when a certain threshold is met.  It used to work like a charm.. now i get an error message.  Here's how the Action that used to work in NT was written:

'This script uses a COM component defined in
'GsSampleTEObjects.DLL the source code for which
'is included in the CCPulse installation package.  It should
'be compiled using Visual Basic in order for this script to work.

'Create the Genesys sound object
Set SoundObject = CreateObject("GsSampleTEObjects.GsActionSoundObject")

'Specify the full path to a WAV file in order to play it.
SoundObject.PlaySoundFile("c:\winnt\media\ccpulse wav\air_raid.wav")

Line 1-5 are just notes since they have ' in the front.  Lines 6 and 8 are the only ones being executed.

Since i'm on XP now i edited the path to say SoundObject.PlaySoundFile("c:\GCTI\ccpulse\wav\air_raid.wav") which is where the file is now located but regardless i get the exact same error message when i test it now for both examples.

Error is as follows:

Error at
Line:6
Position: 0
Error Message: ActiveX component can't create object: 'GsSampleTEObjects.GsActionSoundObject'


Any ideas how to fix this?  It worked like a charm before.  All i had to do is change the name of the .wav file in the path if i wanted a different sound to play :(  I even tried putting the file right under C: and used the code SoundObject.PlaySoundFile("c:\air_raid.wav") and still no luck :(


Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: VB Script Help for playing a .Wav file as an action
« Reply #1 on: April 27, 2007, 03:27:39 AM »
Hi,

It seems to me that the COM object, you're calling, isn't registered properly on your system. Open command prompt, go the directory where the library GsSampleTEObjects.dll is stored and execute this command "regsvr32 GsSampleTEObjects.dll". You should receive a message that the registration was successful. Your threshold should work correctly then.

Regards,
René

Offline NCSC_User

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
Re: VB Script Help for playing a .Wav file as an action
« Reply #2 on: April 27, 2007, 03:32:00 AM »
How would i go about doing this?

I got as far as Start/Run/cmd  :D

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7623
  • Karma: 56330
Re: VB Script Help for playing a .Wav file as an action
« Reply #3 on: April 27, 2007, 03:38:20 AM »
lol well a small lesson on DOS

let say your dll file is on c:\gcti\ccpulse\objectsamples

as you said run/cmd

here do:

>cd c:\gcti\ccpulse\objectsamples
>regsvr32 GsSampleTEObjects.dll

done

Offline NCSC_User

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
Re: VB Script Help for playing a .Wav file as an action
« Reply #4 on: April 27, 2007, 03:40:23 AM »
ahh thanks.. now the new conundrum...

where the heck then is my dll file ... never ends does it. lol

Offline NCSC_User

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
Re: VB Script Help for playing a .Wav file as an action
« Reply #5 on: April 27, 2007, 03:44:21 AM »
actually after doing a hard drive search (including hidden files) it's no where to be found..

<Scratch head>

could i have lost that upgrading to 7.2? or possibly it's not included?  Is that the only code that can be used in Pulse to execute a .wav file as an action?

Offline mark

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: 2
Re: VB Script Help for playing a .Wav file as an action
« Reply #6 on: April 27, 2007, 07:57:17 AM »
Its the easier way of doing it, I will upload our version for you tomorrow if nobody else has in the mean time!
Don't wish it were easier, wish you were better

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: VB Script Help for playing a .Wav file as an action
« Reply #7 on: April 27, 2007, 03:45:27 PM »
Hi,

You can't find the library because the source codes of it are part of CCPulse installation only. The compiled library is attached to this post. Download the file and unpack the archive. Copy the file "GsSampleTEObjects.dll" to the directory where your CCPulse was installed (it's not necessary but better to have CCPulse related libraries in one directory). Then follow the steps described by me and Cavagnaro.

Cheers,
René

Offline NCSC_User

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
Re: VB Script Help for playing a .Wav file as an action
« Reply #8 on: April 28, 2007, 04:45:30 AM »
Thanks everyone that was right on the money!  :D

s.kulku

  • Guest
Re: VB Script Help for playing a .Wav file as an action
« Reply #9 on: May 01, 2007, 12:33:36 PM »
I have never heard of GsSampleTEObjects.dll. I\'ve looked through CCP manual and can\'t find any mentioning of it.
What is it and what does it do?

Sanja Kulku
Technical Development Manager

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7623
  • Karma: 56330
Re: VB Script Help for playing a .Wav file as an action
« Reply #10 on: May 03, 2007, 12:50:11 AM »
Read the CCPulse Help File.
It's a library to show that CCpulse can call any DLL and the Functions on it. Can be very cool.

Offline S

  • Full Member
  • ***
  • Posts: 135
  • Karma: 1
Re: VB Script Help for playing a .Wav file as an action
« Reply #11 on: January 18, 2008, 06:51:51 AM »
Thanks a lot, René for uploading the dll.

;D  :)  :)>
Regards,
S

Offline screaminbrod

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: VB Script Help for playing a .Wav file as an action
« Reply #12 on: November 01, 2008, 01:34:49 AM »
Thanks Rene for the file. you're the best. ;)

Adeel

  • Guest
Re: VB Script Help for playing a .Wav file as an action
« Reply #13 on: January 26, 2009, 07:48:55 PM »
Hey guys were can i find the file! i want to download it and cant seem to find it on the net.     

titikinkity

  • Guest
Hi People
« Reply #14 on: October 08, 2009, 03:06:33 PM »
Hi People
How are you doing?