Dialog Variable Help

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Tue Feb 17, 2009 11:29 pm

Let>%Cont5_Dlg.SNum_L1% = SN

What are you intending to do with that line? If you want to assign a value to a variable called Cont5_Dlg.SNum_L1 then you don't need the %%

Is SN a variable assigned somewhere else in the macro?

Otherwise I don't see why you expect %SN% to display...

gchichester
Pro Scripter
Posts: 132
Joined: Mon Dec 22, 2008 4:56 pm
Location: St Augustine FL

Dialog Variable Help Continued

Post by gchichester » Wed Feb 18, 2009 6:40 pm

Thanks guys.
I didn't explain myself very well.
All I was trying to do is pass a variable data to a new variable,
to see if it was being passed to another script, that I had added
the "Include" statement to, It was strange because some of the data was passed
and some didn't get passed. I think I know why now.

This is a new test script that I can't seem to get working ether
Changing the value of num has no effect -
I may not the syntax correct or misunderstand the concept of "Label" with "If"

Let>num=7
Label>DglBox
If>%num%>1,FiveCount
If>%num%>5,TenCount
If>%num%>10,TwentyCount
Goto>Exit

Label>FiveCount
Let>Dlg=Cont5
Goto>Exit

Label>TenCount
Let>Dlg=Cont10
Goto>Exit

Label>TwentyCount
Let>Dlg=Cont20
Label>Exit

Message>%Dlg%

Thanks
Gilc

gchichester
Pro Scripter
Posts: 132
Joined: Mon Dec 22, 2008 4:56 pm
Location: St Augustine FL

Dialog Variable Help Continued

Post by gchichester » Wed Feb 18, 2009 6:55 pm

Sorry,
Posted to soon I solved the issue - by using the correct logic in my If statements.

gchichester
Pro Scripter
Posts: 132
Joined: Mon Dec 22, 2008 4:56 pm
Location: St Augustine FL

Dialog Variable Help Continued

Post by gchichester » Wed Feb 18, 2009 7:05 pm

Did it again poster to soon.
I discovered that I can't use = with the "If" statement.
So I'm back to where I started.
Thankful for any and all input .

Gilc

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Feb 18, 2009 7:06 pm

I think this was sample script, but for the record, you may want to reverse the sequence of the IF lines.

This is your sample.

Code: Select all

Let>num=7
Label>DglBox
If>%num%>1,FiveCount
If>%num%>5,TenCount
If>%num%>10,TwentyCount
Goto>Exit
This will always go to FiveCount since all num will be >1

Suggest you may want this instead:

Code: Select all

Let>num=7
Label>DglBox
If>%num%>10,TwentyCount
If>%num%>5,TenCount
If>%num%>1,FiveCount
Goto>Exit
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

gchichester
Pro Scripter
Posts: 132
Joined: Mon Dec 22, 2008 4:56 pm
Location: St Augustine FL

Dialog Variable Help Continued

Post by gchichester » Wed Feb 18, 2009 8:35 pm

Thanks Bob That worked –
Still trying to figure out why,
I know I'm a little slow
It thought it might have something to do with expressions
But it look like it's the order the If are read. Yes?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts