Re: Comparing Variables
Ok I will try this. Iam a bit busy right now though.
Many Thanks
BaZZa101
Announcement
Collapse
No announcement yet.
Comparing Variables
Collapse
X
-
Re: Comparing Variables
Try this:
1. Use the VARIABLE >>> SET VALUE action to create a variable, call it %myVar1% and set it's value to 7
2. Use the VARIABLE >>> SET VALUE action to create a second variable, call it %myVar2% and set it's value to 6
3. Add an IF action and when you do, click on "build" in the resulting dialog. Once there type in the name of your first variable %myVar1% and then press the equals sign key then type the name of your second variable, the string in the expression builder should look like this "%myVar1% = %myVar2%" then press OK.
You have now created two variables and compared them for equality... Any actions which fall in between the IF and END IF tags will only be run if those variables are equal. You could just as easily have set it to test for inequality by simply using the != operator instead of the = operator...
This simple excercise should get you thinking about what variables are and how easy they are to compare.
Corey Milner
Creative Director, Indigo Rose Software
Leave a comment:
-
-
Re: Comparing Variables
version 4003 is shown in the help about menu.
I do have a bug in my system some where. (not a virus)
IE does not work properly (i did uninstall it using ie-radicator). and AutoMenu will crash (freeze) if I try to listen to a music CD Rom.
BaZZa101
Leave a comment:
-
-
Re: Comparing Variables
What version of AutoPlay Media Studio are you using?
Corey Milner
Creative Director, Indigo Rose Software
Leave a comment:
-
-
Re: Comparing Variables
Sorry about this again.
But I must be totally stupid. I can not get it to work.
The built checker stops at this line (very beginning)
<IR_ACTIONS_LIST>
<Action name="Set Value">
And I get a simulila error message as before.
...
This is what I am doing.
File New BlankProject
Page Propities
Actions ControlStructures (doubleclick) IF
Paste (your text) OK
Then I get the Data Validation Error dialog box
The following data validation error occurred;
Field: Condition
Error: Values must be separated by operators.
There can't be two values in a row.
OK
This is what is highlighted <Action name
If I join Action name together then this is highlighted "Set Value">
I am very sorry about this.
I do find that the help menu is not really that help full. Is there some
where I can get more programming details from???
If you have it working on your page, could you send me the complete data
file?
Again Many Thanks
Barry Rae
Leave a comment:
-
-
Re: Comparing Variables
Here's a simple example, create a new file then cut and paste the following into your actions editor for your page's onShow event state. Then dissect it and see how it works. Use the expression builder to help you build conditionals by pressing the "build" button in the IF actions dialog box:
<IR_ACTIONS_LIST>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%number_1_variable%</Variable>
<Value>5</Value>
<Evaluate>0</Evaluate>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%number_2_variable%</Variable>
<Value>6</Value>
<Evaluate>0</Evaluate>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%number_1_variable% = %number_2_variable%</Condition>
</Action>
<Action name="Message Box">
<Type>5</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogTitle>Info</DialogTitle>
<DialogMessage>Numbers Match!</DialogMessage>
<Icon>1</Icon>
<Variable>%Result%</Variable>
<DialogType>0</DialogType>
<DefaultButton>0</DefaultButton>
</Action>
<Action name="END IF">
<Type>201</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="ELSE">
<Type>206</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="Message Box">
<Type>5</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogTitle>Info</DialogTitle>
<DialogMessage>Numbers Don't Match!</DialogMessage>
<Icon>1</Icon>
<Variable>%Result%</Variable>
<DialogType>0</DialogType>
<DefaultButton>0</DefaultButton>
</Action>
</IR_ACTIONS_LIST>
Corey Milner
Creative Director, Indigo Rose Software
Leave a comment:
-
-
Re: Comparing Variables
Corey
I just tried your info and I get the same error message that I have been getting all day tring to figure this out.
Values must be separated by operators.
There can't be two values in a row.
OK
It has been many years since I have done coding and I can nto remember.
More help would be nice if possiable Please.
BaZZa101
Leave a comment:
-
-
Re: Comparing Variables
Thanks for your help Corey
I know that anybody can get that info if they want.
All iam doing is asking a question that not to many children would know. I know that non of my children know what the computer reg owner is called. And I know that they would not know how to find it.
Thanks again for your help.
BaZZa101
Leave a comment:
-
-
Re: Comparing Variables
No offense but that won't prevent anything, "little johnie" as you say will definitely know the name of the computer's owner (Reg Owner)... Not to mention that it's easy for people other than "little johnie", i.e. "big tony", to just grab that info from the registry anyhow. Software installers for example do it automatically, it's not hard to find that info in the registry.
But anyhow if you want to compare two variables just use an IF conditional statement, i.e. IF %Owner% = %RegOwner% {Do this}
Corey Milner
Creative Director, Indigo Rose Software
Leave a comment:
-
-
Comparing Variables
OK i'am a newbie and just lost my first post [img]/ubbthreads/images/icons/frown.gif[/img]
what I need help with is..
I want the restrict access to a page (Adults Section CG)
I want to ask the user for the RegOwners name (%GivenOwnersName%) and then compare it to the systems RegOwners name (%RegOwner%).
If they are the same then access is given to the page (Adults Section CG) via a PAGE call.
If they are not the same then ... Close down the Dialog box and stay at the current page (refreshed) where the user needs to make a selection again.
I don't want to use a password, I just want don't want little johnie viewing some 18+ images (very soft) and wish to ask an adult question....
Hope somebody can help.
Many Thanks
BaZZa101Tags: None
-
Leave a comment: