Can we add a smiley on the fly in an Editbox of a dialog ? ![]()
like:
did -a dlgname 2 Hello $me (H) how are you :D ?
what i want is to Add text with smiley on the fly in dialog if anyone know how to do it reply plz !
A TG007 community discussion started by feroz_shamsi.
Can we add a smiley on the fly in an Editbox of a dialog ? ![]()
like:
did -a dlgname 2 Hello $me (H) how are you :D ?
what i want is to Add text with smiley on the fly in dialog if anyone know how to do it reply plz !
Seeing as how emoticons are not default in mIRC's program or Dialog Studio, I highly doubt its possible in an editbox. But, you could use a did event to use an icon path for it
did -a dlgname 2 Hello $me pathto\icons\hoticon.ico how are you pathto\icons\smileyicon.ico ?
Something like that might work, not sure .. you can try it.
Yes, you can. You will just need to add a $replace command, and know $chr numbers. For instance, the $chr of : would be $chr(58) and the $chr of ) would be $chr(41).
You will also need to use something like nhtmln_2.95.dll to add an html window to your dialogs window. To get you started here is a code to do that with. Just replace <id> with your dialog windows id, and <dname> with your dialogs name...
on *:dialog:<dname>:init:*:{
var %hwnd $dll($shortfn($findfile($mircdir,nhtmln_2.95.dll)),item,$dialog($dname).hwnd id:<id>)
dll $shortfn($findfile($mircdir,nhtmln_2.95.dll)) attach %hwnd
dll $shortfn($findfile($mircdir,nhtmln_2.95.dll)) navigate about:blank
}
The above code will get your dialog ready to view smiles. Now, you will need the replace code. Here is an example of the replace code...
alias repsmiles {
var %repsmiles = $1-
%repsmiles = $replace(%repsmiles,$chr(58) $+ $chr(41),<img SRC=" $+ $shortfn($findfile($mircdir,smile.gif,1)) $+ ">)
return %repsmiles
}
Now you will need the text event. Since you have an html window you can't use the regular commands you normally would to make text show up in the window. You will need to use html coding to add text to the window. Here is what you will need...
on *:TEXT:*:*: {
;This code is needed to select the html window where the text will go to. (used if you have two or more html windows opened)
.echo -q $dll($shortfn($findfile($mircdir,nhtmln_2.95.dll)),select,$dialog(<dname>).hwnd
;This code sends text to the window
.echo -q $dll($shortfn($findfile($mircdir,nhtmln_2.95.dll)),execScript document.body.innerHTML=document.body.innerHTML+' $+ $nick $+ $repsmiles($1-) $+ <br>')
;This code is needed to scroll down
.echo -q $dll($shortfn($findfile($mircdir,nhtmln_2.95.dll)),execScript scroll(0,9999999999))
}
...and that is it. Just add the codes you want replaced, and replace <dname> with your dialogs name along with changing <id> to your dialogs window dialogid. ![]()
Yes, you can. You will just need to add a $replace command, and know $chr numbers. For instance, the $chr of : would be $chr(58) and the $chr of ) would be $chr(41).
or use $asc ![]()
People are like slinkies; they're generally boring until you push them down stairs
$asc doesn't give all $chr characters, such as ",". However, you can use this alias to list characters for you...
alias characters {
var %c = 1
:next
write characters.txt $chr(36) $+ chr $+ $chr(40) $+ %c $+ $chr(41) = $chr(%c)
inc %c
if (%c < 301) goto next
}
or if you want to know just one character you can use this code...
alias ch {
var %c = 1
set %ch $1-
:next
if ($chr(%c) == %ch) { echo -a $chr(36) $+ chr $+ $chr(40) $+ %c $+ $chr(41) | halt }
else {
inc %c
if (%c < 300) goto next
}
}
;format /ch ! or /ch ,
Thanks For the reply all (Y)
let me try this ![]()
i forgot how to say 'a' ![]()
I'm glad this topic has come up as it gives me a chance to address a question I've often thought about. Using bars.mdx to populate a list with icons on a toolbar, is it possible to have an icon as a %var that can change on certain events?
Example: I have an icon that is a nice shiny, green circle. I click it, and I connect to the last IRC server I was on. Upon connection the green icon is replaced with a shiny red circle icon. If I then click on the icon (button) it disconnects me from the server & becomes the green icon (button) again?
Possible?
Get the Tech outta here!
pretty sure it is ive seen it done before but as u know me i dont do mirc anymore so no idea how to ask ozzster or x-troutfish(fusion) or somthing...
you can use variables, as when your using bars, you normally need to implement the code on the side. With GD5's Custom Nicklist, it has a toolbar, which is customizeable, i just made an alias do to the icon assignment, and if it gets updated, i just recall the alias, and it updates the icons with whatever is placed in the storage place for the icons, in your case a variable, in mine a hash entry/ini file.
lol i cant get dcx to do anything
been messing with it for the past hr
meh i hate it already, looks like more work involved ![]()
Sign in to reply or start a new topic where your account has permission.