Add number to Variable
After running a extractor pattern on a page and setting a new Variable, I'd like to add 25 to that number. This will result in giving me the next 25 results, I hope. How do I add 25 to the variable in Interpreted Java so I can then call the new number in my parameters list as a post variable?
Add number to Variable
Hi,
Thanks for bringing this up. We plan on building a method in to the "session" object to handle this for you, but for now the code is a little bit ugly:
myVal = Integer.parseInt( session.getVariable( "MYVAL" ));
myVal += 25;
session.setVariable( "MYVAL", String.valueOf( myVal ));
Feel free to post back if that doesn't seem to do the trick.
Kind regards,
Todd Wilson