Specialty

  • How to access user properties on the Runtime-

    Using application.getUserProperty and application.setUserProperty don't work with Runtimes, but sometimes you need that type of functionality, so here is how you implement it.  These functions will create and store the properties in a new runtimes.properties file. These functions also uses a Global variable named globals.g_util_runtimeProperties that should be of type MEDIA.

    #1.  A global method to run on open of your solution to read in the properties

  • Mac: Print a PDF directly to a printer-

    LPR is the unix based printing built into the Mac. You can get a list of your available printers at http://localhost:631/printers .  When passing in a printer name, make sure you use the name listed on the left (the one without spaces).

  • Make a call from Skype-

    Source: Harjo Kompagnie, Direct ICT

  • Get the File Size of Data Stored in a Media Field-

    Allows you to get the files size of data stored in a media/blob column without writing to disc.

    var image = plugins.images.getImage(forms.movies.movie) //pass in the Media Field you want to get the size of
    var bytes = image.getData() 
    return bytes.length; //convert to KB or MB if you need
    
  • Writing the contents of the media library out to a file-

    Source: Patrick Ruhsert, Dr. Maison & Partner GmbH

    var vImage = plugins.http.getMediaData('media:///test.png'); 
    plugins.file.writeFile('D:\\test.png', vImage);

  • Get a Value List of all Servoy Users-

    Creates a value list where the display value is the User Name, and the store value is the UserUID.

  • Play Media File-

    Play an audo or movie file in the default play on Windows or Mac.