VBS: read textfile to variable

Information related to the use of iMacros for form filling and data upload.

Moderator: iMacros Moderators

VBS: read textfile to variable

by Hannes, Tech Support on Wed Oct 25, 2006 5:43 am

This piece of code reads a textfile "test.txt" and stores its content in a variable "inputData" (taken from topic http://forum.iopus.com/viewtopic.php?p=4965#4965):

Code: Select all
Dim objFileSystem, objInputFile

Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objInputFile = objFileSystem.OpenTextFile("test.txt", 1)

' read everything in an array
inputData = objInputFile.ReadAll

objInputFile.Close

msgbox inputData
Hannes, iOpus Support
Hannes, Tech Support
 
Posts: 2120
Joined: Thu Sep 21, 2006 6:27 am

Re: VBS: read textfile to variable

by etzel on Wed Feb 25, 2009 11:23 am

Can this be used with the Firefox .js support with textfiles which contain conditional statements? such as checking for captcha, if found prompt for captcha, else next iimplay, on captchaprompt ok button submit, iimplay...

That would make my life a whole lot simpler
etzel
 
Posts: 6
Joined: Wed Jan 14, 2009 6:46 am


Return to How-To's and Examples for Form Filling

Who is online

Users browsing this forum: No registered users and 1 guest

Website Monitoring