PDA

View Full Version : Register value = 1 then jump to page 2



Arnold
01-13-2003, 07:00 AM
I want to check a register value. and if that value is the same as the one that i have programmed, then i want to jump to page 1. Is the value not the same i want to jump to page 2

can somebody please help (i prefer an example)

Thank you very much

Worm
01-13-2003, 07:15 AM
Here's what it'd look like:
%RegData% = Registry.GetValueData ("HKEY_CURRENT_USER\Software\My AMS Project", "Should I Stay or Should I Go")
IF (%RegData% = 1)
Page.Jump ("Page 1")
ELSE
Page.Jump ("Page 2")
END IF

And here is a copy paste version:
-----Copy and Paste -------
<IR_ACTIONS_LIST>
<Action name="Get Value Data">
<Type>72</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%RegData%</Variable>
<MainKey>2</MainKey>
<SubKey>Software\My AMS Project</SubKey>
<Value>Should I Stay or Should I Go</Value>
<AutoExpand>0</AutoExpand>
</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>%RegData% = 1</Condition>
</Action>
<Action name="Jump">
<Type>1</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<PageName>Page 1</PageName>
</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="Jump">
<Type>1</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<PageName>Page 2</PageName>
</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>
</IR_ACTIONS_LIST>

------End Copy Paste -----------

Arnold
01-13-2003, 07:35 AM
Thank you, gonna try it

Worm
01-13-2003, 07:37 AM
Hope it does what you need.