[Anthill-pro] Stamp scripting
Uldis Karlovs-Karlovskis
uldisk at ctco.lv
Tue Jul 31 02:48:29 CDT 2007
I`ve spent a lot of time trying to figure out how to write these annoying
stamp templates but finally I`ve got the point. Interesting thing that
object StampLookup returns no object. Maybe this is from some older version?
To get latest stamps I`m using BuildLifeLookup like in some example scripts
but it does not look good because of methods mostRecentSuccess and
mostRecentFailure.
Happy coding!
Uldis, C. T. Co
-----Original Message-----
From: anthill-pro-bounces at lists.urbancode.com
[mailto:anthill-pro-bounces at lists.urbancode.com] On Behalf Of Steve Boone
Sent: pirmdiena, 2007. gada 30. jūlijā 17:55
To: AnthillPro user and support list.
Subject: Re: [Anthill-pro] Stamp scripting
Uldis,
I forgot to mention, Stamps are different because they do not automatically
import the helper methods. You will need to add
import com.urbancode.anthill3.runtime.scripting.helpers.*;
at the start of your script.
Regards,
Steve
On 7/30/07, Uldis Karlovs-Karlovskis <uldisk at ctco.lv> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.urbancode.com/pipermail/anthill-pro/attachments/20070731/f66679c4/attachment.htm
More information about the Anthill-pro
mailing list