Here is the Selenium example code that uses Integer.toString in Selenium.Type command
int i = 1000;
while(i != 999999){
selenium.type("id=resetKey" , Integer.toString(i) );
selenium.click("id=button");
selenium.waitForPageToLoad("30000");
i = i + 1 ;
Thread.sleep(500);
}
