hya all , got a problem with a whisper dialog iv been using , its the one from the guarddog script , iv recoded it slightely to work with the scritp i have , how ever most of the coding is 100% origional ,
im also using the smileview script iv taken coding form versions 1.3 and 2.0 , to get the script to work correctly , but the majority of the coding is form version 1.3
the problem im haivn is this
i have got the dialog wortking with the smileview coding and with out ,
how ever when i close the whisper dialog window when its using the coding fomr the smileview script , it will send the error E_INVALID_WINDOW, to the server and dissconnect me
ne ideas ?
heres the slightelly recoded versio fo the guard dog whisper dialog with the smileview coding .
alias ndlln { return $shortfn($mircdir) $+ dlls\nHTMLn_2.95.dll }
alias mdx { return $shortfn($mircdir) $+ dlls\mdx.dll }
alias views { return $shortfn($mircdir) $+ dlls\views.mdx }
alias bars { return $shortfn($mircdir) $+ dlls\bars.mdx }
alias dialogmdx { return $shortfn($mircdir) $+ dlls\dialog.mdx }
alias whiser.jpeg { return $shortfn($mircdir $+ smilesys\icons\ $+ $1 $+ .jpg) }
alias whiser.ico { return $shortfn($mircdir $+ smilesys\icons\ $+ $1 $+ .ico) }
alias whisper {
set %whispernick $1-
if (!$dialog(whisperw. [ $+ [ %whispernick ] ])) {
dialog -mvd whisperw. [ $+ [ %whispernick ] ] whisperw. [ $+ [ %whispernick ] ]
dialog -t whisperw. [ $+ [ %whispernick ] ] $msn.decode(%whispernick) : 1 to 1 whisper
}
else { .query $1- }
}
dialog whisperw.* {
title "1 on 1 Whisper"
size -1 -1 432 228
option pixels
icon smilesys\icons\whisper.ico, 0
text "To:", 1, 8 9 18 16
text "", 2, 30 5 226 20
icon 3, 263 3 26 24, smilesys\icons\whisperignore.jpg, 0
icon 4, 300 3 123 24, smilesys\icons\viewprofile.jpg, 0
button "", 5, 8 32 418 164
edit "", 6, 8 202 340 20, autohs limit 255
button "Whisper", 7, 352 200 74 24
}
on *:dialog:whisperw.*:init:*: {
dll $mdx SetMircVersion $version
dll $mdx MarkDialog $dname
dll $mdx SetDialog $dname bgcolor $rgb(239,239,247)
dll $mdx SetColor $dname 1,2 background $rgb(239,239,247)
dll $mdx SetColor $dname 1,2 textbg $rgb(239,239,247)
dll $mdx SetFont $dname 2 18 700 Arial
dll $mdx SetControlMDX $dname 5 Window > $dialogmdx
window -h @ $+ %whispernick -1 -1 700 300
if (!$exists(DllTmp/Dll $+ $window(@ $+ %whispernick $+ ).hwnd $+ .dll)) {
.copy -o SmilesView.dll DllTmp/Dll $+ $window(@ $+ %whispernick $+ ).hwnd $+ .dll
dll DllTmp/Dll $+ $window(@ $+ %whispernick $+ ).hwnd $+ .dll attach $window(@ $+ %whispernick $+ ).hwnd
dll DllTmp/Dll $+ $window(@ $+ %whispernick $+ ).hwnd $+ .dll navigate about:blank
.timer $+$window(@ $+ %whispernick $+ ).hwnd -m 0 1 HTMLLoad @ $+ %whispernick
}
did -a $dname 5 grab $window(@ $+ %whispernick $+ ).hwnd @ $+ %whispernick
did -ra $dname 2 $replace($msn.decode(%whispernick),>,Guest_)
did -t $dname 7
if (>* iswm %whispernick) { did -g $dname 4 smilesys\icons\viewprofiledis.jpg }
did -f $dname 6
}
on *:dialog:whisperw.*:close:*: {
.timer $+$window(@ $+ %chan $+ ).hwnd off
if ($var(%chan [ $+ [ $window(@ $+ %whispernick $+ ).hwnd ] ]) != $null) {
if (%chan [ $+ [ $window(@ $+ %whispernick $+ ).hwnd ] ]) unset %chan [ $+ [ $window(@ $+ %whispernick $+ ).hwnd ] ]
else %chan [ $+ [ $window(@ $+ %whispernick $+ ).hwnd ] ] = $true
}
}
on *:dialog:whisperw.*:sclick:3: {
if ($level($address($right($dname,-9),1)) != ignore) {
auser ignore $address($right($dname,-9),1)
/ignore $right($dname,-9) 1
echo $comchan($right($dname,-9),1) 14 $chr(155) $msn.decode(You are now ignoring $replace($right($dname,-9),>,Guest_) $+ .)
}
if ($level($address($right($dname,-9),1)) == ignore) {
.ruser ignore $address($right($dname,-9),1)
/ignore -r $right($dname,-9) 1
echo @ $+ $right($dname,-9) 10 $+ $msn.decode(You are no longer ignoring $replace($right($dname,-9),>,Guest_) $+ .)
did -g $dname 3 smilesys\icons\whisperignore.jpg
did -f $dname 2
}
}
on *:dialog:whisperw.*:sclick:4: { if ($left($did(2),6) != Guest_) { PROP $right($dname,-9) PUID } }
on *:dialog:whisperw.*:sclick:7: {
set %whispernick $right($dname,-9)
if ($did(6).text == $null) { $input(You need to have text entered in before you can whisper the user.) }
elseif ($left($1,1) == /) { / $+ $1- }
else { echo @ $+ %whispernick $+ $msn.decode($me) $+ : $did(6).text | .privmsg %whispernick $did(6).text | did -f $dname 6 }
did -r $dname 6
halt
}
on ^*:OPEN:?:*: {
set %whispernick $nick
if (%whispernick == $me) { closemsg $nick | unset %whispernick | haltdef | return }
splay ChatroomWhsp
if (!$dialog(whisperw. [ $+ [ %whispernick ] ])) {
dialog -mvd whisperw. [ $+ [ %whispernick ] ] whisperw. [ $+ [ %whispernick ] ]
dialog -t whisperw. [ $+ [ %whispernick ] ] $msn.decode(%whispernick) : 1 to 1 whisper
}
closemsg %whispernick
}
on *:TEXT:*:?: {
echo @ $+ $nick 2 $+ $msn.decode($nick) : $1-
closemsg $nick
haltdef
}
ctcp *:ERR*:*: {
if ($2 == NOUSERWHISPER) {
echo @ $+ %whispernick 4 $+ Your previous message could not be sent because that user does not allow Whispers.
haltdef
}
}
on *:JOIN:#: { if ($window(@ $+ $nick)) { echo @ $+ $nick 3 $+ $msn.decode($nick has joined the conversation.) } }
on *:PART:#: { if ($window(@ $+ $nick)) { echo @ $+ $nick 4 $+ $msn.decode($nick has left the conversation.) } }
agane the only problem im having with this , is when the dialog window is closed
i been up all nigth working on this n its buggin the hell outta me lol
and sugestions on what it might be woudl be gratlyu apreciated
Additional
just been looking though the codign for version 2.0 for the smileview script and found the follosing coding
alias query {
if (($IriXChan($active)) || ($1 == IriX)) %IriXActuChan [ $+ [ $window(Status Window).hwnd ] ] = $active
query $1
if (!$exists(DllTmp/Dll $+ $window($1).hwnd $+ .dll)) {
.copy -o SmilesView.dll DllTmp/Dll $+ $window($1).hwnd $+ .dll
if (($os == 98) || ($os == ME) || ($os == 95) || ($os == NT) || ($os == 2K)) { timer 1 1 dll DllTmp/Dll $+ $window($1).hwnd $+ .dll attach $window($1).hwnd | .timer 1 1 dll DllTmp/Dll $+ $window($1).hwnd $+ .dll navigate about:blank }
else { dll DllTmp/Dll $+ $window($1).hwnd $+ .dll attach $window($1).hwnd | dll DllTmp/Dll $+ $window($1).hwnd $+ .dll navigate about:blank }
.timer $+ $window($1).hwnd -m 0 1 HTMLLoad $1
}
}
on *:open:?: {
if (!$exists(DllTmp/Dll $+ $window($nick).hwnd $+ .dll)) {
.copy -o SmilesView.dll DllTmp/Dll $+ $window($nick).hwnd $+ .dll
if (($os == 98) || ($os == ME) || ($os == 95) || ($os == NT) || ($os == 2K)) { timer 1 1 dll DllTmp/Dll $+ $window($nick).hwnd $+ .dll attach $window($nick).hwnd | .timer 1 1 dll DllTmp/Dll $+ $window($nick).hwnd $+ .dll navigate about:blank }
else { dll DllTmp/Dll $+ $window($nick).hwnd $+ .dll attach $window($nick).hwnd | dll DllTmp/Dll $+ $window($nick).hwnd $+ .dll navigate about:blank }
set %PV [ $+ [ $window($nick).hwnd ] ] $1-
.timer $+ $window($nick).hwnd -m 0 1 HTMLLoad $nick
}
}
how ever the coding gives the same error as the one im using with the whisper dialog , agane i got no idea why :S
thanx
TA aka lee