Reflection Tools for Verbots

Tips and questions about scripting your Verbot®.

Moderator: Staff

Reflection Tools for Verbots

Postby Matt » Thu Aug 03, 2006 6:44 pm

There was a post awhile back about RSS feeds and Verbots and how you could make your Verbot into a virtual News caster. This idea is intriguing to me and I've wanted to work on that idea for some time and have now begun to start it. Aaron had put together a simple proof of concept KB that he sent to me recently... which brings me to the purpose of this post:

One thing Aaron did that I thought was cool was use something in C# called "Reflection" (which is a way to dynamically compile code and execute methods, it is what we use to actually generate the executables from verbot code modules). He was using it because some Libraries in C# aren't "Referenced" by default, one example was the System.Web.HttpUtilities namespace, where he wanted to use the HtmlDecode method. So, figuring his work could be generalized into a nice reusable function, I took what he did and created ReflectTools, and I've uploaded my first version to the forums here.

Oh and BTW... I'm still hoping to get a RSS news reader KB developed, keep posted on the forums!
Matt
OmnipotentBot
OmnipotentBot
 
Posts: 2079
Joined: Thu Feb 26, 2004 10:48 pm
Location: Calabasas, CA

It might have been me

Postby Randal » Sun Aug 13, 2006 1:52 am

Hi Matt,

It might have been me who was working on something like that. I had written a program to read a website, strip out the headlines and save it into a text file, and then use the Verbot to read the text file. The problem I was having was that it would read the text file first before executing the program and there wasn't an easy way to get around that. Also, the website threw in some HTML from time to time and it would try to read <B> for instance.

I could get back on it if you'd like and see if I can clean it up and make it work better. I was just busy working on an application for my small business and had to take a break from Verbots for a while.

Randy
Randal
MightyBot
MightyBot
 
Posts: 171
Joined: Mon Oct 03, 2005 1:05 am
Location: Atlanta, GA

Postby Matt » Tue Aug 15, 2006 5:48 pm

Well, it's good to see you back Randall, I was working on the RSS parser and then I hit that nasy 0 byte saving bug while working on my code module and lost all my changes, so I moved onto other things, but when I get a chance I'll work on it some more and upload it.
Matt
OmnipotentBot
OmnipotentBot
 
Posts: 2079
Joined: Thu Feb 26, 2004 10:48 pm
Location: Calabasas, CA

It's good to be back.

Postby Randal » Fri Aug 18, 2006 12:06 am

It's been hectic trying to work, run a business, manage my home, and be engaged although it's slightly on the rocks I think we are going forward with our nuptuals.

In the meantime, I keep thinking about using this to help out. I may go back to my routine and see if I can find a way to make it work later. For now, I'm setting up our work knowledge so that I get called less frequently at home. Besides, it will benefit me too at 3:00am to have a knowledge base ready at my finger tips as most likely I won't be able to think so well. :)

Randy
Randal
MightyBot
MightyBot
 
Posts: 171
Joined: Mon Oct 03, 2005 1:05 am
Location: Atlanta, GA

Postby Matt » Sat Aug 19, 2006 12:10 am

I finished and uploaded my first RSS News Feed Reader Bot version, check it out here.

Thanks to Aaron for giving me a good sample starting point.
Matt
OmnipotentBot
OmnipotentBot
 
Posts: 2079
Joined: Thu Feb 26, 2004 10:48 pm
Location: Calabasas, CA

I downloaded it.

Postby Randal » Sat Aug 19, 2006 1:22 am

Hi Matt,

It's almost like what I had except that yours gets the info first and then prints and says it. Nice job! :)

The Reflection tool that you had on August 3 isn't available for download and I tried leaving a message on that board and got some kind of SQL error instead.

I'd like to learn more about this as I have an idea on tying this into a local cable network web page to retrieve information about my favorite shows coming on and later make the cable box switch to it when I get the components for it.

Thanks, this gives me something to work with. :)

Randy
Randal
MightyBot
MightyBot
 
Posts: 171
Joined: Mon Oct 03, 2005 1:05 am
Location: Atlanta, GA

Re: I downloaded it.

Postby Matt » Sat Aug 19, 2006 1:30 am

Randal wrote:Hi Matt,
The Reflection tool that you had on August 3 isn't available for download and I tried leaving a message on that board and got some kind of SQL error instead.

Oh, thanks for letting me know, that's weird I wonder what happened with that one, I'll check it out and re-upload those Reflection Tools.

Your Welcome for the News Feed Reader, it's something I've wanted to do with verbots for some time. I still need it to read only a portion of the text and then Starship troopers style: Would you like to hear more?

-Matt
Matt
OmnipotentBot
OmnipotentBot
 
Posts: 2079
Joined: Thu Feb 26, 2004 10:48 pm
Location: Calabasas, CA

