Did Web Recorder command structure change?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
djs
Junior Coder
Posts: 47
Joined: Sun Apr 29, 2012 4:21 pm

Did Web Recorder command structure change?

Post by djs » Fri Feb 08, 2013 8:42 am

I have a very lengthy script that worked well in v13. It is mostly an IE automation script, using a lot of webrecorder commands.

For instance, in version 13, you would have:

Code: Select all

IE_WaitDocumentComplete>%IE[0]%,ie_res
but, version 14 seems to require:

Code: Select all

IEWaitDocumentComplete>%IE[0]%,ie_res
All of the IE commands take the _ out of them. Now, on a short macro, probably not a big deal, and I'm hoping that a search and replace will only get the right spots, but this may prove very problematic.

I like the new format better, just I would have assumed the old format would still work.

Did I miss something?

Dan

[/code]

djs
Junior Coder
Posts: 47
Joined: Sun Apr 29, 2012 4:21 pm

Post by djs » Fri Feb 08, 2013 10:00 am

In working with this a bit more....

I needed to delete all references to IE_GetTagLength
Okay, I can deal with that.

I needed to change IE_Create>0,IE[0] to IECreate>IE[0] (cleaner)
and I needed to change all IE_WaitNew to the new structure as well.

Of course, all of this was after I did a global search and replace for IE_ to just IE. Mangled a few variables, but the script survived that piece.

The hard part here was realizing that the structure of IECreate changed and dropped off the leading 0 (never understood that anyway). What happened was clicktags on the second window I opened didn't work, since, I assume, it was actually looking in the original window because I didn't delete the '0' in IE_WaitNew>0,IE[1]

Overall, not a terrible thing on the update, running some tests to make sure its all working now.

Dan

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Feb 08, 2013 11:14 am

Yes and there's a very good reason for this. There are some necessary small differences between the old imported functions and the new native functions. To stop things from breaking the two are kept separate so that people can carry on using the old functions if they want and can move at their leisure.

Your IE_ functions will still work - they are imported from the IEAuto.DLL library. To make them work just do this:

Go to your Macro Scheduler 13 program folder and find the Imports folder. Copy this Imports folder.

Go to your Macro Scheduler 14 program folder and paste the Imports folder.

Now your existing IE_ functions will all work.

The native IE functions without the _ are native and internal to Macro Scheduler.

To convert to the new you need to:

1. Remove the _
2. For IECreate removethe 0 - IECreate only needs a single parameter - the reference handle variable
3. Get rid of the functions that return the buffer length - they are no longer needed (the ones starting IE_GetTagLength... ).

That's essentially it.

But if you do not want to make any changes and want to continue running existing code without any changes then just copy over your Imports folder so that IEAuto.DLL is known to Macro Scheduler 14.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

djs
Junior Coder
Posts: 47
Joined: Sun Apr 29, 2012 4:21 pm

Post by djs » Fri Feb 08, 2013 3:29 pm

Ahh, good to know. I wouldn't have thought about copying the imports folder over. Should have, just didn't think of it :)

Which in reverse, is an excellent point. When I upgrade the computers running the exe, I have to update the imports folder, which I wouldn't have thought to do either.

I do like the new format, just was a bit surprised when the macro I have worked on for a year and a half suddenly failed in a big way :) The interesting problems when you do an upgrade!!! It was an easier fix than I thought it would be though, its all running again.

Now, if I can get the website to quit changing, all would be good.

Dan

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Feb 08, 2013 3:32 pm

djs wrote: When I upgrade the computers running the exe, I have to update the imports folder, which I wouldn't have thought to do either.
If the .exes are already using the WebRecorder 3.0 Imports and the folder is already there then, no, you don't need to update the imports folder - it's already there.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

djs
Junior Coder
Posts: 47
Joined: Sun Apr 29, 2012 4:21 pm

Post by djs » Fri Feb 08, 2013 4:14 pm

Now I'm confused.

On a freshly written script, do I need the import folder anymore (assuming ie automation)? If so, isn't that updated with the new v14?

So, if I use any of the new commands, from IECreate on, I do or do not need to update the imports folder?

V14 introduced a wonderful command of IEGetFromURL, which was desparately needed for some of my work, so I need to use v14 commands, but not sure I can intermix the syntax from v13 to v14, unless the new structure is not part of ieauto.dll and is just built into macroscheduler.

Hmmm, someday, I'll figure all this out.

Dan

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Feb 08, 2013 4:23 pm

If you use the new native functions then no you do not need the Imports folder.

The imports folder is only needed if you use the old WebRecorder 3.0 DLL functions which start IE_. Those are exported by the IEAuto.DLL file which lives in the Imports folder.

The native functions do not need IEAuto.DLL

Only the IE_ functions (which are not native and never were) need IEAuto.DLL.

So a freshly written script does NOT need the Imports folder if it uses the native functions (either written by you or produced by the new WebRecorder v4) but still WOULD need it if you use old style IE_ functions.

I hope that's clear. I'm not sure how I can make it clearer.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

djs
Junior Coder
Posts: 47
Joined: Sun Apr 29, 2012 4:21 pm

Post by djs » Fri Feb 08, 2013 4:27 pm

Got it now.
Gone native.

I'll quit trying to make an easy problem complicated.

You simplified my life, I just didn't realize it. I was stuck in the old way, you know, from 2012.

Dan

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