This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Simple socket script

Old posts that have not been replied to for several years.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

hmm, the google script im using uses the commands in the order:
package require http
...
set token [http::config -useragent $agent]
set token [http::geturl $query]
set html [http::data $token]

except the egghttp -> http they seem very alike, maybe it helps.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
L
Longbow
Voice
Posts: 29
Joined: Thu Jan 13, 2005 9:24 am

Post by Longbow »

Ah, I was able to get it to work with another script, but whilst i'm here...

How do I calculate something in tcl?

I need $mem + $anon
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

Use expr.
L
Longbow
Voice
Posts: 29
Joined: Thu Jan 13, 2005 9:24 am

Post by Longbow »

Thanks.

I just found another small problem....

HTML code:

Code: Select all

<!--START-->qwe<br />asd<br />zxc<br /><!--END-->
TCL snippet code:

Code: Select all

regexp {<!--START-->(.*?)<br />} $html - first
regexp {<br />(.*?)<br />} $html - second
regexp {<br />(.*?)<br /><!--END-->} $html - third

putserv "PRIVMSG $chan :$first"
putserv "PRIVMSG $chan :$second"
putserv "PRIVMSG $chan :$third"
My bot says:
qwe
asd
asd<br />zxc
As you can see the third line is saying "asd<br />" when it shouldn't be. :?

And "qwe / asd / zxc" change each time by the way.
Locked