in

Quark Forums

Strings

Last post 01-20-2008 5:22 PM by djr. 16 replies.
Page 1 of 2 (17 items) 1 2 Next >
Sort Posts: Previous Next
  • 11-20-2007 10:37 PM

    • cfb
    • Not Ranked
    • Joined on 09-06-2007
    • NY
    • Posts 10

    Strings

    I've created a simple layout with a text block that contains a user-input answer and I want to enter a 2 or three digit number as an answer to a calculation.

    ie: 1+1= 2
    35+ 25= 60

    I am using a script when hitting a key: Box1.Append(1)
    That works well for single digit answers, but not for anything with 2 digits.

    How can I allow for multiple digit key inputs for an answer like "60" ?

    Thanks!
    Cliff
  • 11-21-2007 6:16 AM In reply to

    Strings

    Hi Cliff

    I am not entirely clear on exactly what the flow of your project is. But if you are creating some sort of Q&A page , then I suggest you use an editable text box , where the user can simply enter the answer in an editable text box (made by selecting "editable" from the Display as drop down in the object tab) . Whats more , you could choose data type as number so that the user is not able to enter any alphabets. So you could use two text boxes , one for the Q and one for the A.

    And you could create a script to validate that answer in the editable text box by hitting a key , say A or clicking a button , after the user has entered the answer.

    Does this help?

    Regards,
    Kabir
    QuID QA
    kschandhoke@quark.com
  • 11-21-2007 12:45 PM In reply to

    • cfb
    • Not Ranked
    • Joined on 09-06-2007
    • NY
    • Posts 10

    Strings

    That sort of works...
    Can it be done without clicking on the box to enter text? In other words, I want the user to enter a numerical answer to a problem (5+5=10) without having to click on a text box. Simply by keying in the number the answer should appear in the text box. Your solution seems to require that I click first. Can I eliminate the click step?

    I want to simplify this as much as possible.

    The simple math problem comes up on the screen.
    The user reads it.
    The answer is input and appears on screen, if it is a correct answer.
  • 11-24-2007 9:10 AM In reply to

    Strings

    Hi, Cliff,

    you describe an interesting problem.
    Let's say your question is 7+3. When do you want to start processing the answer? After the first key stroke? Well, then nobody can enter the correct answer. After the second? Then wrong answers (like 9) will loop forever. I suppose you could work with a time out...

    If you want such a solution you need to experiment with keys and collect the user input. Kabir's suggestion (to have a text box) seem to be easier.

    However, if it is only the activation click for the text box that you want to avoid, then the solution is easy:
    1. Create a script
    2. In this script use the action "Text > Select > 'your editable text box' > All"
    3. Make this script your page entry script.

    Does that help?
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need immediate help? Please contact Quark's support: http://support.quark.com/contact_us.html

  • 11-27-2007 10:14 PM In reply to

    • cfb
    • Not Ranked
    • Joined on 09-06-2007
    • NY
    • Posts 10

    Strings

    Hi Matthias,
    That works well except I am able to input incorrect answers, which I want to avoid. I want the program to reject wrong answers somehow.

    5+5= Let's say I input 20 as an answer for this. Entering a wrong answer should create a wrong sound or something.

    This is why I approached this using a number approach instead of a text box approach. I need to write a script that rejects all but the right answer and inputs it in the text box when it is typed.

    If I type 25 - WRONG!
    If I type 17 - WRONG!
    If I type 10 DING DING DING!! and the answer appears in the text box.
  • 11-28-2007 8:32 AM In reply to

    Strings

    Hi, Cliff,

    will your results always be two digits? Or also one and three?

    Thanks
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need immediate help? Please contact Quark's support: http://support.quark.com/contact_us.html

  • 11-28-2007 5:52 PM In reply to

    • cfb
    • Not Ranked
    • Joined on 09-06-2007
    • NY
    • Posts 10

    Strings

    one, two or three digits
  • 11-28-2007 5:58 PM In reply to

    Strings

    Hi, Cliff,
    cfb:
    one, two or three digits

    and how do you decide that the user has finished inputtig the answer? Time-based? Idle time based?
    Already when the answer is wrong (e.g. if you expect 123 and somebody types 1+3)?

    Thanks
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need immediate help? Please contact Quark's support: http://support.quark.com/contact_us.html

  • 11-28-2007 8:56 PM In reply to

    • cfb
    • Not Ranked
    • Joined on 09-06-2007
    • NY
    • Posts 10

    Strings

    Good question!
    I guess idle time based.

    Does it need to be time based? Can the script wait for the correct answer and input it when/if that is keyed in?
  • 11-29-2007 6:36 AM In reply to

    Strings

    cfb:
    Does it need to be time based? Can the script wait for the correct answer and input it when/if that is keyed in?

    I am positive that would be possible.

    However let's pin down how you want to have it behave. Let's say your answer is 123. Somebody mis-keys 2 and then 1+2+3. Would you accept that? If it is not time based or doesn't wait for three digits, it would be the same as inputting 212, right? That's why maybe timebased, take the last (max three) keys that the user keyed in (within a given time).

    Best
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need immediate help? Please contact Quark's support: http://support.quark.com/contact_us.html

  • 11-30-2007 12:56 AM In reply to

    • cfb
    • Not Ranked
    • Joined on 09-06-2007
    • NY
    • Posts 10

    Strings

    That makes sense to me!
  • 11-30-2007 1:29 PM In reply to

    Strings

    Hi, Cliff,

    ok, after playing around with it for an hour I have something.

    Is that what you imagined: TestYourIQ.SWF?
    (please ignore my bad design)

    One limitation (at least on Firefox in a browser): You do need to click into the text box for your answer, the browser seems to take away the focus. As a projector it works fine.

    Best
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need immediate help? Please contact Quark's support: http://support.quark.com/contact_us.html

  • 11-30-2007 4:09 PM In reply to

    • cfb
    • Not Ranked
    • Joined on 09-06-2007
    • NY
    • Posts 10

    Strings

    Can I simplify this even further?

    All I really want to see is the equation,

    11+17=

    and then the answer pops in when entered correctly.
    Can we do it without using the mouse?
    If incorrect perhaps just a beep rather than a visual cue.

    Thanks for your patience with this! I never thought it would be so tough but I do like the Quark interactive product. I used to teach it at Pratt in NY using an earlier version.
  • 11-30-2007 5:20 PM In reply to

    Strings

    Sure you can make it easier. Get rid of the visual count down, get rid of all of the text boxes, make the input text white and instead of the red and green box beep instead with two different tones and you have it, right?

    By the way, the difficult thing was not the authoring (ok, given, I am a bit advanced), it is thinking through the use cases or scenarios how you want this to happen. As I said above, if you do not have a time out, how should a project know that the user is only typing in one character or two?

    I'll send you the project via email, have a look at it and tweak it as you like.

    If you want a much simpler approach, I also have a different approach in mind, let me know.

    Have a nice weekend,
    Matthias
    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need immediate help? Please contact Quark's support: http://support.quark.com/contact_us.html

  • 11-30-2007 6:24 PM In reply to

    • djr
    • Top 500 Contributor
    • Joined on 11-08-2006
    • Reading, UK
    • Posts 38

    Strings

    Some interesting problems there. I too played around with this last weekend and got something to work on the basis that the correct answer would pop up as soon as entered without the need for a separate button or a timer (except as an ultimate timeout).

    But trying to do it without the equivalent of an <Enter> key, and having to cater for answers which might be one, two or more digits, made the whole thing extremely complicated and I began to lose the will to live. I also found - not for the first time with Interactive Designer - that what worked with literal figures didn't work once they were replaced with variables.

    I was really pleased with your initial suggestion, Matthias, that you could give the input box the focus simply by selecting the nonexistent contents of it. There doesn't seem to be a function in Interactive Designer to detect a keystroke, and a hidden input box or one which can just stay on the pasteboard seemed an ideal solution for that.

    It's therefore puzzling and a great disappointment that this doesn't work within a browser - it's just the same for me with my version in both Firefox and IE. Do you think there's a way around that? (In Cliff's case, it doesn't really matter as presumably the .swf can simply be opened with Flash player with or without a standalone .exe)

    Are you doing this simply by comparing the input number or string with the answer after the five seconds, or have you used a routine to detect the keystrokes as they are entered?

    Doing it without the equivalent of an <Enter> key or a timer does seem to add an enormous layer of complication in the scripting, and without knowing the first thing about educating youngsters, I do wonder how important that is. We normally expect to see our input as it goes in, and in every walk of life we have to press the <Enter> key to show that we have finished entering something. How can we be sure we have keyed our answer as intended if we can't see it, and how can we see why our answer is wrong if it is wrong?

    On the other hand I do see the merit of not having to click on the box in the first place and not having to grab the mouse in order to click an 'I have finished' button. Is it possible to detect the use of the <Enter> key, as distinct from a separate button, after keying in the answer, so that it can then be evaluated immediately?

    Sorry if I have thickened the plot!

    Darrell

    PS Has someone been tinkering with the forum stylesheets? I now have no divider line between posts in Firefox, although they're still there in IE.
Page 1 of 2 (17 items) 1 2 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems