Larve_Q
(Fresh Scripter)
2004-10-15 12:38 PM
Create a variable “@variable”…?!

Hi all,

Can I use an “If” in a variable, something like this:

$Gateway = EnumIPInfo(0,3)
;
If $Gateway = x.x.x.x $Updates = 666
Else $Updates = 100
EndIf

I hope you guys can help me!

Gtz.

Larve


Richard H.Administrator
(KiX Supporter)
2004-10-15 01:09 PM
Re: Create a variable “@variable”…?!

Quote:

Hi all,

Can I use an “If” in a variable, something like this:

$Gateway = EnumIPInfo(0,3)
;
If $Gateway = x.x.x.x $Updates = 666
Else $Updates = 100
EndIf

I hope you guys can help me!

Gtz.

Larve





Sure, but don't forget that it is a string value:
Code:

$Gateway=EnumIpInfo(0,3)

Select
Case $Gateway="1.2.3.4"
$Updates="foo"
Case $Gateway="2.3.4.5"
$Updates="bar"
Case "Default"
$Updates="default"
EndSelect



Larve_Q
(Fresh Scripter)
2004-10-15 02:00 PM
Re: Create a variable “@variable”…?!

Just the thing I needed.

Now I can deploy my updates from a different location if one of my portable users logging on in an other AD site.

Thanks a lot...!

Gtz

Larve


Les
(KiX Master)
2004-10-15 04:38 PM
Re: Create a variable “@variable”…?!

What about @Site?

Larve_Q
(Fresh Scripter)
2004-10-15 04:49 PM
Re: Create a variable “@variable”…?!

Ahh, good one! I think I gonna test that.