IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#24610 - 03/27/09 12:01 PM [Macro] 6.1.2 INT function fix.
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
In PSM 6.1.2, the "INT" function does not work properly, and does not round down the number as it should. Until the issue is fixed in a future release, here is a fixed version of the command, using the javascript macro feature of PSM.

How to install:

- Copy the code below in an empty text file using Notepad(it's very important, as the text must be saved in pure ASCII text. Other text editors might not always work).
- Save the file in the "Macro" directory of PrintShop Mail 6, and give it a .js extension.
- Start or restart PrintShop Mail.

How to use:

- Use it exactly as you would use INT, but use INT_FIXED instead. It's the exact same usage.

Limitations:

THIS INFORMATION IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. USE AT YOUR OWN RISK.
MACROS are NOT SUPPORTED in ANY way.


code:
--------------------------------------------------------------------------------

// ****************************************************************************
// Function: INT_FIXED
//
// Fixed Int() function since as of PSM 6.1+, INT is broken and doesn't return
// the rounded down numbers as it should.
//
// Language: JScript
// Written by: Rapha

Top
#24611 - 03/30/09 03:17 AM Re: [Macro] 6.1.2 INT function fix.
Anonymous
Unregistered


Hi Raphael,

You also can work around this by using INT ([datafield] -0.5) for now - but be aware that it needs to be changed back when upgrade to 6.2

Top