posting HTML Code in a script

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
adivarup
Junior Coder
Posts: 36
Joined: Tue Mar 21, 2006 10:04 pm

posting HTML Code in a script

Post by adivarup » Thu Mar 30, 2006 5:47 pm

My original purpose of useing this tools was to help me to post to various forums I got going on.

Using WebRecorder i have recorded the motions of me signing in to my forum under a username, and going to a new topic and posting. Some of my posts I have formated text using HTML.

As a test, I am able to post regular text in the

Let>FieldValue={"This is my regular text"}

But, if I had formated text in HTML, it did not like it very much. Is there a roundabout solution to this? Perhaps between the " " it makes a call someplace else to get the HTML if it can not be read in the script?

Thank you
________
TM400
Last edited by adivarup on Wed Feb 02, 2011 12:38 pm, edited 1 time in total.

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Mar 30, 2006 6:33 pm

Perhaps you're making this more difficult than it really is.

Your line:
Let>FieldValue={"This is my regular text"}

Can be shortened to
Let>FieldValue=This is my regular text

Any HTML text can be assigned to a variable in the same way. One thing you need to understand is that all of the text assigned with a single let> must appear on the same line. If you want it to show up on multiple lines when you "paste it" to where you intend to use it, you place the sytem variable for carriage return and line feed into the line. It will look like this:

%CRLF%

For example:

Let>FieldValue=This is
%CRLF%my regular text

Will be entered in Macro Scheduler all on one line, but, when sent to a form outside Macro Scheduler will be on two lines.

Hope this helps,
Dick

adivarup
Junior Coder
Posts: 36
Joined: Tue Mar 21, 2006 10:04 pm

Post by adivarup » Thu Mar 30, 2006 10:29 pm

Here is my example.

I want the script to be able to copy this from a excel spreadsheet field, B3


In a world one man, a lone rebel, a
cop has to take on...


I have not written the code to copy from excel yet, but I am concerned as currently I have this line of code like this and it does not work.

Let>FieldValue={"In a world one man, a lone rebel, a
cop has to take on..."}
________
Teen Webcam
Last edited by adivarup on Sat Aug 13, 2011 3:08 pm, edited 1 time in total.

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Mar 30, 2006 10:57 pm

Create a test macro, paste this into it and see if it meets your needs. Notice the %CRLF% inserted into the line just ahead of
Let>FieldValue=In a world one man, a lone rebel, a %CRLF%cop has to take on...
Let>MSG_WIDTH=400
mdl>%FieldValue%


When you pull the text from excel, it will already have the carriage return and line feed built into it. You will not have to add another one.

See Bob's tip HERE for instructions on using DDE to get your cell contents from Excel.

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