dupa

Author Topic: run and exe or play a wav etc..  (Read 3781 times)

silhouett

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • http://whyonearth.com
run and exe or play a wav etc..
« on: January 24, 2003, 10:01:49 pm »
I add the following to the vbscript as a test to see if I can make
hal play a song, it works...

'Inserted to shell for a song.
If InStr(UserSentence, "PLAY AARON") > 0 Then
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run("realplay.exe D:CreativeworkAaronsSpaz.mp3")

Is there a way I ask to make hal say something I place directly in quotes like here is your song?

I also would love to see the ability in the keyword function to run an exe from its path even if it does not have a shortcut. I would
also like to see music added like "play this" as a command.
"Display this" and perhaps "visit web site"

If you have any ideas or if zabaware reads this maybe they could share their thoughts on this as well.

silhouett@whyonearth.com
Charles Bridges

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
run and exe or play a wav etc..
« Reply #1 on: January 25, 2003, 11:07:48 pm »
Yes, Hal will say whatever is in the GetResponse function variable. Using your example you could write:

'Inserted to shell for a song.
If InStr(UserSentence, "PLAY AARON") > 0 Then
  Set objWSHShell = CreateObject("WScript.Shell")
  objWSHShell.Run("realplay.exe D:CreativeworkAaronsSpaz.mp3")
  GetResponse = GetResponse & "Here is your song." & vbCrLf
End If


Every time Hal runs, Hal scans your start menu for shortcuts and writes all the information to a file called programs.dat located in Hal's folder. If you disable automatic scanning from Hal's start up options, you can edit this file yourself to include any links. The link can be a document, exe, shortcut, anything windows can open. Just be sure automatic scanning is disabled, otherwise Hal will delete all your changes at startup.
Robert Medeksza