Kurt 1 Posted June 2, 2010 Report Share Posted June 2, 2010 Let's say a bot needed to go to multiple sites and fill in birthday info as entered by user in the UI. The problem is, each site uses slightly different formats for each. For example, some site use:1234 Others use:JanFebMar Others:JanuaryFebuaryMarch Is it possible to have User enter their birthday info once (day, date, year) and have ubot be able to select the correct choices from drop down menus, without having to use if/then statements for every possible choice? Thanks a lot... Quote Link to post Share on other sites
Net66 54 Posted June 2, 2010 Report Share Posted June 2, 2010 Is it possible to have User enter their birthday info once (day, date, year) and have ubot be able to select the correct choices from drop down menus, without having to use if/then statements for every possible choice? Thanks a lot... If I were approaching this I'd write a sub that convert the numeric month to the full word and and another that returned the abbreviated month name. In your script you'd just have to scrape the attribute into a list and read the first one (January), then pop in if conditions based on if its January, if its Jan or else it must be numeric. In either of the two word cases call the appropriate sub to get the data to fill in into a variable and then fill the value with the contents of that variable. Andy 2 Quote Link to post Share on other sites
alcr 135 Posted June 2, 2010 Report Share Posted June 2, 2010 If I were approaching this I'd write a sub that convert the numeric month to the full word and and another that returned the abbreviated month name. In your script you'd just have to scrape the attribute into a list and read the first one (January), then pop in if conditions based on if its January, if its Jan or else it must be numeric. In either of the two word cases call the appropriate sub to get the data to fill in into a variable and then fill the value with the contents of that variable. AndyI believe this is the most correct approach at the moment. 1 Quote Link to post Share on other sites
Kurt 1 Posted June 2, 2010 Author Report Share Posted June 2, 2010 Thanks guys, I'm not a great programmer and can't get the suggestion to work. I'm not sure how to convert the number to the word. I've been trying the following logic but can't get it to work either: UI = Dropdown box with 12 months listed - User selects a month If (evaluate) #month = Jan Then (select) (item 1) from dropdown (month) But this isn't working...Any ideas? http://www.dombom.com/UbotSelectMonth.jpg Quote Link to post Share on other sites
alcr 135 Posted June 2, 2010 Report Share Posted June 2, 2010 Can you go just normally choose by attribute cbMonth and then select from drop down 1? 1 Quote Link to post Share on other sites
Kurt 1 Posted June 2, 2010 Author Report Share Posted June 2, 2010 Can you go just normally choose by attribute cbMonth and then select from drop down 1? Yes, ubot can correctly:"selet from dropdown"Item: 1Name: cbMonth Here's a random sample page I'm using to try to work this out:https://www.baskinrobbins.com/bdayclub/RegisterInfo1.aspx Ubot will fill out every form on the page, except the month which I can't figure out how to let the User input the month and have Ubot select it for this site (and then other sites). Again, Ubot will select the month if I specifically tell it which one to select, but can't get it to work with UI. Thanks a lot... 1 Quote Link to post Share on other sites
UBotBuddy 331 Posted June 2, 2010 Report Share Posted June 2, 2010 I have included an include file that I use in my bots for processing dates. Checkout the different formats. If there is a format you would lie to see let me know and I will add it to this bot. BuddyDate-Formats.ubot 3 Quote Link to post Share on other sites
Kurt 1 Posted June 3, 2010 Author Report Share Posted June 3, 2010 I have included an include file that I use in my bots for processing dates. Checkout the different formats. If there is a format you would lie to see let me know and I will add it to this bot. Buddy Hey Buddy, Thanks a lot, I appreciate it. It's a little too complicated for me at this point. I got my way I posted above to work (not sure what was wrong) and I'll use that, but even though I don't understand your ubot exactly, I can see how it makes things easier than what I'm doing. Thanks again... Quote Link to post Share on other sites
Net66 54 Posted June 3, 2010 Report Share Posted June 3, 2010 Nice share Buddy! Andy 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.