如何使程序选择随机.wav文件并播放? [英] How do I make a program to select random .wav file and play it?
问题描述
我实际上有0个编程经验,并希望制作一个程序(最好是.exe)来检测按下字母或字母组合的时间,并在检测到时播放.wav文件。最终目标是让我的门在打开时从我喜欢的歌曲或引用中播放一条线。我把它设置成当我的门被打开时,2个钉子接触到连接到鳄鱼夹子的钩子连接到电路板上,该电路板将一个字母或一组字母发送到我的电脑上。目前它只是将字母w发送到我的电脑,但我打算把它变成像ctrl shift w那样更具特色的东西。
ps:我在窗户上
什么我试过了:
我试过在电子邮件的java脚本中编写一个程序,但除了问题之外什么都没有。
I have virtually 0 programming experience and want to make a program (.exe preferably) to detect the when a letter or combination of letters is pressed and play a .wav file when it detects that. The end goal is to have my door play a line from a song or quote I like when it is opened. I have it set up so that when my door is opened 2 nails make contact that are connected to alligator clips hooked up to a circuit board which sends the a letter or combination of letters over to my computer. currently it just sends the letter w to my computer but I plan on making it sometthing more specefic like ctrl shift w.
ps: I'm on windows
What I have tried:
I have tried making a program in java script in electron but have had nothing but problems.
推荐答案
对于非程序员来说,这几乎是不可能的,因为它需要至少一种编程语言和框架的知识。学习.NET。而C#可能是一个很好的起点。
This is almost impossible to answer for a non-programmer, as it requires knowledge of at least one programming language and framework. Learning .NET. And C# is probably a good starting point.
这篇关于如何使程序选择随机.wav文件并播放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!