Sign in to follow this  
Followers 0
Rob774

ID's that have session numbers in them

4 posts in this topic

Hi guys
 
I must say that these forums have been a great help to me as I am starting out in Autoit scripting but I have hit a wall when it comes to my next issue.
 
What my script is doing is reading an Excel spread sheet and putting the data in to a field on a web page. What I have found now is that some fields are session based. So a field would be called "ID=Business_173623744894_Note_84" where the 173623744894 is the session number but the words are the same all the time.
 
The code I use now for fields I know the name of is:
 
Local $Note_Value = _ExcelReadCell($oExcel1, 7, 14) ;Reads the Excel spread sheet for a value
 
 
Local $note_text = _IEGetObjByName($oIE, "note_text")
_IEFormElementSetValue($note_text, $Note_Value)
 
How can I write the code if the note_field is like the one above where is has a session number in it? If someone could help or point me in teh right direction it would be great. Thanks

Share this post


Link to post
Share on other sites



Perhaps you could determine a way to calculate the proper name and then continue to use _IEGetObjByName. Otherwise, I would look at using _IETagNameGetCollection and then loop through the returned collection until you find the desired element.

Share this post


Link to post
Share on other sites

Thanks, I will go looking for some examples of _IETagNameGetCollection and see if I can make it work.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0