Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Ace
« on: March 15, 2009, 06:25:02 AM »

Should we be posting gnome scripts that annoy the crap out of people sometimes?  For the amount of people we could get, I go against it.  You can send it via PM.
Posted by: Reason
« on: March 14, 2009, 09:11:33 PM »

Double Posts are for Admins
Posted by: riffruff
« on: March 14, 2009, 06:54:21 PM »

Quote from: Hale_
It was two topics about the same thing. This one you just requested it and you requested it in the other one too, which kind of makes it the same thing.
Silly hale...
Posted by: Vector
« on: March 14, 2009, 09:25:54 AM »

Gah, I feel like tardiness will cost me one.

Try this out. So far, it just returns results, with a link to each result:

Code: [Select]
'gp
'0.1
'&Google Plugin:Vector:Searches google, and returns the results of the search
'*
'*
'*
'*
'*Fun

Const gpAcc = 20

Public xmlGet, arrFloodProtect

Sub gp_Event_Load()
  Set xmlGet = CreateObject("Microsoft.XmlHttp")
End Sub

Sub gp_Event_UserTalk(Username, Flags, Message, Ping)
  GetDBEntry Username, a, f : If a < gpAcc Then Exit Sub

  If Left(Message, Len(BotVars.Trigger) + 6) = BotVars.Trigger & "gfind " Then
    getQuery = Right(Message, Len(Message) - (Len(BotVars.Trigger) + 6))
    getQuery = Replace(getQuery, " ", "+")
    Call retrieveResult(getQuery)
  End If
End Sub

Sub retrieveResult(getQuery)
  xmlGet.Open "GET", "http://www.google.com/search?hl=en&q="&getQuery&"&btnG=Google+Search&aq=f&oq=", False
  xmlGet.Send ""

  content = xmlGet.ResponseText

  getNumResults = Split(Split(content, "Results ")(1), "&nbsp;</div>")(0)
  getNumResults = strip(getNumResults)
  AddQ getNumResults

  parseResults = Split(Split(content, "Search Results")(1), "http://")

  idx = -1
  For i=0 to Ubound(parseResults)
    getLink = Split(parseResults(i), """")(0)

    If Len(getLink) > 25 Then
      getLink = "http://" & Split(getLink, "/")(0) & " [link truncated]"
    Else
      getLink = "http://" & getLink
    End If

    If InStr(parseResults(i), "this.href,'','','res'") Then
      getText = Split(parseResults(i), "this.href,'','','res'")(1)
      getText = Split(getText, "</a>")(1)
      getText = Replace(getText, "<a href""", "")
      getText = Strip(getText)
      getText = Trim(Left(getText, Len(getText) - 9))
      If Len(getText) > 140 Then getText = Left(getText, 140) & " ..."
      getElem = getText & " Link: " & getLink

      idx = idx + 1
      ReDim Preserve arrFloodProtection(idx)
      arrFloodProtection(idx) = getElem
    End If
  Next

  For i=0 to Ubound(arrFloodProtection)
    AddQ arrFloodProtection(i)
  Next
End Sub

Function strip(parseOutChars)
  tagF = Array("&quot;", "<b>", "</b>")
  tagR = Array("""", "", "")

  getTagCount = Ubound(Split(parseOutChars, "<"))

  For i=1 to getTagCount
    getTag = Split(Split(parseOutChars, "<")(i), ">")(0)
    parseOutChars = Replace(parseOutChars, getTag, vbNullString, 1, 1)
  Next
  parseOutChars = Replace(parseOutChars, "<>", vbNullString)

  i = 0
  For each tag in tagF
    parseOutChars = Replace(parseOutChars, tag, tagR(i))
    i = i + 1
  Next

  strip = parseOutChars
End Function
Posted by: EKLIPz
« on: March 13, 2009, 08:22:38 PM »

No, one was a project for a gnome bot, one was a request for a google search. Totally different.
Posted by: Hale_
« on: March 13, 2009, 08:05:05 PM »

It was two topics about the same thing. This one you just requested it and you requested it in the other one too, which kind of makes it the same thing.
Posted by: EKLIPz
« on: March 13, 2009, 10:06:06 AM »

Two totally different topics...ideas...and, ideas. Google Script is a plugin for searching google, which was a request, and Joel is working on it.

The Gnome was a project for me....and anyone that wanted to help, making it a "Group Project". And it was to help me learn VBS.

 Should not have been merged.
Posted by: Hale_
« on: March 13, 2009, 06:38:04 AM »

Don't create two Threads with the same thing. Merged Topics.
Posted by: Reason
« on: March 12, 2009, 05:40:44 AM »

With all the gnome scripts around, I might make one of my own, FailGnome!
Posted by: EKLIPz
« on: March 11, 2009, 10:11:11 PM »

Well, I skipped a step, and have set up a MySQL table for a channel list to visit. And A form for people to add their channel. Maybe eventually I will add something different, so I don't have random people adding channels, but this is fine for now. And once I get it all set up, maybe the bot can read from the DB on which channels to visit.

http://ekreationz.comuf.com/ggnome.php
Posted by: EKLIPz
« on: March 11, 2009, 08:46:13 PM »

[size=]GoogleGnome[/size]

This is kind of my way at attempting to learn VBS. I am not sure on all of the details, but, here is what I got so far.

GoogleGnome, much like the previous and current Gnomes, will go from channel to channel, collecting data. It will begin with very few channels. The data being collected is undetermined. I am trying to come up with something google related. If anyone can come up with and ideas, that would be great. Like I stated b4, this is a project for me to get an understanding of VBS and just the bot in general. I have never written a script, so, all help would be helpful. I have quite a few tutorials and help sites I am going by, and just generally looking at existing scripts to get some knowledge. If anyone is bored, and has time to blow, maybe I can get someone that knows VBS some to partner up with.

On to the script. My current tasks are creating a "GGnome" mode that will start its travel to channels.

This is the script I have so far.

Code: [Select]
'gg
'1.0
'&GoogleGnome Plugin By EKLIPz
'&
'&
'&My Scipting project.

Sub gg_Event_Load()
    AddChat vbGreen, "EKLIPz' GoogleGnome v.01 plugin loaded."
End Sub

Sub blank_Event_Close()
    AddChat vbCyan, "GoogleGnome closing."
End Sub

**Remember, this is not a request, I am not looking for someone to make this for me. Any help or tips is fine, and maybe a partner, but, other then that, this is my project.
Posted by: Vector
« on: March 11, 2009, 10:39:14 AM »

I was in the process of working on flood protection for it, but I'll get to testing it later on.
Posted by: EKLIPz
« on: March 10, 2009, 01:14:17 PM »

Nope. It's a google bot. (Googlism@USEast)

And Joel is kindly already working on it. I saw some working tests earlier today.

Thanks tho. If you want to make a "Dogpile" script, that is fine. But Google > *
Posted by: Ace
« on: March 10, 2009, 01:12:14 PM »

A. We didn't forget about it, it couldn't have been done easily.
B. Would other search engines work? (ex. Dogpile?)
Posted by: Vector
« on: March 09, 2009, 12:57:57 PM »

The queries into the google database are relatively fast. Only querying the search URL won't be as fast as querying a URL that doesn't require retrieval of information in a database.