Comma, ReadFile and SMTPSendMail
Moderators: Dorian (MJT support), JRL
Comma, ReadFile and SMTPSendMail
I am working with the ReadFile command and have experienced a problem when the data retrieved contains a comma. I am sending the data as a variable representing the body of the e-mail with SMTPSendMail.
This is the first line of text in the file being read: Created and sent on Tuesday, December 04, 2007 4:13 PM
What is actually sent is the following: Created and sent on Tuesday
Why is all the data after the first comma dropped?
Thanks,
Rory
This is the first line of text in the file being read: Created and sent on Tuesday, December 04, 2007 4:13 PM
What is actually sent is the following: Created and sent on Tuesday
Why is all the data after the first comma dropped?
Thanks,
Rory
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Please send your code. Then we might be able to help.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
well, i have also a problem with readfile in which there are a lot of commas ( , ) and other "ugly" characters like [{?>IEAuto.dll,hIE
ReadFile>data.csv,data
LibFunc>hIE,Navigate,r,%IE[0]%,http://mypage.com/dataobtain.php
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>3
Let>FieldName={"who"}
Let>FieldValue=me
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,str:FieldValue,0
Let>FieldName={"content"}
//Press TAB*4
//send>data
PutClipBoard>%data%
GetClipBoard>data2
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,str:data2,0
//**********************
In desperation i tried to put the data to clipboard and then send it. It made the script work sometime, but i need the script to work with 100% efficency, not once per several times.
In the code version above:
+ the "who" field is always filled properly
- the "content" field is fille properly once per 3 runs (and i am 100% sure the page loads completely because there is no graphic on the page)
I tried several ways to fill the form:
1) The following code send about 300 lines, and then opens a new IE window and crashes:
Press TAB*4
send>data
2) The following evolution make access violation and other errors:
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,str:data2,1
3) This commands doesnt do anything, send data correct, or crash macro sheduller (its random):
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,data2,0
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,data,0
4) The following commands send data until the first encountered comma:
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,%data%,0
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,%data2%,0
OH NO! Something has gone wrong, macro scheduler crashed and all the code in my script has been deleted, does macro scheduler do any temporary backup of scripts???
ReadFile>data.csv,data
LibFunc>hIE,Navigate,r,%IE[0]%,http://mypage.com/dataobtain.php
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>3
Let>FieldName={"who"}
Let>FieldValue=me
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,str:FieldValue,0
Let>FieldName={"content"}
//Press TAB*4
//send>data
PutClipBoard>%data%
GetClipBoard>data2
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,str:data2,0
//**********************
In desperation i tried to put the data to clipboard and then send it. It made the script work sometime, but i need the script to work with 100% efficency, not once per several times.
In the code version above:
+ the "who" field is always filled properly
- the "content" field is fille properly once per 3 runs (and i am 100% sure the page loads completely because there is no graphic on the page)
I tried several ways to fill the form:
1) The following code send about 300 lines, and then opens a new IE window and crashes:
Press TAB*4
send>data
2) The following evolution make access violation and other errors:
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,str:data2,1
3) This commands doesnt do anything, send data correct, or crash macro sheduller (its random):
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,data2,0
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,data,0
4) The following commands send data until the first encountered comma:
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,%data%,0
LibFunc>hIE,FormFill,r,%IE[0]%,,bform,str:FieldName,%data2%,0
OH NO! Something has gone wrong, macro scheduler crashed and all the code in my script has been deleted, does macro scheduler do any temporary backup of scripts???
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
>Why does the fillform function not work?
Without access to the page in question I cannot answer that - are you able to provide the URL of the page in question and which fields you want filled?
Without access to the page in question I cannot answer that - are you able to provide the URL of the page in question and which fields you want filled?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
None of the fields have names. So there is no way to reference them.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?