Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 6th, 2024, 3:23 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: How to disable a variable?
PostPosted: March 28th, 2013, 10:07 pm 
Offline

Joined: August 5th, 2010, 1:42 pm
Posts: 109
Opus: Creator v9 Opus v7
OS: windows
Hi,
I have created 1 keyboard with letters and numbers to link with variables to 10 text input boxes, one for each input box. (I don't want to create 10 keyboards because that will be too many buttons in each page).
When I click a letter or number to show on the first text input that will add the number or letter to all the 10 text input boxes. With another external button I can reset all the following variables, and leave only marked the first text input box, but when I click again in other button of the keyboard to show a letter or number on the second input box that will change my previous text input box, and so on.
So my question is if there is any way to disable a variable, so when I type on my created keyboard it won't change the letter or number in an specific text input box but it will change the rest of the others.
Making disable the input box doesn't work. I need to disable the variable. Maybe with a scrip??


For this message Isma has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: How to disable a variable?
PostPosted: March 28th, 2013, 11:12 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
I think you cannot "disable" a variable. You can however set up a way to control how and when the variable is changed. For example, create a page var named var1control with a default value of true. Then set up an IF action related to your keyboard actions. Logically it would be: IF var1control EQ true... then your keyboard actions apply to Text Input 1. Otherwise, when set as false, they will not apply. Do that for each of the object/variable match-up pairs.

I find the explanation of the Pub hard to follow. Why use text input objects? If you need text input because the User will actually type into them, then there are ways to use a regular text box for display (Search the forum for that -- post by Fred Harms I think). I feel I am not getting the complete picture here.

Please update a proper profile.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: How to disable a variable?
PostPosted: March 29th, 2013, 9:47 am 
Offline

Joined: August 5th, 2010, 1:42 pm
Posts: 109
Opus: Creator v9 Opus v7
OS: windows
Thanks for your reply,

I'll try to explain it more clear.

I've got some text information partially finished and 10 input text buttons for the student to fill in the words after listen the audio. That is the purpose of the exercise, filling some words with the right letters.
And I have done a keyboard with the alphabet letters.
I want the student to type the different letter in all the 10 input boxes and then I will show the score for that. I am showing 1 input box after another, so after typing in letter “f” on the keyboard and show that letter on box1, I will show box 2, and then box 3, etc. until all 10 boxes are on display with letters on then.
But each button of the keyboard send the same letter to all the input boxes, so typing “f” in my keyboard will show “f” in all 10 boxes.
If I type “n” on box 2 it will change box 1 as well.
I need to find a way that when an input box has a letter on it, it won't change when I type again in the keyboard.

I've got Opus Pro 7.


For this message Isma has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: How to disable a variable?
PostPosted: March 29th, 2013, 9:58 am 
Offline

Joined: August 5th, 2010, 1:42 pm
Posts: 109
Opus: Creator v9 Opus v7
OS: windows
anyway, if I use the computer keyboard the problem is solved, because each time I type in a text input box won't change
the other input boxes. It is with an opus keyboard that each button will change all the other input boxes.


For this message Isma has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: How to disable a variable?
PostPosted: March 29th, 2013, 11:15 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
If the same value is appearing in all your text input boxes, then it sounds like you've used the same variable in each box?

If each box must hold a different value, either use a different variable or use an array and change the index value.

mack

P.S to initialise a variable set it to either a blank string ("") or null or undefined.

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: How to disable a variable?
PostPosted: March 29th, 2013, 2:47 pm 
Offline

Joined: August 5th, 2010, 1:42 pm
Posts: 109
Opus: Creator v9 Opus v7
OS: windows
Hi Mack,

Each input box has only one variable but each button of the keyboard sends the action “set variable a” or “set variable b” or “set variable c”, depending which button I type, to all the boxes.

The idea is that the opus keyboard works like the computer keyboard. If I use the computer to fill in some online info I don't have that problem of getting changed the previous boxes.

With the opus keyboard If I start by typing button A, it will change box 1 to A. Then box 2 will be showed.
If I type B, it will change box 1 and 2. I don't want the previous input boxes to get changed when I keep typing the keyboard buttons to fill in the next boxes., but the keys must send the action to all boxes, or I will have to copy the keyboard 10 times, one for each input box and each button of each keyboard will send the action to only one variable. Keyboard 1 buttons for input box 1, keyboard 2 buttons for input box 2, etc.


For this message Isma has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: How to disable a variable?
PostPosted: March 30th, 2013, 2:28 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Sorry Isma,

Not sure what you're trying to do. Can you post an example?

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: How to disable a variable?
PostPosted: April 1st, 2013, 9:21 am 
Offline

Joined: August 5th, 2010, 1:42 pm
Posts: 109
Opus: Creator v9 Opus v7
OS: windows
Hi again,

I attach a copy of the keyboard and word gaps.


You do not have the required permissions to view the files attached to this post.


For this message Isma has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: How to disable a variable?
PostPosted: April 1st, 2013, 11:36 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Oh, okay.

It goes to every text input box because each letter that is clicked has X number of actions that sets every keytext (_1, _2, _3, etc) variable to the same letter.

You have not included any logic that tells the program which keytext_X variable to use!

You will need either IF THEN ELSE or a CASE statement and a counter of some sort to track which Text Input Box the user is currently entering data in.

For example (If I click the letter A)



Code:
if my text input box is 'box one' then keytext_1 = "A"

else

if my text input box is 'box two' then keytext_2 = "A"

else

if my text input box is 'box three' then keytext_3 = "A"

etc, etc


Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group