NSearch Posted January 19, 2006 Share Posted January 19, 2006 (edited) I am trying to process 50 numbers at a time on a certain website. You can enter up to 50 numbers in a textarea before submitting, but I can not figure out how to get one number per line in the textarea without sending "{ENTER}", because I want it to run in the background. What I would like to have do is: While 1 count = count + 1 read number from flat file *enter number and carriage return to form element if count = 50 then count = 0 submit form => process further end if Wend *problem area I am currently using the following code to set the value _IEFormElementSetValue ($oNumber, $number) Thanks. Edited January 19, 2006 by NSearch Link to comment Share on other sites More sharing options...
NSearch Posted January 19, 2006 Author Share Posted January 19, 2006 I think I am going about this wrong, because each time I go through the loop, I am resetting the form element value. I guess what I need to do is go through the loop 50 time, writting a string with $number & @crlf (50) times. I am having trouble with the logic, any help would be appreciated. Thanks. Link to comment Share on other sites More sharing options...
DaleHohm Posted January 19, 2006 Share Posted January 19, 2006 I think I am going about this wrong, because each time I go through the loop, I am resetting the form element value. I guess what I need to do is go through the loop 50 time, writting a string with $number & @crlf (50) times. I am having trouble with the logic, any help would be appreciated. Thanks.Try constructing your entire form value in a variable first and then write that variable to the input area on the form. Your string variable would contain 50 number + @CR pairs.Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
seandisanti Posted January 19, 2006 Share Posted January 19, 2006 I am trying to process 50 numbers at a time on a certain website. You can enter up to 50 numbers in a textarea before submitting, but I can not figure out how to get one number per line in the textarea without sending "{ENTER}", because I want it to run in the background. What I would like to have do is: While 1 count = count + 1 read number from flat file *enter number and carriage return to form element if count = 50 then count = 0 submit form => process further end if Wend *problem area I am currently using the following code to set the value _IEFormElementSetValue ($oNumber, $number) Thanks. I think I am going about this wrong, because each time I go through the loop, I am resetting the form element value. I guess what I need to do is go through the loop 50 time, writting a string with $number & @crlf (50) times. I am having trouble with the logic, any help would be appreciated. Thanks.like this? $tmp = "" For $x = 1 to 50 $tmp = $tmp & $x if $x < 50 Then $tmp = $tmp & @lf Next _IEFormElementSetValue ($oNumber, $tmp) Link to comment Share on other sites More sharing options...
NSearch Posted January 19, 2006 Author Share Posted January 19, 2006 Thanks fellas. Works great. Link to comment Share on other sites More sharing options...
seandisanti Posted January 19, 2006 Share Posted January 19, 2006 Thanks fellas. Works great.no problem, glad to help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now