|
Joined: Jan 2003
Posts: 22
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2003
Posts: 22 |
very simple question....I hope
if I use:
Land:/.msg Daemon !search -l $$?="Value #1" $$?="Value #2"
I get first one box, then a second box to appear after something has been entered into the first one
what I want is a single box to appear, that will accept the 2 values at once
also, what are these things called? Is it dialog's? sorry, I had a search on the forums, but I wasnt sure what I needed to be searching for
|
|
|
|
Joined: Sep 2003
Posts: 156
Vogon poet
|
Vogon poet
Joined: Sep 2003
Posts: 156 |
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
Land:/.msg Daemon !search -l $$?="<Value #1> <Value #2>" ? -genius_at_work
|
|
|
|
Joined: Jan 2003
Posts: 22
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2003
Posts: 22 |
yeah I tried that, along with http://www.mircscripts.org/showdoc.php?type=tutorial&id=27however, Im not even sure if dialogs is what I need to be looking at, hence why I asked even using /help dialog and the link I posted, I couldnt see how to do what I wanted apologies, but Im very inexpierenced with this level of scripting btw mods, if posting that link breaks any rules, please remove it from this post
|
|
|
|
Joined: Jan 2003
Posts: 22
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2003
Posts: 22 |
Land:/.msg Daemon !search -l $$?="<Value #1> <Value #2>" ? -genius_at_work I must have missed your post earlier. I just had a go with that, and unfortunately its not doign what I need I think Im not explaining myself properly Basically, I need a box to appear, with two places to input values into it. I can work out the rest, but how to make a box like that, i dont know
|
|
|
|
Joined: Aug 2005
Posts: 525
Fjord artisan
|
Fjord artisan
Joined: Aug 2005
Posts: 525 |
I don't see why you can't use that. Perhaps it would help if you could post more details.
Is there a specific number of words that are being input to this box? If it's just one word for each, then you could use $gettok to do whatever with the values.
|
|
|
|
Joined: Jan 2003
Posts: 22
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2003
Posts: 22 |
I apologise, I wish I knew the terms
Let me see if I can draw it out so as to explain it better
What appears when using $$?="Value #1" $$?="Value #2" is this
--------------- -Value # 1- -1,000,000- --------------
1,000,000 being the value I manually enter
Once I click ok, the second box appears
--------------- -Value # 2-- -5,000,000-- --------------
Now this would be fine, however, what Im looking to do is something like this
#################### #Value # 1##Value #2 # #1,000,000##5,000,000# ####################
do you see what I mean?
i want to be able to enter both values at the same time.
I REALLY hope this explains it better
|
|
|
|
Joined: Aug 2005
Posts: 525
Fjord artisan
|
Fjord artisan
Joined: Aug 2005
Posts: 525 |
I think I understood that part already. The question though, is are the values being entered always going to be of the same form? For example Value 1: 2000 Value 2: 123,456 Even though the lengths are different, it's only 1 string of numbers being added to each one. I'm not too familiar with dialogs, but unless there is some specific reason you need it to be 2 input fields in the same box, using $$? and $gettok should be sufficient enough for you. Here's a simple example of what I mean (no error checking): alias getinput {
var %x = $$?="Enter 2 values separated by a space"
echo -a Value 1: $gettok(%x,1,32)
echo -a Value 2: $gettok(%x,2,32)
} Type /getinput and it will prompt you to enter values and then echo them to the active window.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
in addition to the other posts
alias sendmoney { dialog -m money money }
dialog money {
Title "Money Money"
size 550 125 100 50
option dbu
text "Value 1", 700, 1 0 48 10, center
text "Value 2", 701, 51 0 48 10, center
edit "",100, 1 15 48 10
edit "", 200, 51 15 48 10
button "SEND",900, 25 30 50 10
}
on *:dialog:money:sclick:900:{
if (!$did(money,100)) { echo -a Error: Value #1 not entered | return }
if (!$did(money,200)) { echo -a Error: Value #2 not entered | return }
.msg Daemon !search -l $did(money,100) $did(money,200)
}
or----
alias money {
echo -a .msg Daemon !search -l $$input(Enter two values to send,e,Search,1000.00 5000.00)
}
see: /help $input
|
|
|
|
Joined: Jan 2003
Posts: 22
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2003
Posts: 22 |
ahhhhhh Mikechat, I think youve nailed it
where do I put that code and how do I call it up? /money?
|
|
|
|
|