Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: VB Scripts with Amulet based on Weather Example.

VB Scripts with Amulet based on Weather Example. 5 years 7 months ago #596

  • Ben
  • Ben's Avatar
So it's really not super awesome, however I have written (my first) VB Script to tell you the Current Date based on your computer.

Using the example eddy showed us with the weather script, place the vb script in your "C:\Programdata\Amulet Devices" folder. The script is called Date.VBS.

Use the Command line that eddy showed us earlier:

;Tell The Date Amulet...Or Else!!
Command = What is The Date?
Action=runback "C:\Windows\System32\CScript.exe" "C:\ProgramData\Amulet Devices\Date.vbs"


Here is The Date.VBS Download

It's not the most savvy script but it works.
The administrator has disabled public write access.

Re: VB Scripts with Amulet based on Weather Example. 5 years 7 months ago #597

  • eddy
  • eddy's Avatar
  • OFFLINE
  • Administrator
  • Posts: 191
  • Thank you received: 2
  • Karma: 5
Seems to work well!

Thanks for sharing,

Eddy
The administrator has disabled public write access.

Re: VB Scripts with Amulet based on Weather Example. 5 years 6 months ago #610

  • ben
  • ben's Avatar
This VBscript will Tell you what's on TV based on your favorite shows to watch. Both for the current night and also the next day.


What's on T.V. tonight and Tormarrow

It's unfinished, I plan on doing a btter job with an array, and perhaps hving text boxes to input your shows, but it'll work if yu edit the vbscript by adding your own shows to the instring lines.
The administrator has disabled public write access.

Re: VB Scripts with Amulet based on Weather Example. 5 years 6 months ago #613

  • eddy
  • eddy's Avatar
  • OFFLINE
  • Administrator
  • Posts: 191
  • Thank you received: 2
  • Karma: 5
This VBscript will Tell you what's on TV based on your favorite shows to watch. Both for the current night and also the next day
Nice idea; I could see this being handy for quite a few people.

To make it more generally useful, you might look at reading in the lists of favorite shows from a separate text file (one per line) instead of hard-coding them in the VBScript; that would make it much easier to keep the list of shows updated, as needed, without having to edit VBScript all the time.

Looking forward to hearing what you come up with next :-)

Eddy
The administrator has disabled public write access.

Re: VB Scripts with Amulet based on Weather Example. 5 years 6 months ago #615

  • ben
  • ben's Avatar
acually I'd love to use this nifty little tool.
dl.dropbox.com/u/3450750/MessageSender.rar

It sends an external message to MCE in the forms of popups.

I'd like to call it from vbscript. SO I can use it with amulet. But I'm not sure how to script it so I can fill out the fields in the exe. I can run the Message Sender, but can not make it say anything at the moment.

SO the TV app will be editable from a txt file. That is no problem, and the option to have the TV Series names popup as well, in case you miss what the talker is saying.
Should be a cool little app.

Also the Voice Watcher.exe if finally ready to present! This will watch the SpeechCOmmandFile.TXT and then search your Movie Folders for the Movie you said. If there isn't a movie there then it will report NULL and ignore it. That way when you say a movie name the corrisonding Movie.XML will already be loaded and ready when you run the script from AMulet.

It's accually pretty fantastic. YOu reallyt should take a look if you use media browser.


Special mThanks to TObias TObin at MB. He's an outragously awesome programmer.

Voice Watch 1.0
The administrator has disabled public write access.

Re: VB Scripts with Amulet based on Weather Example. 5 years 6 months ago #616

  • ben
  • ben's Avatar
I removed the link to the watcher because we are still working on a final product. But when it is finished it will be pretty useful tool for amulet users. Until further notice. :)
It will allow you to pick tv shows that are your favorites and then the talker will tell you if they are on that night or the next. It will also allow you to pick items from the Media Browser movie.mxl for the talker to say back to you, and place them in sentence form.
The administrator has disabled public write access.

Re: VB Scripts with Amulet based on Weather Example. 5 years 5 months ago #655

  • eddy
  • eddy's Avatar
  • OFFLINE
  • Administrator
  • Posts: 191
  • Thank you received: 2
  • Karma: 5
ben wrote:
acually I'd love to use this nifty little tool.
dl.dropbox.com/u/3450750/MessageSender.rar

It sends an external message to MCE in the forms of popups.

I'd like to call it from vbscript. SO I can use it with amulet. But I'm not sure how to script it so I can fill out the fields in the exe. I can run the Message Sender, but can not make it say anything at the moment.
Sorry Ben, I missed this part of your query first time around.

