sound - plays wav files.
Цитата: sound ("C:\t.wav ", 1);
The first parameter is the path to the file
second:
0 - lose one time
1 - to loop.
does not stop execution of the script.
stop playing
Цитата: sound (0);
you can pack into resources and play around like this ..
Цитата: unpack ("C:\club.wav", tempfolder () + "t.wav", 1);
sound (tempfolder()+"t.wav ", 1);
messagebox ("stop");
sound (0);
RESOURCE
{
"C:\club.wav"
}
Simultaneous playback of wav or mp3 files can be performed using mciSendString
CODE: external (INT, "mciSendString", "mciSendStringA", "Winmm.dll");
mciSendString ("open C:\1 \ b.wav", 0, 1, 0); // Long
mciSendString ("open C:\1 \ h.wav", 0, 1, 0); // Short
loop ()
{
mciSendString ("play C:\1 \ b.wav", 0, 1, 0);
loop (20)
{
mciSendString ("play C:\1 \ h.wav", 0, 1, 0);
sleep (100);
mciSendString ("close C:\1 \ h.wav", 0,1, 0);
}
mciSendString ("close C:\1 \ b.wav", 0,1, 0);
}
Playback loop
CODE: external (INT, "mciSendString", "mciSendStringA", "Winmm.dll");
char SST [256];
int adr=address (#SST [0]);
mciSendString ("open C:\1 \ b.wav", 0, 1, 0);
loop ()
{
mciSendString ("play C:\1 \ b.wav", 0, 1, 0);
mciSendString ("status C:\1 \ b.wav mode", adr, 256, 0);
while (format (#SST [0]) == "playing") mciSendString ("status C:\1 \ b.wav mode", adr, 256, 0);
mciSendString ("close C:\1 \ b.wav", 0,1, 0);
messagebox ("Truncate, possible first"); // Comment for looping
}
============================================
getting color components in RGB
Цитата: int a=16776960; // color in int
int r= rvalue (a); // red component (1 byte)
int g= gvalue (a); // green
int b= bvalue (a); // blue
int col= rgb (r, g, b); // back to int
messagebox (b);
messagebox (col);
----- The Visual Code Editor is Kibor. Creating bots without knowledge of programming.
Learning function for recognizing text.
----- |