Search code examples
vbaimacros

Run iMacros Enterprise Edition macro on the iMacros Player Edition


I developed a macro to fill fields in a web site, click a "validate" and "submit" button.

On my machine, with the Enterprise Edition, it runs as expected. I tested it a number of times.

I sent the macro to a field user, who has the Player Edition (same version number). The macro, runs through the login process and works until it starts entering data. When it runs the highlighted code below, the macro clears the web site and leaves a few links.

The code below is for updating the first field. It enters the value and then clicks the "ENTER" button. This particular website needs an "enter" or "tab" keystroke at this point to start a behind the scenes validation. (When it runs on my machine, there is a little validation message that pops up after the "ENTER" key is executed - just like it is supposed to. This isn’t happening with the Player Edition.)

Several different users, with the Player Edition have tried the macro, and the same thing happens; the website goes practically blank when the "ENTER" command is executed.

I have tried the following things:

Commented the code out – doesn’t work  
Change the 0 to * - doesn’t work  
Changed ENTER to TAB –  doesn’t work – the macro enters } after TAB

I also looked at the emulation. When I run the macro, the bottom of the web site says “Emulating IE 10”. When the user runs the macro, the web site says “Emulating IE 11”. Could this be the cause of the different behavior? If so, is there a way to programmatically change it? Is there was way to force the macro to emulate IE 10 when the user runs the macro? I have two other iMacros that they use and this hasn’t been an issue before.

The extract code below is used to confirm that a value has been entered and validated and then the macro moves on to the next field.

IM = ""
IM = "CODE:"
IM = IM + "TAB T=2" + vbNewLine
IM = IM + "SET !TIMEOUT 1" + vbNewLine
IM = IM + "TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:editWarrantyform:repairOrderNumberId CONTENT=" & vRO(Y) + vbNewLine

iret = iim1.iimPlay(IM)

IM = ""
IM = "CODE:"
IM = IM + "TAB T=2" + vbNewLine
IM = IM + "SET !TIMEOUT 60" + vbNewLine
IM = IM + "DS CMD=KEY X=0 Y=0 CONTENT={ENTER}" + vbNewLine

iret = iim1.iimPlay(IM)            **** MACRO ERRORS OUT WHEN THIS LINE IS EXECUTED

IM = ""
IM = "CODE:"
IM = IM + "TAB T=2" + vbNewLine
IM = IM + "SET !TIMEOUT 60" + vbNewLine
IM = IM + "TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:editWarrantyform:repairOrderNumberId EXTRACT=TXT" + vbNewLine

iret = iim1.iimPlay(IM)

vTmp = ""
vTmp = iim1.iimgetlastextract
vTmp = Replace(vTmp, "[EXTRACT]", "")
vTmp = Trim(vTmp)

Does the "ENTER" command work any different in the Player edition than in the Enterprise Edition? I have several other iMacro processes in this same macro and the field users say these run without any issues. I don't think the "ENTER" command is used in any of these other processes.


Solution

  • Turns out it was the IE emulation. On my machine (Enterprise Edition), the IE emulation was 10. On the user's machine (Player Edition), the IE emulation was 11. Once we switched the user's emulation to IE 10, the macro ran like it did on my machine....who knew....