mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
#43386 21/08/03 09:27 PM
P
pheonix
pheonix
P
Quote:
alias ver.close { if ($isFile(data.txt)) { var %lastline = $read(data.txt, $lines(data.txt)) .remove data.txt } else var %lastline = Could not download file. did -ra versioncheck 1 %lastline}

he was using her script, and he obviously(again, sorry if im wrong) doesnt have much experience with scripting or maybe just dialogs.

#43387 21/08/03 09:30 PM
Joined: Dec 2002
Posts: 1,518
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,518
dialog update { title Update Panel size -1 -1 400 500 button "Ok" ,1, 0 475 75 25,ok button "Clear" ,3, 75 475 75 25 Edit "" ,2, 5 3 390 470,read,multi}

ok look at the name of that dialog? it is infact called UPDATE not VERSIONCHECK thats why it is posting that error ..... there is NO dialog named VERSIONCHECK why is that so hard to understand for u?

#43388 21/08/03 09:32 PM
P
pheonix
pheonix
P
that isnt hard to understand for me, but like i said: if he doesnt have much experience with dialogs then how do you expect him to correct that error, codemaster's right you are rude, you posted that before you even knew what i was talking about.

#43389 21/08/03 09:36 PM
I
Iceman0145
Iceman0145
I
no I don't know alot about scripting but i am trying to learn and i did open the update dialog and it still did not work here is what i have in the romte file

dialog update {
title Update Panel
size -1 -1 400 500

button "Ok" ,1, 0 475 75 25,ok
button "Clear" ,3, 75 475 75 25

Edit "" ,2, 5 3 390 470,read,multi
}
alias checkver { sockopen ver area51script.fairmount.nu 80 }
on 1:SOCKOPEN:ver: {
if ($sockerr > 0) return
sockwrite -n $sockname GET /update.txt HTTP/1.1
sockwrite -n $sockname Host: area51script.fairmount.nu
sockwrite -n $sockname Connection: keep-alive
sockwrite $sockname $crlf if ($isFile(data.txt))
.remote data.txt
}
on 1:SOCKREAD:ver: {
sockread -f &data
bwrite data.txt -1 -1 &data
; speeds up things so we dont have to wait for the socket to close..
.timerver 1 1 siver.close
}
alias ver.close {
if ($isFile(data.txt)) {
var %lastline = $read(data.txt, $lines(data.txt))
.remove data.txt
}
else var %lastline = Could not download file.
did -ra update 2 %lastline
}



and here is what it shows when I type /socklist *

* Open sockets:
-
update 66.139.78.173:80 tcp active (on: 63.189.64.72 4294)

#43390 21/08/03 09:38 PM
Joined: Dec 2002
Posts: 1,518
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,518
wah pity party for u. no the fact is u didnt read what i was saying ..... i was telling u that even tho he was using someones code the error he was getting was because of a bad dialog name ... now if me pointing out to somone something u over looked is me being rude well i cant help that. I am sure tho u will get over it.

#43391 21/08/03 09:39 PM
K
KoRn18
KoRn18
K
who's "she"?

#43392 21/08/03 09:43 PM
Joined: Dec 2002
Posts: 1,518
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,518
where is the alias for this?

.timerver 1 1 siver.close

i see one called ver.close but not siver.close?

#43393 21/08/03 09:45 PM
K
KoRn18
KoRn18
K
thats my mistake... sorry

#43394 21/08/03 09:45 PM
P
pheonix
pheonix
P
my reply:
Quote:
he was using her script, and he obviously(again, sorry if im wrong) doesnt have much experience with scripting or maybe just dialogs.

your reply:
Quote:
dialog update { title Update Panel size -1 -1 400 500 button "Ok" ,1, 0 475 75 25,ok button "Clear" ,3, 75 475 75 25 Edit "" ,2, 5 3 390 470,read,multi}

ok look at the name of that dialog? it is infact called UPDATE not VERSIONCHECK thats why it is posting that error ..... there is NO dialog named VERSIONCHECK why is that so hard to understand for u?


since when i did i say i couldnt understand it?
k, i read your post wrong, sorry for it being a crime frown, but why did you feel the need to type: why is that so hard to understand for u?
?

#43395 21/08/03 09:48 PM
Joined: Dec 2002
Posts: 1,518
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,518
oh np at all .. im just tryin to figure out where the error is so that the poster can get something working ...

