PDA

View Full Version : Noob needs help!


KilledFromAfar
04-21-2008, 11:31 PM
Hey all! I purchased Autoplay about 2 weeks ago and am very happy with its capabilities thus far. However, I'm stuck and hope somebody here can help! I'm setting up a touchscreen kiosk that will be un-manned. I want passers-by to be able to get a quote for a desired product. I figured out how to assign values to a checkbox and then have the values added/subtracted on a pushbutton. The problem now is that I need them to be able to use an up/down arrow to increase/decrease a number (representing length in this case), in which every number is assigned a different value that will calculate into the pushbutton estimate. Any suggestions?? Thanks in advance!!

screwed over
04-22-2008, 05:12 AM
try using a combobox. or you could use a very short listbox. or you could do something with an input such as:
inText = Input.GetText("your input");
numString = String.ToNumber(inText);
tSum = your calculation using numString.(e.g. (numString*20)/10 etc)

hope that helps.

yosik
04-22-2008, 12:59 PM
Another way is to use a slider and thus increase/decrease a value.

Yossi

longedge
04-22-2008, 02:52 PM
Or use e_Key to increment/decrement your value.

KilledFromAfar
04-24-2008, 09:42 PM
Thanks guys! I'm anxious to try these actions!!

KilledFromAfar
04-25-2008, 03:28 PM
Ok. Discovered problem immediately. Users will not have a keyboard or mouse - touchscreen only. I apologize for not stating that initially. So, back to the original problem I guess...looking to have a pushbutton UP and DOWN arrow to change the numeric value which in turn will change value in price quote box. Thank you!!!

screwed over
04-25-2008, 05:07 PM
you could still drag the slider.

KilledFromAfar
04-26-2008, 12:16 PM
Ok, I ran the slider idea past my client and he's not super thrilled about that option. He's pretty set on an up and down arrow to increase/decrease the value (remember touchscreen only - no keyboard or mouse). I spent a few hours trying to figure it out this morning and am stuck. Can somebody give some directions on how to do this? And is there a way to have a value appear in an empty box instantly when options are selected both in checkboxes and in the up/down arrow box? Kinda like microsoft excel? I do appreciate all the help/advice thus far! You guys have been very helpful! thank you!

longedge
04-26-2008, 12:27 PM
It's very straightforward to increment and decrement a value in a button on click. You can do so either with integer values or in decimals parts e.g. x=x+0.25.

You can limit the range by using an if loop.

longedge
04-26-2008, 01:20 PM
If I understand what you want this example might help. When you click the buttons, the value is incremented or decremented by 0.25. It will not show less than 0 or more than 3 and it will not display the values 0.25 or 1.25 or 2 or 2.75.

KilledFromAfar
04-27-2008, 12:17 PM
Yes sir, that's exactly what I'm lookin for with the up/down arrows! Thank you!! I should have been able to figure that one out! Now do you know how to assign a value to each integer and have it instantly appear in another text box?

EX. User clicks UP ARROW till he stops on a certain number (say 10). Now 10 has a dollar value of $100 and that will be added to "QUOTE BOX" instantly - just like Excel does with its =sum(a1,a10) command.

I have assigned a value to some checkbox items as well but can't get a "QUOTE BOX" to reflect their amount unless I use a "calculate" button - which is unacceptable in this case. Heres what I have at this point:

CHECKBOX ITEM 1
if quote then
quote = quote;
else quote = 0;
end
item1 = 85.00
result = CheckBox.GetChecked("item1num");
if result then
quote = quote + item1
else quote = quote - item1;
end
--Dialog.Message("quote",quote)

CHECKBOX ITEM 2
if quote then
quote = quote;
else quote = 0;
end
item2 = 50.00
result = CheckBox.GetChecked("item2num");
if result then
quote = quote + item2
else quote = quote - item2;
end
--Dialog.Message("quote",quote)

QUOTE BUTTON
if quote then
quote = quote;
else quote = 0;
end
--var1 = 50;
Button.SetText("quote",quote);
--button.settext("quote","button text");

I need to use an alternate quote box - not a button. Thank you for all the help!!!

longedge
04-27-2008, 12:51 PM
Just add code to the on click of each button to set the value of your other objects, do calculations or whatever.

longedge
04-27-2008, 01:16 PM
It sounds like your best course of action would be to write a function that gets values, does the calculations and then updates displayed items. You could call it from any event then.

** Please can we have the forum edit time out period extended **