elteejay 2 Posted June 11, 2010 Report Share Posted June 11, 2010 So I've always been a fan of learning stuff on my own. No offense, but I really can't go through all the tutorials to try and find one little thing I'm trying to change up. (as much as they help) I hate to sound like I'm hard headed by not having watched every single tutorial but I just have a quick question. Here I'm pulling the address information from the UI Text box of course. With the portion of script right there dedicated to filling out the address box how could I go about adding on Apt. with a random number. For example. If the user submits 1300 Merry St. as his address, I'd like to set it up so that if he chooses to run the whole script loop 3 - 4 times it'll submit his address like this. 1300 Merry St. Apt. #11300 Merry St. Apt. #21300 Merry St. Apt. #31300 Merry St. Apt. #4 Depending on the amount of times he runs the loop, that's what i need the Apt. # to go up to. Thank you so much to anyone that would be able to help me figure this out. This is what I currently have for the address portion.http://i47.tinypic.com/2ptceix.png Quote Link to post Share on other sites
webautomationlab 21 Posted June 11, 2010 Report Share Posted June 11, 2010 You dont want a random number. You want the number to reflect the loop count. So first, before the loop, we SET #loopcount = 1 Then in the loop at the end, we INC (increment) #loopcount Thus, at the beginning of loop 1, #loopcount = 1 at the beginning of loop 2, #loopcount = 2 Now, in the loop you will have to do this... SET #addresswithapt = {1} Apt. #{2} where {1} = txtAddress1 and {2} = #loopcount then fill text area #address = {1} where {1} = #addresswithapt hope that helps Quote Link to post Share on other sites
elteejay 2 Posted June 11, 2010 Author Report Share Posted June 11, 2010 Thank you so much webautomationlab. You rock! Quote Link to post Share on other sites
webautomationlab 21 Posted June 12, 2010 Report Share Posted June 12, 2010 My pleasure. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.