mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Hi, because $input doesn;t handle unicode I decided to make a custom window to act as the input.

I quickly realized that I wouldn't be able to make it act like the input identifier. For instance.

/set %var $input(Enter Text,e,Input)

I can't think of a way I could return the value in the input event of the Input window to this set command, but more importantly to be able to handle any command dynamically.


Anyone have any ideas?

Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
The way to reproduce $input is to use $dialog() to call a dialog table that represent what your $input would looks like.
I don't know if unicode are displayed fine on dialog so this might not solve your problem but that the only way to get the $input behavior.

edit : tried quickly, unicode doesn't show properly


Last edited by Wims; 21/10/09 09:25 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
My question is to reproduce what $input or $?="" does when you use it in a command.

ex:

/set %var $?="Enter Unicode Value"
/set %var $input(Enter Unicode Value,e,Input)

You would need to use the input event for the custom window, but by that time it's too late to return.

I guess you could make switches.

$input(text,-s,variable name)

Code:
alias input_ {
set %sw_ = $2
set %com_ = $3
}
on *:input:@input:{
if (%sw = -s) set $+(%,%com_) $1-
}


But this would require writing a switch for every possible command you would use an input window for.

So any ideas how I could replace the $input dialog with this @input window?


Link Copied to Clipboard