home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Language specific support
MediaPortal Forums Francais
MediaPortal 1 - Développement
Les plugins
synthése vocale
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="gnoacco" data-source="post: 435748"><p>bien sûr... je vais mettre ci dessous l'intégralité du fichier...</p><p></p><p>par contre, si quelqu'un pouvait me dire où trouver un moteur de recon. voc en français, je suis preneur !</p><p></p><p>fichier (pour afficher le code, fermez le formulaire, et appuyez sur Alt+F11, puis allez sur UserForm1, cliquez droit, puis sur code):</p><p></p><p></p><p></p><p>Option Explicit</p><p></p><p>Private Declare Function ShellExecute Lib "shell32.dll" _</p><p>Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal _</p><p>lpOperation As String, ByVal lpFile As String, ByVal _</p><p>lpParameters As String, ByVal lpDirectory As String, _</p><p>ByVal nShowCmd As Long) As Long</p><p></p><p></p><p>Private Sub CommandButton1_Click()</p><p>Dim chemin</p><p>Dim sFile As String</p><p>Dim noth As Long</p><p>chemin = ActiveWorkbook.Path</p><p>noth = ShellExecute(0, "OPEN", chemin & "\motsclés.txt", "", "C:", 1)</p><p></p><p>End Sub</p><p></p><p>Private Sub UserForm_Activate()</p><p></p><p> Dim SpeechGrammer As String</p><p> SpeechGrammer = "[Grammar]" & vbCrLf & _</p><p> "langid = 1033" & vbCrLf & _</p><p> "type=cfg" & vbCrLf & _</p><p> "[<Start>]" & vbCrLf & _</p><p> "<start>=O K " & vbCrLf & _</p><p> "<start>=next song" & vbCrLf & _</p><p> "<start>=precedent song" & vbCrLf & _</p><p> "<start>=last page" & vbCrLf & _</p><p> "<start>=down" & vbCrLf & _</p><p> "<start>=right" & vbCrLf & _</p><p> "<start>=left" & vbCrLf & _</p><p> "<start>=up" & vbCrLf & _</p><p> "<start>=wait" & vbCrLf & _</p><p> "<start>=media portal" & vbCrLf & _</p><p> "<start>=exit media portal" & vbCrLf & _</p><p> "<start>=show menu " & vbCrLf & _</p><p> "<start>=Tom Jones is a" & vbCrLf & _</p><p> "<start>=sex bomb" & vbCrLf & _</p><p> "<start>=select item " & vbCrLf & _</p><p> "<start>=open Notepad"</p><p> </p><p> vcrVoice.GrammarFromString SpeechGrammer</p><p> vcrVoice.Activate</p><p> </p><p>End Sub</p><p></p><p>Private Sub vcrVoice_PhraseFinish(ByVal flags As Long, ByVal beginhi As Long, ByVal beginlo As Long, ByVal endhi As Long, ByVal endlo As Long, ByVal Phrase As String, ByVal parsed As String, ByVal results As Long)</p><p>Dim sFile As String</p><p>Dim noth As Long</p><p></p><p>Label1.Caption = Phrase</p><p>Select Case Phrase</p><p></p><p>Case Is = "Tom Jones is a"</p><p>MsgBox ("Sex Bomb !!")</p><p></p><p>Case Is = "open Notepad"</p><p>sFile = "\system32\notepad.exe"</p><p>noth = ShellExecute(0, "OPEN", Environ("SystemRoot") & sFile, "", "", 1)</p><p></p><p>Case Is = "next song" 'I use this one as an example : you can use the word you want, it still works !</p><p>SendKeys ("{F4}") 'F4 I use it to play the next song in a playlist</p><p></p><p>Case Is = "precedent song"</p><p>SendKeys ("{F3}") 'F3</p><p></p><p>Case Is = "last page"</p><p>SendKeys ("{ESC}") 'ESCAPE</p><p></p><p>Case Is = "wait"</p><p>SendKeys Chr(32) 'SPACE BAR</p><p></p><p>Case Is = "O K"</p><p>SendKeys ("{ENTER}") ' ENTER</p><p></p><p>Case Is = "left"</p><p>SendKeys ("{LEFT}") 'LEFT ARROW</p><p></p><p>Case Is = "right"</p><p>SendKeys ("{RIGHT}") 'RIGHT ARROW</p><p></p><p>Case Is = "down"</p><p>SendKeys ("{DOWN}") 'DOWN ARROW</p><p></p><p>Case Is = "up"</p><p>SendKeys ("{UP}") 'UP ARROW</p><p></p><p>Case Is = "show menu" 'I use this one to display the context menu associated with a file/song/video</p><p>SendKeys ("{F9}")</p><p></p><p>Case Is = "select item" 'I use this one to put the selected folder/artist/album in the playlist (normally y in mediaportal)</p><p>SendKeys ("{F8}") 'F8</p><p></p><p>Case Is = "media portal" 'I use this one to open MediaPortal ! Change the address if yours is different</p><p>noth = ShellExecute(0, "OPEN", "C:\Media Center\MediaPortal.exe", "", "C:", 1)</p><p></p><p>Case Is = "exit media portal"</p><p>SendKeys ("%{F4}") ' = ALT+F4 I use this one to close MediaPortal</p><p></p><p>End Select</p><p>End Sub</p></blockquote><p></p>
[QUOTE="gnoacco, post: 435748"] bien sûr... je vais mettre ci dessous l'intégralité du fichier... par contre, si quelqu'un pouvait me dire où trouver un moteur de recon. voc en français, je suis preneur ! fichier (pour afficher le code, fermez le formulaire, et appuyez sur Alt+F11, puis allez sur UserForm1, cliquez droit, puis sur code): Option Explicit Private Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal _ lpOperation As String, ByVal lpFile As String, ByVal _ lpParameters As String, ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Private Sub CommandButton1_Click() Dim chemin Dim sFile As String Dim noth As Long chemin = ActiveWorkbook.Path noth = ShellExecute(0, "OPEN", chemin & "\motsclés.txt", "", "C:", 1) End Sub Private Sub UserForm_Activate() Dim SpeechGrammer As String SpeechGrammer = "[Grammar]" & vbCrLf & _ "langid = 1033" & vbCrLf & _ "type=cfg" & vbCrLf & _ "[<Start>]" & vbCrLf & _ "<start>=O K " & vbCrLf & _ "<start>=next song" & vbCrLf & _ "<start>=precedent song" & vbCrLf & _ "<start>=last page" & vbCrLf & _ "<start>=down" & vbCrLf & _ "<start>=right" & vbCrLf & _ "<start>=left" & vbCrLf & _ "<start>=up" & vbCrLf & _ "<start>=wait" & vbCrLf & _ "<start>=media portal" & vbCrLf & _ "<start>=exit media portal" & vbCrLf & _ "<start>=show menu " & vbCrLf & _ "<start>=Tom Jones is a" & vbCrLf & _ "<start>=sex bomb" & vbCrLf & _ "<start>=select item " & vbCrLf & _ "<start>=open Notepad" vcrVoice.GrammarFromString SpeechGrammer vcrVoice.Activate End Sub Private Sub vcrVoice_PhraseFinish(ByVal flags As Long, ByVal beginhi As Long, ByVal beginlo As Long, ByVal endhi As Long, ByVal endlo As Long, ByVal Phrase As String, ByVal parsed As String, ByVal results As Long) Dim sFile As String Dim noth As Long Label1.Caption = Phrase Select Case Phrase Case Is = "Tom Jones is a" MsgBox ("Sex Bomb !!") Case Is = "open Notepad" sFile = "\system32\notepad.exe" noth = ShellExecute(0, "OPEN", Environ("SystemRoot") & sFile, "", "", 1) Case Is = "next song" 'I use this one as an example : you can use the word you want, it still works ! SendKeys ("{F4}") 'F4 I use it to play the next song in a playlist Case Is = "precedent song" SendKeys ("{F3}") 'F3 Case Is = "last page" SendKeys ("{ESC}") 'ESCAPE Case Is = "wait" SendKeys Chr(32) 'SPACE BAR Case Is = "O K" SendKeys ("{ENTER}") ' ENTER Case Is = "left" SendKeys ("{LEFT}") 'LEFT ARROW Case Is = "right" SendKeys ("{RIGHT}") 'RIGHT ARROW Case Is = "down" SendKeys ("{DOWN}") 'DOWN ARROW Case Is = "up" SendKeys ("{UP}") 'UP ARROW Case Is = "show menu" 'I use this one to display the context menu associated with a file/song/video SendKeys ("{F9}") Case Is = "select item" 'I use this one to put the selected folder/artist/album in the playlist (normally y in mediaportal) SendKeys ("{F8}") 'F8 Case Is = "media portal" 'I use this one to open MediaPortal ! Change the address if yours is different noth = ShellExecute(0, "OPEN", "C:\Media Center\MediaPortal.exe", "", "C:", 1) Case Is = "exit media portal" SendKeys ("%{F4}") ' = ALT+F4 I use this one to close MediaPortal End Select End Sub [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Language specific support
MediaPortal Forums Francais
MediaPortal 1 - Développement
Les plugins
synthése vocale
Contact us
RSS
Top
Bottom