ShapeSheet

G

Gaz

Hi, I'm trying to develop a Visio icon that can perform a few custom actions.
Not that I know a lot about what I am doing but I had made some progress and
now seem to have gone backwards !

In the icon's shapesheet, 3 "actions" are listed. One is labelled
"Actions.PlayPhrase". The text in the action box I vary from attempt to
attempt, but should be something that plays a .wav file. As I look at it now
it says PLAYSOUND("C:\Test.wav",0,1,1), and naturally when I select it from
the icon menu it fails to play anything.

Ideally, eventually, I want to replace the direct path/filename with the
"Prop.AudioFile" defined earlier in the shapesheet and labelled "AduioFile".

Does anyone have any suggestions on why the file isn't playing at the
moment, and what I need to do to allow me to use "AudioFile" as the file to
play ?

Thanks.
 
D

David Parker

I just tried:
Actions.Row_1.Action=PLAYSOUND("C:\Windows\Media\Chimes.wav",0,1,1)

Works fine, so I tried:
Prop.AudioFile.Value = "C:\Windows\Media\Chimes.wav"
Actions.Row_1.Action=PLAYSOUND(Prop.AudioFile,0,1,1)

That worked fine too!
 
G

Gaz

Unfortunately it doesn't for me :-(

However I did make some progress. I left out the ,0,1,1 and it played !
I'd swear I've tried that many times before but .... well: something must
have changed somewhere.

Anyway I'm only part way there. Changed the string to "AudioFile" and I was
back to silence again, despite "AudioFile" being the label assigned to
property Prop.AudioFile earlier, the value having been set to "C:\test.wav".
 
G

Gaz

Thanks for explaining how it should work David, much appreciated.

Unfortunately it is one of the many variations I have tried, but without
success.
I shall try another few variations today and see if I can find one it "likes".

Regards.
 
G

Gaz

Just to finish off. Once I knew the name I had to use, it turned out just to
be a case of blundering along until I discovered there are times when the
quotes are not needed. Now seems ok.

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top