WaitNewIE works in script but not in exe

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
davidwms
Junior Coder
Posts: 23
Joined: Wed Aug 26, 2009 6:18 pm
Location: Madison, AL
Contact:

WaitNewIE works in script but not in exe

Post by davidwms » Thu May 19, 2011 8:21 pm

Hi,

In Windows XP Pro I was using Macro Scheduler 11 downloading files from a 3rd party web site and had a script and exe that worked perfectly. When I upgraded to Internet Explorer 8 it stopped working (even the script) and would not recognize the new window when using hIE's command WaitNewIE. I upgraded from Macro Scheduler 11 to 12 and it fixed the script but I cannot get it to work in the exe. I have recompiled after upgrading it but it still hangs waiting for the new window even though it has opened. It may be that my Macro Scheduler 11 did not uninstall properly. Can you shed some light on this? Here is a small snippet of the code:

Code: Select all

// first download the csv file of cash balances to positions.csv
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"https://secure.cnbservice.net/images/Export.gif"}
LibFunc>hIE,ClickTag,r,%IE[2]%,str:FrameName,str:FormName,IMG,HREF,str:TagValue

// wait for report window to open
LibFunc>hIE,WaitNewIE,IE[3],0
MessageModal>New window open
LibFunc>hIE,WaitIE,r,IE[3]
The message window never opens.

Thanks in advance.

David Williams

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

Post by JRL » Thu May 19, 2011 9:17 pm

I don't know anything at all about the web functions but this kind of sounds like it might be a case of you still compiling with the version 11 compiler. The compiler file name is msrt.exe and you should have a copy in C:\Program Files\Macro Scheduler12 and it should have a fairly recent date. The size of the file on my computer is 3,127,862 bytes. If you still have a folder for Macro Scheduler 11, it will have msrt.exe with an older date and a smaller file size, something like 2,455,094 bytes. I would move the Macro Scheduler 11 msrt.exe file to some obscure location then try to compile just to be sure you're not still using the release 11 compiler.

davidwms
Junior Coder
Posts: 23
Joined: Wed Aug 26, 2009 6:18 pm
Location: Madison, AL
Contact:

Post by davidwms » Fri May 20, 2011 2:12 pm

Thanks to JRL for the reply.

I did a search for msrt.exe and only found it once under E:\Progamr Files\Macro Scheduler 12\ and it is the same size as your 12 version. I have rebooted several times since uninstalling Macro Scheduler 11 and have recompiled since but it still does not recognize the new window.

Any more ideas as to why the script would work and the exe not work?

David Williams

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 May 20, 2011 2:21 pm

Your script uses the imported IEAuto functions. You therefore need an Imports folder containing IEAuto.DLL and IEAuto.INI in the same folder as your EXE otherwise the EXE will not know these IE_ functions.

Have you ensured this is the case? Copy the Imports subfolder from your Macro Scheduler 12 program folder into the same folder as your .exe.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

davidwms
Junior Coder
Posts: 23
Joined: Wed Aug 26, 2009 6:18 pm
Location: Madison, AL
Contact:

Post by davidwms » Fri May 20, 2011 2:37 pm

Thank you mtettmar,

I had forgotten that was where it got IE functions. I still had the Macro Scheduler 11 versions of those files in my Macro folder. After copying the new ones everything works great!

Thanks for your great support.

David Williams

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