lookjapan.COM - IRC ve mIRC dünyasının forumu!

lookjapan.COM - IRC ve mIRC dünyasının forumu! (http://www.lookjapan.com/index.php)
-   TCL Scriptler (http://www.lookjapan.com/forumdisplay.php?f=69)
-   -   Google kelime aramalarinda sira bulucu tcl (http://www.lookjapan.com/showthread.php?t=1601)

No_FeaR 06 Mayıs 2015 08:01

Google kelime aramalarinda sira bulucu tcl
 
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

Düzenlemesi Gerek Kısımlar ;
Kod:

# Kanal'i belirtin.
set ara(kanal) "#Webmaster"

# Komut on eki.
set ara(komut) ".ara"

Gerekli TCL ;
Kod:

#####
# ¿ #
#####

# Kanal'i belirtin.
set ara(kanal) "#Webmaster"

# Komut on eki.
set ara(komut) ".ara"

##########
# CISS ! #
##########

bind pub – $ara(komut) ara:sira
proc ara:sira {nick uhost hand chan text} {
global botnick ara
        if {[string match -nocase $ara(kanal) $chan]} {
                set url "[lindex $text 0]"
                set keyword "[lrange $text 1 end]"
                regsub -all " " $keyword "%20" keyword
                if {$url == ""} { putquick "PRIVMSG $chan :Kullanimi: .ara <url> <kelime> seklindedir."; return 0 }
                if {$keyword == ""} { putquick "PRIVMSG $chan :Kullanimi: .ara $url <kelime> seklindedir."; return 0 }
                set apiweb "http://proje.ircdepo.tk/sirabulucu/api.xml?url=$url&keyword=$keyword"
                catch {set sayfa [::http::geturl $apiweb -timeout 5000]} error
                if {[string match -nocase "*couldn't open socket*" $error]} {
                        putquick "PRIVMSG $chan :Hata: Suan siteye baglanilamiyor... Daha sonra tekrar deneyiniz..."
                        ::http::cleanup $sayfa
                        return 0
                }
                if {[::http::status $sayfa] == "*timeout*"} {
                        putquick "PRIVMSG $chan :Hata: Baglanti zaman asimina ugradi..."
                        ::http::cleanup $sayfa
                        return 0
                }
                set html "[::http::data $sayfa]"
                ::http::cleanup $sayfa
                regexp -nocase {<hata>(.*?)</hata>} $html match hata
                regexp -nocase {<sonuc>(.*?)</sonuc>} $html match sonuc
                regexp -nocase {<sira>(.*?)</sira>} $html match sira
                regexp -nocase {<link>(.*?)</link>} $html match link
                if {[info exists hata]} {
                        putquick "PRIVMSG $chan :4$hata"
                }
                if {[info exists sonuc]} {
                        putquick "PRIVMSG $chan :12G4o7o12g3l4e 1siralamaniz asagida yer almaktadir:"
                        putquick "PRIVMSG $chan :"
                        putquick "PRIVMSG $chan :10Aranan(lar):"
                        putquick "PRIVMSG $chan :4Url:2 $url"
                        regsub -all "%20" $keyword " " keyword
                        putquick "PRIVMSG $chan :4Kelime:2 $keyword"
                        putquick "PRIVMSG $chan :"
                        putquick "PRIVMSG $chan :10Sonuc(lar):"
                        putquick "PRIVMSG $chan :4Siraniz:2 $sira"
                        putquick "PRIVMSG $chan :4Link:2 $link"
                        putquick "PRIVMSG $chan :"
                        putquick "PRIVMSG $chan :12G4o7o12g3l4e 1sorgulama sonu..."
                }
                ::http::cleanup $html
        }
}

#######
# SON #
#######

Kodun Yazarı ; ¿

Goemon 06 Mayıs 2015 09:02

Cevap: Google kelime aramalarinda sira bulucu tcl
 
Güzel cr içinde olsa süper olurmuş

No_FeaR 09 Mayıs 2015 00:46

Cevap: Google kelime aramalarinda sira bulucu tcl
 
@[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] CR'de Bu Şekilde Çalışırmış, Denemedim Ama Kod Bu.. ^^ : )

Kod:

#####
# ¿ #
#####

# Kanal'i belirtin.
set ara(kanal) "#Webmaster"

# Komut on eki.
set ara(komut) ".ara"

##########
# CISS ! #
##########

bind pub – $ara(komut) ara:sira
proc ara:sira {nick uhost hand chan text} {
global botnick ara
        if {[string match -nocase $ara(kanal) $chan]} {
                set url "[lindex $text 0]"
                set keyword "[lrange $text 1 end]"
                regsub -all " " $keyword "%20" keyword
                if {$url == ""} { putquick "PRIVMSG $chan :Kullanimi: .ara <url> <kelime> seklindedir."; return 0 }
                if {$keyword == ""} { putquick "PRIVMSG $chan :Kullanimi: .ara $url <kelime> seklindedir."; return 0 }
                set apiweb "http://proje.ircdepo.tk/sirabulucu/api.xml?url=$url&keyword=$keyword"
                catch {set sayfa [::http::geturl $apiweb -timeout 5000]} error
                if {[string match -nocase "*couldn't open socket*" $error]} {
                        putquick "PRIVMSG $chan :Hata: Suan siteye baglanilamiyor... Daha sonra tekrar deneyiniz..."
                        ::http::cleanup $sayfa
                        return 0
                }
                if {[::http::status $sayfa] == "*timeout*"} {
                        putquick "PRIVMSG $chan :Hata: Baglanti zaman asimina ugradi..."
                        ::http::cleanup $sayfa
                        return 0
                }
                set html "[::http::data $sayfa]"
                ::http::cleanup $sayfa
                regexp -nocase {<hata>(.*?)</hata>} $html match hata
                regexp -nocase {<sonuc>(.*?)</sonuc>} $html match sonuc
                regexp -nocase {<sira>(.*?)</sira>} $html match sira
                regexp -nocase {<link>(.*?)</link>} $html match link
                if {[info exists hata]} {
                        putquick "PRIVMSG $chan :4$hata"
                }
                if {[info exists sonuc]} {
                        putquick "PRIVMSG $chan :12G4o7o12g3l4e 1siralamaniz asagida yer almaktadir:"
                        putquick "PRIVMSG $chan :"
                        putquick "PRIVMSG $chan :10Aranan(lar):"
                        putquick "PRIVMSG $chan :4Url:2 $url"
                        regsub -all "%20" $keyword " " keyword
                        putquick "PRIVMSG $chan :4Kelime:2 $keyword"
                        putquick "PRIVMSG $chan :"
                        putquick "PRIVMSG $chan :10Sonuc(lar):"
                        putquick "PRIVMSG $chan :4Siraniz:2 $sira"
                        putquick "PRIVMSG $chan :4Link:2 $link"
                        putquick "PRIVMSG $chan :"
                        putquick "PRIVMSG $chan :12G4o7o12g3l4e 1sorgulama sonu..."
                }
                ::http::cleanup $html
        }
}

#######
# SON #
#######


Goemon 09 Mayıs 2015 08:00

Cevap: Google kelime aramalarinda sira bulucu tcl
 
Denemem lazım en kısa zamanda


All times are GMT +3. The time now is 03:12.

Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.