ICANIT Posted August 22, 2009 Share Posted August 22, 2009 This time my problem is with "isLogOnServer", i cant make do what I want.If I push Alt-G in WPI and check for isLogOnServer it says: isLogOnServer("\\DC-A")but if i do: cond[pn]=['isLogOnServer("\\DC-A")']; My app. is not shown !if I do: cond[pn]=['!isLogOnServer("\\DC-A")']; the entry is shown, and I can write whatever I want as servername with no difference.My goal is to have this:cond[pn]=['isLogOnServer("\\DC-A") || isLogOnServer("\\DC-B")'];meaning, Only if your logon server is ether DC-A or DC-B, show this app.(servernames is not actual names, just ex.)what am i doing wrong? Link to comment Share on other sites More sharing options...
mritter Posted August 22, 2009 Share Posted August 22, 2009 Nothing. You are doing it right. Conditions are a little hard to grasp at first.Conditions are meant to hide things. Grayed conditions are meant to show but disable things.Look at it like this: if the condition is met, I am going to hide the item.You may want to use Grayed Conditions, and use "If grayed condition is true, disable the checkbox" option. Link to comment Share on other sites More sharing options...
ICANIT Posted August 23, 2009 Author Share Posted August 23, 2009 HI mritter, your the developer so i guess you must know. :-)but from your answer i get that this: cond[pn]=['getbits()==32']; - should hide my app if OS is 32 bit !? thats not the case. the line is meaning, "show only this app if OS is 32 bit"so in my opion this line: cond[pn]=['isLogOnServer("\\DC-A")']; - should also be positive and mean "show only this app if LogOnServer is DC-A".it gets quite confusing if Cond[] ,is ether positive or negative depending of what function you want to run. and still we have the ! sign to make it negative (meaning "if this is NOT true, do this")just sharing my thoughts :-) Link to comment Share on other sites More sharing options...
mritter Posted August 23, 2009 Share Posted August 23, 2009 I totally agree it is backwards, but I didn't make it that way. The original person who wrote it only intended for simple checks like FileExists(), and didn't look ahead to the future. So back when it was first written!FileExists("C:WPI\Install\MyInstaller.exe") hide item becaue doesn't existandFileExists("C:\Program Files\Adobe\Adobe.exe") hide item because already installedmade perfect sense.Then more items slowly got added, never got straightened out, I came along, added more, people didn't want to change their configs, so it was always left that way. I hate it, too. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now