save by OS version

This forum is currently in read-only mode.
  • is it possible to save file to specific place depending on what operation system it is running on?

    I mean if it is windows vista save it to c: etc...

    else save it to d:etc...

    can i do that?

    i tried sys info, but there is no condition for OS type

  • The only way I can think of is to write a plugin for that purpose.

  • Elyzius: is it hard to make it? how can i learn to make plugins?

  • After long time of trying I figured out how to do it without plugins...

    It is a bit wierdly made application, but it seems working :)

    i tried it on windows 7 a windows XP and for not it works...

    if anyone here will need it i uploaded it here:

    datafilehost.com/download-b72e8381.html

  • There's a far more easier way.

    SysInfo provides the "Get OS version" expression (SysInfo.GetOS). It is a string containing a bunch of information, e.g.

    "Windows XP (Professional), (Terminal Services in Remote Admin Mode), (Multiprocessor Free), (x86-32 Processor) v5.1 Build:2600 Service Pack: 3"

    Well, of all that text, all you need is the internal version number, in this case "v5.1". You can get this converted to a number using:

    float(mid(SysInfo.GetOS, find(SysInfo.GetOS, ") v") + 3, 3))

    After that your conditons should compare against the version numbers. It's 5.1 for Win XP, 6.0 for Win Vista and 6.1 for Win 7

    A list of the version numbering can be found here: http://www.gaijin.at/lstwinver.php

    And here is an example cap, using the description above: osversion.cap

  • The browser shouldn't really have direct access to the file system. Be careful that browsers don't all together block your game :)

    I'm referring to JS not modifying files - not the basics of a browser accessing the cache etc.

  • The browser shouldn't really have direct access to the file system. Be careful that browsers don't all together block your game :)

    I'm referring to JS not modifying files - not the basics of a browser accessing the cache etc.

    This is the Construct Classic help section <img src="smileys/smiley2.gif" border="0" align="middle" />

  • tulamide: fantastic! really much better than my cap :)

    thanks much

  • Hahaha. #fail me <img src="smileys/smiley4.gif" border="0" align="middle" />

  • I need to use same path for windows 7 and for windows vista. will it work if I will make this? (i would try it, but i have not windows vista)

    system: is global variable �osversion� equal to 6.1

    or

    system: is global variable �osversion� equal to 6.0

    just need to know if i am using "or" conditon right for this case,

    thanks

  • I'd prefer to not use the 'or' condition. It may not behave as you'd expect. Better use the system's evaluation condition:

    + System: global('osversion') = 6.0 or global('osversion') = 6.1

  • it writes error in parameter 1...

    how exactly do i need to write it?

    thanks

  • The parser has problems sometimes interpreting the correct order. Try setting the equations in brackets:

    (global('osversion') = 6.0) or (global('osversion') = 6.1)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • it works, thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)