茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1675913 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
IMG_60D_00058.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

微軟帝國 : [轉貼]Playing sounds in PowerShell

發表者 討論內容
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]How to play beep and other system sounds

#16 : How to play beep and other system sounds?

Below piece of code can be used to play a beep from a Powershell script. I have used in many of scripts where user interaction is required. Presenting a list of different sounds which can be played from a Powershell script.

Beep:
  1. #--Statement to play beep from Powershell Scripts --#    
  2. clear   
  3. [System.Media.SystemSounds]::Beep.Play()   
Hand:

  1. #--Statement to play hand from Powershell Scripts --#    
  2. clear   
  3. [System.Media.SystemSounds]::Hand.Play()   
Asterisk:
  1. #--Statement to play Asterisk from Powershell Scripts --#    
  2. clear   
  3. [System.Media.SystemSounds]::Asterisk.Play()   
    Exclamation:
    1. #--Statement to play Exclamation from Powershell Scripts --#    
    2. clear   
    3. [System.Media.SystemSounds]::Exclamation.Play()   
    Please test and let me know your response. Thanks.

    原文出處:Som's Powershell Tips: #16 : How to play beep and other system sounds?
    前一個主題 | 下一個主題 | | | |

    討論串



    
    Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|