Skip to main content
Sometimes, runing and testing fme scripts can be tedious....

 

 

 

so break the monotony!

 

 

import winsound

 

import time

 

# Play Wavs

 

# Python also accepts the forward slash

 

soundfile = "H:\\\\Documents\\\\My Music\\\\startitup"

 

winsound.PlaySound(soundfile, winsound.SND_FILENAME|winsound.SND_ASYNC)

 

 

# wait one and a half seconds

 

time.sleep(1.5)

 

 

 

and shutdownscript:

 

 

import winsound

 

import time

 

# Play Wavs

 

# Python also accepts the forward slash

 

soundfile = "H:\\\\Documents\\\\My Music\\\\gameover"

 

winsound.PlaySound(soundfile, winsound.SND_FILENAME|winsound.SND_ASYNC)

 

 

 

These i now have as startup and sutwons...lol

 

(wavs can be downloaded from villagegeek.com; or use or wavs..)

 

 

 

Or use windows sounds, for example:

 

 

import winsound

 

# Play Windows exit sound.

 

winsound.PlaySound("SystemExit", winsound.SND_ALIAS)

 

 

 

haha, you've switched to Python?

 

 

# Shutdown Tcl Script

 

package require twapi

 

twapi::play_sound SystemExit -alias

Reply