Macro Scheduler Shuts down after ExtractTable

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
rblack
Pro Scripter
Posts: 87
Joined: Sat Dec 22, 2007 12:39 pm

Macro Scheduler Shuts down after ExtractTable

Post by rblack » Sun Dec 23, 2007 9:08 pm

hello again,

I'm trying to use Macro Scheduler (with WebRecorder IEauto.dll) to download as CSV to future re-make, some logs which are in table in html file

i use the following code (i cannot give you the webpage because i dont want to have trouble in my company):

Code: Select all

LibLoad>IEAuto.dll,hIE
//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0
Let>delay=1
LibFunc>hIE,CreateIE,IE0,0
LibFunc>hIE,WaitIE,r,IE0
LibFunc>hIE,Navigate,r,IE0,https://somewebpage/mainframe.asp
wait>2
let>directory={"C:\Documents and Settings\Marlena\Pulpit\table.csv"}
LibFunc>hIE,ExtractTable,r,IE0,,12,str:directory
The CSV is exported properly to the directory which i want, but after executing the script, MacroScheduler shuts down... Hides from tray, and from process list, so i have to run it again to execute the scripts which should be used right after exporting the CSV...

Has anybody got a clue?
My system: WinXP SP2, IE6.0

rblack
Pro Scripter
Posts: 87
Joined: Sat Dec 22, 2007 12:39 pm

Post by rblack » Sun Dec 23, 2007 10:36 pm

the end of the log file looks like that:

Code: Select all

2007-12-23 23:34:10:640 - START: wait>2
2007-12-23 23:34:12:640 -   END: wait>2
2007-12-23 23:34:12:640 - START: let>directory={"C:\Documents and Settings\Marlena\Pulpit\table.csv"}
2007-12-23 23:34:12:640 -   END: let>directory={"C:\Documents and Settings\Marlena\Pulpit\table.csv"}
2007-12-23 23:34:12:640 - START: LibFunc>hIE,ExtractTable,r,IE0,,12,str:directory
There is no END of the last command, it smashes but i dont know why.

rblack
Pro Scripter
Posts: 87
Joined: Sat Dec 22, 2007 12:39 pm

Post by rblack » Sun Dec 23, 2007 10:53 pm

ok, the same situation happens with every ExtractTable call i try to do, no matter in which script so where i am bugging? :P

BTW:I dont know how is it for you, but for me Christmas is a great time to do such stuff like automatization in work, to have after new year easier job ;))

ANYWAY: HAPPY HOLLIDAYS!! :)

rblack
Pro Scripter
Posts: 87
Joined: Sat Dec 22, 2007 12:39 pm

Post by rblack » Thu Dec 27, 2007 11:28 am

ok has anyone a clue whats going on? Please give me a sign

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

Post by Marcus Tettmar » Thu Dec 27, 2007 11:50 am

Please be patient - I have only just seen your posts after returning from our Christmas break. I am checking this out now. If there's a bug - we'll fix it quickly.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

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

Post by Marcus Tettmar » Thu Dec 27, 2007 11:58 am

Ok, the problem is in the documentation!!

The function takes an extra parameter. If you pass the wrong number of parms to a DLL it will cause a crash. The correct function definition is:

Function ExtractTable(IEInst:integer; frame, index:integer; filename:pchar; RemoveCRLF:integer): integer; stdcall;

The last parm tells it whether or not you want to strip out any carriage returns and line feeds from the data. So your code needs an extra value and should be:

LibFunc>hIE,ExtractTable,r,IE0,,12,str:directory,1

Or

LibFunc>hIE,ExtractTable,r,IE0,,12,str:directory,0

1 at the end to remove CRLFs, or 0 to leave them intact.

I will get the documentation corrected immediately!
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

rblack
Pro Scripter
Posts: 87
Joined: Sat Dec 22, 2007 12:39 pm

Post by rblack » Thu Dec 27, 2007 3:40 pm

woow :o
I spend hours trying to solve this out and it was just a parameter!

Macro Scheduller ROCKS!! GREAT PROGRAMME!

Thank you :)

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