[Anthill-pro] Stamp scripting
Eric Minick
etm at urbancode.com
Mon Jul 30 09:47:01 CDT 2007
Stamps are a little out of the ordinary in that they don't automatically
import the classic helper methods. You can get them by starting your
script with:
import com.urbancode.anthill3.runtime.scripting.helpers.*;
Regards,
Eric
Uldis Karlovs-Karlovskis wrote:
> Hello again!
> I`m trying to script my own stamp strategy but without success. Everything
> what I`m trying to script in Stamp Templates fails with kind of error "...
> Attempt to resolve method: mostRecentSuccess() on undefined variable or
> class name: BuildLifeLookup : at Line: 1 : in file: inline evaluation of:
> ..."
> Even scripts from examples are failing. The script can`t get any objects
> from system. What`s the problem?
>
> This is one example of my scripts:
>
> String current = StampLookup.getLatestStampValue();
> int startIndex = 0;
> int endIndex = 0;
>
> String result = "0.0.1.1"; //default value
>
> if(current.length()>="0.0.0.0".length())
> {
> startIndex = current.indexOf(".", startIndex) + 1;
> startIndex = current.indexOf(".", startIndex) + 1;
> endIndex = current.indexOf(".", startIndex);
>
> long lastDigits = Long.parseLong(current.substring(startIndex,
> endIndex));
> lastDigits ++;
> result = current.substring(0,startIndex) + String.valueOf(lastDigits) +
> current.substring(endIndex,current.length());
> }
> return result;
>
>
>
> And where can I find those AntHill packages to import as said in
> https://www.anthillpro.com/anthill3-help-3.2/html/default.html. I can`t find
> any of them!
>
> Uldis
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
>
More information about the Anthill-pro
mailing list