variable with vb.net

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
nachtegaal9999
Newbie
Posts: 8
Joined: Sun Apr 09, 2006 10:40 pm

variable with vb.net

Post by nachtegaal9999 » Sun Apr 09, 2006 11:23 pm

Hello,

The webbrowser form macro works good but i want to give a different value which is put in a text file.

i want to replace the line

Let>FieldValue={"juni"}
with the value which is enclosed in the file C:month.txt
the first line of this file = Let>FieldValue={"mei"}
(this chanches all the time)

How do I do this.

thanks

Greetings from the Netherlands, Hoorn
Simon

nachtegaal9999
Newbie
Posts: 8
Joined: Sun Apr 09, 2006 10:40 pm

forgotten item

Post by nachtegaal9999 » Sun Apr 09, 2006 11:45 pm

I was forgotten to tell whats it depend on
it depends on if the file exixts or not

sorry

simon

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Wed Jun 09, 2010 7:34 pm

You may find this useful.... of course if the file simply contained the data, then it would be simpler because parsing the line would not be required.

Code: Select all


IfFileExists>c:\month.txt
  ReadLn>c:\month.txt,1,strLine
  Length>strLine,strLine_len
  If>StrLine_len>17
    Sub>StrLine_len,17
    MidStr>strLine,17,strLine_len,strSub
  Endif

  //Let>FieldValue={"juni"}
  Let>FieldValue={%strSub%}
Else
  Let>FieldValue={"some_default_value"}
Endif

MessageModal>FieldValue


File: c:\month.txt
----------------------
Let>FieldValue={"mei"}


Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts