Sgt. D. Pilla Posted October 17, 2008 Share Posted October 17, 2008 I read the latest WPI has the ability to check for an internet connection.I would like to implement this into all the installs that download things such as updates (Spybot for example)How do I go about creating a greyed condition for if there is no internet connection.I can't seem to find many/any tutorials on conditions for applications.Further, Can you add a condition to a registry add?Such as "Registry After" is dependent on if the program it is intended for was installed.How can I do both these things? Link to comment Share on other sites More sharing options...
mritter Posted October 19, 2008 Share Posted October 19, 2008 ConnectedToInternet() -or- !ConnectedToInternet()Returns true or false.No, can't do deps/conds n Reg B/A. They will be eliminated in a near future release. But they will be converted over properly so don't worry about future compatibility. Link to comment Share on other sites More sharing options...
Sgt. D. Pilla Posted October 21, 2008 Author Share Posted October 21, 2008 So all I do is type in the greyed condition box...ConnectedToInternet(False)?Is there like a guide or something on these things? And no, the help with WPI doesn't have it Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted October 21, 2008 Share Posted October 21, 2008 (edited) Actually when using conditions and exclusion the proper term is like so:ConnectedToInternet()=="False"The above will make the entry disappear if you are connected to the internet.YES I know it's not in the manual, the manual is in the process of being re-written and should cover everything this time. (I just hate the bookwork )Nearly everything can be found in the changelog though...Further, Can you add a condition to a registry add?Such as "Registry After" is dependent on if the program it is intended for was installed.How can I do both these things?With this I would add the reg as a totally separate entry with the needed condition added in, be it looking for a file, a program is installed name or anything like that.then just add it as a dep to the parent program. Edited October 21, 2008 by Kelsenellenelvian Link to comment Share on other sites More sharing options...
mritter Posted October 21, 2008 Share Posted October 21, 2008 When a condition, such as ConnectedToInternet(), is a true/false check, then don't do it like Kels said; do it like I posted.ConnectedToInternet() - if there is a connecton, item is grayed.!ConnectedToInternet() - if there is no connection, item is grayed. This is the more common one.Now, when checking a name of something, like OS, then yes, do a check.getOSver()=="XP" - if is on XP Windows then grayed.getOSver != "Vista" - if not on a Vista Window then not grayed. Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted October 21, 2008 Share Posted October 21, 2008 Well now see why didn't someone tell me? It does work both ways but some major changes are in the works so I would listen to mritter. 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