// ==================================================================
// MS issue: IE fails to open a file if complete path is not given
// ==================================================================

  PushTagsandRegisters; // Clean Macro writing...

// Should've done full HTML &xxx; translation first, but...
  FindInString('%?','://',1,3);
// If this is an URL, leave it alone
  IfOK(!|LetReg(2,'%?');JMP('execute');|);
// Strip any '#' first; otherwise windows won't find the file
  FindInString('%?','#',1,3);
  IfOK('',!|GetLength(1,'%?');|);
  ExtractByIndex(0,'%?',0,%!1-1);
// Just try to find the file relative to the current directory
  SearchForFile(2,'%!0','%p');
// If failed, use whatever is given
  IfOK('',!|LetReg(2,'%!0');|);

:execute:: ==========================================================
  ShellExecute('Open','%!2','','%p');

  PopTagsandRegisters;

End;
