# usage: post.tcl filename
#
-package require tclole 0.1
+package require tclole 0.2
package require http
proc wait {ajax timeout} {
}
proc Main {filename {title {}}} {
- set url "http://paste.tclers.tk/-New"
+ #set url "http://paste.tclers.tk/-New"
+ set url "http://paste.patthoyts.tk/-New"
if {$title eq {}} { set title "file: $filename" }
set f [open $filename r]
t $title \
p $content]
- set ajax [ole::create MSXML2.XMLHTTP]
+ set ajax [ole::ref create MSXML2.XMLHTTP]
$ajax open POST $url
$ajax send $data
set r [catch [linsert $argv 0 Main] err]
if {$r} {puts $::errorInfo} else {if {[string length $err]>0} {puts $err}}
exit $r
-}
\ No newline at end of file
+}