edsager Posted May 5, 2005 Share Posted May 5, 2005 Hello, I include my little code to help understand my situation: ;Open up EdLaptop to Y DriveMapAdd ("Y:", "\\EdLaptop\EdLaptop") Select Case @error="" SoundPlay ("C:\Windows\Media\chimes.wav") Case @error>0 SoundPlay ("C:\Windows\Media\chord.wav") MsgBox (309, "Error", "Failure to connect Network Drive.", "") EndSelect ;WinClose ("title", "") SoundPlay ("C:\Windows\Media\chimes.wav") I tried If Then statements as well, but I cannot seem to get the chimes.wav to play when teh DriveMapAdd is successful. However, if an error occurs, the chord.wav plays just fine. Any ideas? Thanks, edsager Link to comment Share on other sites More sharing options...
buzz44 Posted May 5, 2005 Share Posted May 5, 2005 (edited) Try. DriveMapAdd ("Y:", "\\EdLaptop\EdLaptop") If NOT @error Then SoundPlay ("C:\Windows\Media\chimes.wav") Else SoundPlay ("C:\Windows\Media\chord.wav") MsgBox (309, "Error", "Failure to connect Network Drive.") EndIf SoundPlay ("C:\Windows\Media\chimes.wav"); Need This line? Edited May 5, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
edsager Posted May 6, 2005 Author Share Posted May 6, 2005 Try.DriveMapAdd ("Y:", "\\EdLaptop\EdLaptop") If NOT @error Then SoundPlay ("C:\Windows\Media\chimes.wav") Else SoundPlay ("C:\Windows\Media\chord.wav") MsgBox (309, "Error", "Failure to connect Network Drive.") EndIf SoundPlay ("C:\Windows\Media\chimes.wav"); Need This line?<{POST_SNAPBACK}>Thank you.I tried that and it still will not play the chimes.wav when successful, and it still plays the chord.wav when unsuccessful.Also, as per your suggestion, I got rid of the last SoundPlay.I am a bit at a loss and corn-fused as to why it will not work. The .wav files are exactly where they should be on the hard drive. Again, thank you,edsager Link to comment Share on other sites More sharing options...
quaizywabbit Posted May 6, 2005 Share Posted May 6, 2005 (edited) try this....$map = DriveMapAdd ("Y:", "\\EdLaptop\EdLaptop") Select Case $map = 1 OR ($map <> 0 AND @error == 0) SoundPlay ("C:\Windows\Media\chimes.wav") Case @error = 1 SoundPlay ("C:\Windows\Media\chord.wav") MsgBox (309, "Error", "Undefined / Other error") Case @error = 2 SoundPlay ("C:\Windows\Media\chord.wav") MsgBox (309, "Error", "Access to the remote share was denied") Case @error = 3 SoundPlay ("C:\Windows\Media\chord.wav") MsgBox (309, "Error", "The device is already assigned") Case @error = 4 SoundPlay ("C:\Windows\Media\chord.wav") MsgBox (309, "Error", "Invalid device name") Case @error = 5 SoundPlay ("C:\Windows\Media\chord.wav") MsgBox (309, "Error", "Invalid remote share") Case @error = 6 SoundPlay ("C:\Windows\Media\chord.wav") MsgBox (309, "Error", "Invalid password") EndSelect Edited May 6, 2005 by quaizywabbit [u]Do more with pre-existing apps![/u]ANYGUIv2.8 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now