Page 1 of 1 1
Topic Options
#127956 - 2004-10-15 12:38 PM Create a variable “@variable”…?!
Larve_Q Offline
Fresh Scripter

Registered: 2004-10-14
Posts: 8
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

Top
#127957 - 2004-10-15 01:09 PM Re: Create a variable “@variable”…?!
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4945
Loc: Leatherhead, Surrey, UK
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


Top
#127958 - 2004-10-15 02:00 PM Re: Create a variable “@variable”…?!
Larve_Q Offline
Fresh Scripter

Registered: 2004-10-14
Posts: 8
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

Top
#127959 - 2004-10-15 04:38 PM Re: Create a variable “@variable”…?!
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
What about @Site?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#127960 - 2004-10-15 04:49 PM Re: Create a variable “@variable”…?!
Larve_Q Offline
Fresh Scripter

Registered: 2004-10-14
Posts: 8
Ahh, good one! I think I gonna test that.


Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Chris S., Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
2 registered (Allen, ShaneEP) and 158 anonymous users online.
Newest Members
Sjaak, Biybucket, Markus1961, Ian231, kixnewbie12
17480 Registered Users

Generated in 0.031 seconds in which 0.012 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org