cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error(0x80004005) with function GetMacro

yjestin
Super Contributor

Hi,

In a macro (myMacro1), i have this portion of code :

Set myTrigger = MegaEnv.GetMacro("myMacro2")
myTrigger.CmdInvoke Ddf,1

When i run myMacro1 on Hopex V1R3 cp12, i get this error :
Script error "Error(0x80004005)" at Line 167 : myMacro1

I found KB 00005464 and KB 00005773 on the MEGA site about this type of error but it doesn't match my problem.

When i run the macro on MEGA 2009, i have no problem.

Can someone help me ?

Regards

2 Replies

yjestin
Super Contributor

Hello Lionel,

 

The problem is solved by replacing "megaEnv" by "oRoot.currentEnvironment"

🙂

 

Thanks a lot !

 

Regards

lionel
MEGA
MEGA

Hello,

 

what does the line 167 correspond to ? (difficult to help you without knowing where the error comes from).

If line 167 is the first one of the two you showed us, try to replace "megaEnv" by "oRoot.currentEnvironment" (oRoot needs to be defined ;-), and to replace the name of your macro by a field (in MEGA, right click on your macro and click "Copy" --> Then paste in your script editor)

 

Set myTrigger = oRoot.CurrentEnvironment.GetMacro("<field for myMacro2>")

If the error comes form the second line you showed us, it sounds logical but :

- verify you have a sub called "CmdInvoke" in your "myMacro2"

- verify in your current macro that Dfd is correctly defined

- also try to add "Call"  at the beginning of the line (who knows... 😉

Call myTrigger.CmdInvoke(Ddf,1)

 

Hope that helps 🙂

 

Regards,

 

Lionel