#43396 21/08/03 09:51 PM
K
KoRn18
KoRn18
K
Here ya go, should work great
Code:
dialog update {
title Update Panel
size -1 -1 400 500

button "Ok" ,1, 0 475 75 25,ok
button "Clear" ,3, 75 475 75 25

Edit "" ,2, 5 3 390 470,read,multi
}
alias checkver { sockopen ver area51script.fairmount.nu 80 }
on 1:SOCKOPEN:ver: {
if ($sockerr > 0) return 
sockwrite -n $sockname GET /update.txt HTTP/1.1 
sockwrite -n $sockname Host: area51script.fairmount.nu 
sockwrite -n $sockname Connection: keep-alive 
sockwrite $sockname $crlf if ($isFile(data.txt)) 
.remote data.txt
}
on 1:SOCKREAD:ver: {
sockread -f &data
bwrite data.txt -1 -1 &data
; speeds up things so we dont have to wait for the socket to close..
.timerver 1 1 ver.close
}
alias ver.close {
if ($isFile(data.txt)) {
var %lastline = $read(data.txt, $lines(data.txt))
.remove data.txt
} 
else var %lastline = Could not download file.
if ($dialog(update)) { did -ra update 2 %lastline }
else { dialog -m update update | did -ra update 2 %lastline }
}

#43397 21/08/03 10:08 PM
I
Iceman0145
Iceman0145
I
still nothing I even install a new copy of mirc na dtryied it in there and still nothing

#43398 21/08/03 10:20 PM
Joined: Dec 2002
Posts: 1,518
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,518
ok try this one ... i got it to work ... it had a couple typos in it i cleared up

dialog update {
title Update Panel
size -1 -1 400 500
button "Ok" ,1, 0 475 75 25,ok
button "Clear" ,3, 75 475 75 25
Edit "" ,2, 5 3 390 470,read,multi
}
alias checkver { sockopen ver area51script.fairmount.nu 80 }
on 1:SOCKOPEN:ver: {
if ($sockerr > 0) return
sockwrite -n $sockname GET /update.txt HTTP/1.1
sockwrite -n $sockname Host: area51script.fairmount.nu
sockwrite -n $sockname Connection: keep-alive
sockwrite $sockname $crlf if ($isFile(data.txt))
.remove data.txt
}
on 1:SOCKREAD:ver: {
sockread -f &data
bwrite data.txt -1 -1 &data
; speeds up things so we dont have to wait for the socket to close..
timerver 1 1 ver.close
}
alias ver.close {
if ($isFile(data.txt)) {
var %lastline = $read(data.txt, $lines(data.txt))
.remove data.txt
}
else var %lastline = Could not download file.
echo -a %lastline
if ($dialog(update)) { did -ra update 2 %lastline }
else { dialog -m update update | echo -a %lastline | did -ra update 2 %lastline }
}


***** make sure u type /remote on .. as the version of this u were testing turned your remotes off due to one of the typos ..... anyhow hope this works for u now

Last edited by _D3m0n_; 21/08/03 10:22 PM.
#43399 21/08/03 10:31 PM
I
Iceman0145
Iceman0145
I
I must be doing something wrong how woul di start this up should I open the update dialog frist or should i open the scoket frist? or is there something else

#43400 21/08/03 10:35 PM
Joined: Dec 2002
Posts: 1,518
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,518
just type /checkver in any open window and hit enter make sure u do type /remote on before this because the other script pasted before disabled it

#43401 21/08/03 10:54 PM
I
Iceman0145
Iceman0145
I
thanks everybody it works grin grin grin

#43402 21/08/03 11:03 PM
I
Iceman0145
Iceman0145
I
I don't know what I did worng but I went to chage the update.txt on my hosting site and when I went back and run the script again it gave me this


* Timer ver activated
-
* /echo: insufficient parameters (line 29, errormsgs)
-
* Timer ver halted
-

#43403 22/08/03 03:46 AM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
I just read all that, and all i have to say is holy crap.

Everyone gets mad for posting untested code, and I had to have seen 10 version of code "well try this one.." "Ohh, well you need to do this one..." "This should work.."

*sigh*

Page 2 of 2 1 2

Link Copied to Clipboard