Sending keys to Dynamics Pages

On several pages, including the Purchase Lines page and the deposit lines page, I wanted the totals on the header and even the factboxes to update after certain changes such as a new total being entered, so I have the following code entered:

IF ISCLEAR(WshShell) THEN
CREATE(WshShell,TRUE,TRUE);

WshShell.SendKeys(’{F5}’);
WshShell.SendKeys(’{F5}’);

It works, however, I’ve noticed that it makes the cursor move up one line and sometimes up 3 lines. Any clue why? Using remote desktop connection, NAV2013 R2.