Hi,
Before I buy the full version of Macro Scheduler, I want to make sure it can do what I want it to do.
I would like it to go onto my website, extract order information (such as Items purchased, name, address, phone number) then use this information to fill in a form on another website and also send off a confirmation e-mail to my customer. The data will always be different, and in different quantaties (for the items ordered).
Thanks in Advance
Can I do this?
Moderators: Dorian (MJT support), JRL
Can I do this
I was also looking at iOpus internet macros, but it doesn't seem to be as flexable with non-internet tasks.
Hi DP,
maybe scanning the (static) webpage source code for the variable data would meet your requirements. (see command reference! for details)
to do command
read line from saved (webpage) source code/file e.g. 3rd line = ReadLn>
cut of unwanted (static) line parts, e.g. 48 from left= MidStr>
identify text (purchased item) before next Tag = Position>
start browser with target webpage = Run Program>
move to inputfield = Press Tab
input data = Send>
submit the input = Press Enter
send confirmation = SMTPSendMail>
write log = TimeStamp>
to ge the variables could be tricky, but is undoubtfully possible
rgds,
Ernest
maybe scanning the (static) webpage source code for the variable data would meet your requirements. (see command reference! for details)
to do command
read line from saved (webpage) source code/file e.g. 3rd line = ReadLn>
cut of unwanted (static) line parts, e.g. 48 from left= MidStr>
identify text (purchased item) before next Tag = Position>
start browser with target webpage = Run Program>
move to inputfield = Press Tab
input data = Send>
submit the input = Press Enter
send confirmation = SMTPSendMail>
write log = TimeStamp>
to ge the variables could be tricky, but is undoubtfully possible
rgds,
Ernest
Can I do this
Thanks for the pointers.
I think in the long run I would be better off with Macro Scheduler, but in the short term there will be a steep learning curve.
Is there anyone who writes scripts for $ here?
I think in the long run I would be better off with Macro Scheduler, but in the short term there will be a steep learning curve.
Is there anyone who writes scripts for $ here?
- Marcus Tettmar
- Site Admin
- Posts: 7380
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Hi,
I would also look at the HTTPRequest command and consider avoiding automating a web browser altogether. Construct the GET request to retrieve the initial data to an HTML file and parse it using ReadLn etc. Then construct the POST request for posting the data to the new page.
Or look at automating Internet Explorer with VBScript - some samples at http://www.mjtnet.com/scripts.hts
I would also look at the HTTPRequest command and consider avoiding automating a web browser altogether. Construct the GET request to retrieve the initial data to an HTML file and parse it using ReadLn etc. Then construct the POST request for posting the data to the new page.
Or look at automating Internet Explorer with VBScript - some samples at http://www.mjtnet.com/scripts.hts
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?
Can I do this
One thing that might help is that I have the phrase "ship to" in the web page, followed by the Name and shipping address, so this would help me find this with macro. Should I just save the page to disk, and then run a macro on the HTML file. I would eventually like to put this all in a spead sheet as well.
- Marcus Tettmar
- Site Admin
- Posts: 7380
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
It's up to you - you can either save it to a text file and scan the file, or if you use the HTTPRequest command, for example, the HTML can end up in a variable and then you could use the Position command to locate the position of the 'ship to' string and then use MidStr to extract the data you are interested in. Both methods are similar but you would avoid reading in line by line by working on the variable. It probably depends more on how you intend to get the web page in the first place. The HTTPRequest function allows you to retrieve to a variable and/or to a file. If you automate a web browser you are more likely going to have to save to a file.
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?
Hi,
have a look at this, maybe usefull ...
Rgds,
Ernest
have a look at this, maybe usefull ...
Code: Select all
Let>line=TestTestTestTestTestTestTestTestTest"ARIAL">ship to: ToonTown</font ...
Let>tag=<
//check string pos. of "ship to"
Position>ship to,line,1,shippos
//ignore "ship to" + the following space
Add>shippos,9
//check for the "<" Tag which should follow the value/variable
Position><,line,%shippos%,tagpos
//one step back, to ignore the "<" Tag
Sub>tagpos,1
//read the value between "ship to" + space and TagPos - 1
MidStr>line,shippos,tagpos,destination
MessageModal>%destination%
Ernest
Ooops,
You can delete this line from my prevoius script sample: Let>tag=<
---
And btw. if you want to create a "database"/spreadsheet you hopefully use the Comma Separated Value (*csv) - format which can be used with EXCEL, ACCESS, etc.
The destination file will look like this:
Date, OrderNumber, Surname, Name, Postcode, City, ...
09/12/2002,12345,Dark,Pink,4711,ToonTown,...
So you can import it to EXCEL etc.
Have fun,
E.
You can delete this line from my prevoius script sample: Let>tag=<
---
And btw. if you want to create a "database"/spreadsheet you hopefully use the Comma Separated Value (*csv) - format which can be used with EXCEL, ACCESS, etc.
Code: Select all
:
GetDate>Date
Let>Delimiter=,
Let>Data=
Let>Header=Date, OrderNumber, Surname, Name, Postcode, City, Country, ...
//check if destination file is available
IfFileExists>C:\MyOrders.txt, FileFeed
//create destination file with header
WLN>C:\MyOrders.txt, RESULT, %Header%
//merge collected data to create a data record + write it to the file
Label>FileFeed
ConCat>Data,%Date%%Delimiter%%OrderNumber%%Delimiter%%Surname%%Delimiter%%Name%%Delimiter% ...
WLN>C:\MyOrders.txt, RESULT, %Data%
...
Date, OrderNumber, Surname, Name, Postcode, City, ...
09/12/2002,12345,Dark,Pink,4711,ToonTown,...
So you can import it to EXCEL etc.
Have fun,
E.