87052402 Posted March 16, 2006 Report Share Posted March 16, 2006 I have a mirc script made by my own Home is use Linux .. i run mirc with wine And at my work is use windows Now i wanne make a kind of system that can detect the os So that if i run windows mirc run the programs for my work and at home only the program's that i need home but i have no idea to do this.. can somebody help me with that?? Link to comment Share on other sites More sharing options...
Warrior124 Posted March 16, 2006 Report Share Posted March 16, 2006 This will check to see what operating system you are running, and if any of those systems are found will execute whatever commands you wish. The else statement will only activate if said operating systems aren't found, and will execute whatever commands you put in... on *:START: { if ($os == 95) || ($os == 98) || ($os == NT) || ($os == ME) || ($os == 2K) || ($os == XP) || ($os == NET) { <commands here> } else { <commands here> } } Link to comment Share on other sites More sharing options...
Angelia Posted March 16, 2006 Report Share Posted March 16, 2006 $os returns the windows version you're using. i think wine returns an early windows version but i cant remember which. i havent had much experience with wine but maybe you could use something like if ($exists(/root)) { echo -a linux } Link to comment Share on other sites More sharing options...
hixxy Posted March 16, 2006 Report Share Posted March 16, 2006 That's not a reliable way of checking. Making a root\ directory in the mIRC directory will trick that script. Link to comment Share on other sites More sharing options...
Angelia Posted March 16, 2006 Report Share Posted March 16, 2006 why would you want to trick it? Link to comment Share on other sites More sharing options...
Gazzy Posted March 17, 2006 Report Share Posted March 17, 2006 lol Link to comment Share on other sites More sharing options...
hixxy Posted March 17, 2006 Report Share Posted March 17, 2006 why would you want to trick it? You could easily trick it inadvertedly. Link to comment Share on other sites More sharing options...
muhamad Posted April 23, 2006 Report Share Posted April 23, 2006 You could easily trick it inadvertedly. lol Link to comment Share on other sites More sharing options...
Kronicdreamer Posted June 26, 2006 Report Share Posted June 26, 2006 actually linux and any *nix, BSD, etc. has a / and windows uses \ Link to comment Share on other sites More sharing options...
Recommended Posts