While MessageSender seems to be hard-coded to only allow text to be input through the dialog interface (not very easily scriptable), there is another utility for doing MCE popups which might work better for you - it includes a command line tool to send the popup text using command line parameters.

It's called MC Message Popup and you can download it from here (you'll need to register for a free account first to get access to the download).

Eddy
Last Edit: 5 years 5 months ago by eddy.
The administrator has disabled public write access.

Create Media Browser Custom Commands VBScript 5 years 5 months ago #676

  • ben
  • ben's Avatar
Hello,

I have written a script that will check your movie folders and create a Custom Command List that will work with Media Browser:

This script is almost finished, but I thought that I'd post what I had so far to get people started creating their Commands for Media Browser.

Simply copy and paste to a text file and save as:

MediaBrowserCustomCOmmand.vbs

Fill in the "ShowFolderList" with your Movie Drive. If you have more than one this script with append the next drive to the textfile(it will not overwite your new commands).

Fill in the "OpenTextFile" with the directory and name for your new custom command file. I didn't want to save to the AMulet FOlder, you can cut and paste to your Amulet Custom COmmands File or add it to the line (again it will append, not overwite).

Here it is:


showfolderlist "MOVIE DRIVE HERE"

Sub ShowFolderList(folderspec)

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folderspec)
Set fc = f.SubFolders

For Each f1 in fc
PauseStr = "{280ms}"



If Left(f1.name,3) = "The" Then
ActionStr = Mid(f1.name,5,1) & PauseStr

else

ActionStr = Left(f1.name,1) & PauseStr

end if

NameStr = Mid(f1.name,2,3)

If instr(1,NameStr," ") then
NameStr = mid(f1.name,2,1) &"{280ms} """
else
NameStr = Mid(f1.name,2,3) &"{280ms} """
end if


s = s & ";;Media Browser Movie Search"
s = s & vbCrLf
s = s & "command = " &f1.name
s = s & vbCrLf
s = s & "Response = *" &f1.name
s = s & vbCrLf
s = s & "Action = Sendkeys """ & ActionStr & NameStr
s = s & vbCrLf
s = s & vbCrLf
next

Header = ";==================================================================================================================" & vbCrLf & ";==============================================Media Browser Movie Commands========================================" & vbCrLf & ";==================================================================================================================" & vbCrLf

Set fso = CreateObject("Scripting.FileSystemObject")
'OpenTextFile Parameters:
'-Filename
'-The 2 is for writing... 1 is reading and 8 is appending
'-The "True" is to create if not already there.
Set fl = fso.OpenTextFile("C:\Users\*****\Desktop\MediaBrowserCustomCommands.txt", 8, True)



fl.write Header & s

fl.Close : Set fl = Nothing
Set fso = Nothing



End Sub




Keep Fit and Have Fun!!
The administrator has disabled public write access.

Re: VB Scripts with Amulet : Custom Command Maker 5 years 4 months ago #683

  • chef
  • chef's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 51
  • Karma: 1
I have now finished writting a program called

Amulet/Mediabrowser Custom Commands Maker


This image is hidden for guests. Please log in or register to see it.

You can run it as many times as you want for each drive and it will create the commands to use with media browser for you.

Right now it will create the new commands file in you programdata/amulet Devices folder called"Media Browser Custom COmmands.txt"

If anyone wants to test it and it works well, then I'll make it append to the CustomCOmmands.txt that Amulet uses.

Please let me know what you think.

Download
Attachments:
  • Attachment This image is hidden for guests. Please log in or register to see it.
Last Edit: 5 years 4 months ago by chef.
The administrator has disabled public write access.

Re: VB Scripts with Amulet: Reindex Custom Command 5 years 4 months ago #684

  • chef
  • chef's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 51
  • Karma: 1
Here is a script that will reload Custom Commands into AMulet without turning off Media Center and Turning it back on again.

I have created a folder in my C:\ProgramData\Amulet Devices folder called Scripts, where I keep the weather script that eddy made as well as some other scripts posted in this thread.

Custom Commands Should look like this:

;;Scripts
Command = Reindex Custom Commands
Action=runback "C:\Windows\System32\CScript.exe" "C:\ProgramData\Amulet Devices\Scripts\Index New Custom Commands.vbs"


[url=Download
Last Edit: 5 years 4 months ago by chef.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.285 seconds
Powered by Kunena Forum