Starship Troopers

Postby Randal » Sat Aug 19, 2006 2:28 am

I don't recall how that went. I saw the movie a few years ago but hardly remember it.

BTW, I added some science and space newsfeeds to the knowledge base you sent me. I found an RSS site with thousands of links.

http://www.2rss.com/

I'll probably add another one here and there and change it so that it actually will respond when I ask, "What's the news for today in science?" or something close to that.

Randy
Randal
MightyBot
MightyBot
 
Posts: 171
Joined: Mon Oct 03, 2005 1:05 am
Location: Atlanta, GA

Postby Somniator » Sat Aug 19, 2006 10:28 pm

I tried out the feed.vkb but did not get any reply. :-(
My verbot paused and the input text rested at it's place as if a code or a try to connect was working in the background, but after that nothing happened.

Is it necessary to subscribe the news feeds or do any other things to get the news?
Somniator
MightyBot
MightyBot
 
Posts: 260
Joined: Mon Jul 17, 2006 10:22 pm

Postby Matt » Sat Aug 19, 2006 10:52 pm

Hmmm, it should work, make sure your .vkb is on the top of the list and after it's open you can just type "google" and then it'll show you the headlines.

BTW... I've reuploaded the Reflection Tools, so they should be available again for download.
Matt
OmnipotentBot
OmnipotentBot
 
Posts: 2079
Joined: Thu Feb 26, 2004 10:48 pm
Location: Calabasas, CA

Thanks, just got it.

Postby Randal » Sun Aug 20, 2006 12:04 am

Thanks Matt,

I just downloaded it and ran it. I'm not sure what it does yet but if it is what I hope, from what I've seen on the news reader, I should be able to scrub a web site real time.

I'm looking for a remote control system that I can either build, use already (I've got two from Mindstorms), or purchase that will control my stereo, television, dvd player, cable box... my bedroom is an electrical nightmare I'm afraid.

So my idea is that if I can get this to work, I can have Alexis scrub my cable page (I found it finally) and tell me what time CSI or SG-1 is coming on and tell me what the episode is about and have her to turn on the television and cable box, change the channel, and so-forth.

It's ambitious but I believe all the technology is at my fingertips, I just have to figure out how to use it all.

Thanks,

Randy
Randal
MightyBot
MightyBot
 
Posts: 171
Joined: Mon Oct 03, 2005 1:05 am
Location: Atlanta, GA

Re: Thanks, just got it.

Postby Matt » Sun Aug 20, 2006 12:15 am

That all sounds really cool and fun, Jer is into the lego robots too and has been playing with the Nxt, but not with verbots.
Make sure you keep us updated on your progress, we'd love to hear how it turns out, and of course if you need any help we'll gladly point you in the right direction.

Randal wrote:So my idea is that if I can get this to work, I can have Alexis scrub my cable page (I found it finally) and tell me what time CSI or SG-1 is coming on and tell me what the episode is about and have her to turn on the television and cable box, change the channel, and so-forth.


If your Cable company doesn't provide some sort of feed for you maybe you could find one that has your cable company's programming. Doing a search on google for "tv rss listings" I found this link you might find useful but I'm sure there are many more resources.
Not sure about time zones, etc... But it might be worth doing a little reasearch before writing the parsing or "scrubbing" code if there is a feed you can use already.
Matt
OmnipotentBot
OmnipotentBot
 
Posts: 2079
Joined: Thu Feb 26, 2004 10:48 pm
Location: Calabasas, CA

Postby NeilNafus » Sun Aug 20, 2006 2:51 am

hehe, I just picked up the nxt set on friday. That thing is a blast, i've managed to get absolutely nothing done, but my bot can pick up a ball and drop it off elsewhere :)
NeilNafus
ScribeBot
ScribeBot
 
Posts: 72
Joined: Fri Aug 04, 2006 4:19 pm
Location: Patterson, Ga

Postby bluespace » Sun Aug 20, 2006 5:09 am

thanks matt :) looks cool the newsreader, but is there any limit in connection speed to get the rss feeds ?(i am using 128kbps, 8KBdownload speed) , i am not getting google or slashdot, but the apejet (aaronblog) is working
bluespace
MasterBot
MasterBot
 
Posts: 449
Joined: Tue Jul 20, 2004 12:44 pm
Location: MilkyWay- Solar System- Earth- Asia- India- Kerala- Kochi (All Aliens R Invited)

Postby Somniator » Sun Aug 20, 2006 8:04 pm

Sorry Matt, but the news reader still is doing nothing on my machine. :?

I am using Firefox because my IE does not get an internet connection. I suppose that your RSS reading code uses some IE features that do not work on my system.
Somniator
MightyBot
MightyBot
 
Posts: 260
Joined: Mon Jul 17, 2006 10:22 pm

Next

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron