did -a dialog 1 %fd
if %fd is set to a number it doesnt put it in the dialog
how can i fix this?
Try evaluating the variable
did -a dialog 1 $(%fd,2)
are you sure the variable is not working if its set has a number I find that odd??
Try what russell said if it doesnt work try $qt(%fd)
did -a dialog 1 %fd
should be
did -a dialognamehere 1 %fd
or
did -a $dname 1 %fd
I'd make sure that the variable actually has a value right before you do the DID line.
Before the DID line, use: echo -a %fd
See if it outputs the value when it's a number. It is possible that wherever you're setting the variable is incorrect and the variable is not set when it's a number because of that part of the script. The DID line should be fine.
yes it outputs
4546565
when i check what %fd is
but it appears blank in the dialog
when i test it even lie this
did -a dialog 1 123
it doesnt puit the '123' in but when i put text there, it adds the text
Have you tried to add the number from the edit line? Open the dialog, then go to the edit line and type:
/did -ra dialogname 1 123
/did -ra dialogname 1 test
Replace dialogname with the dialog's name and make sure "1" is the correct ID. Note that the "r" in -ra just removes anything that is already there. It will make testing "cleaner."
If 123 doesn't go in, but test does, then I haven't got a clue. If they both go in from the edit line or both don't go in, then we can go from there.
nope it didnt show numbers in the list
only text
:|
In your edit line, type:
//echo -a $isalias(did)
Perhaps you have an alias called that and it's causing the problem. If not, I have no other suggestions. Sorry.
If you still are having problems with this, post your dialog layout.
By the layout, I'm referring to the section of code that looks like:
dialog dialog_name {
title "Title"
option dbu
.
.
.
}
RussellB remember the $CHR(160) being in my dialog script before and it would not make the var work correctly im wondering if this would be his issue.
A possibility, but from the posts made so far, I'm thinking unlikely, especially in reference to the results obtained when the information was put in via the command line, rather than a scripted line.
maybe its the way he's writting the dialog the sclick event or whatever
try this
dialog mTEST {
title "Variable"
size -1 -1 58 32
option dbu
button "Click to ret VAR", 1, 5 5 49 12
edit "", 2, 5 20 49 10
}
on *:DIALOG:mtest:sclick:1:{
var %test = 290431849
did -ra $dname 1,2 %test
}
if you click the button and both the button and editbox gets filled with the numbers then its the way your scripting