FCIM...! (Read my Sig...)sanfric wrote:Hi
With Firefox, I use this procedure which works very wellI followed Tom's procedure to do the same thing with ChromeCode: Select all
RetVal = Shell("C:\program files\Firefox\firefox.exe imacros://run/?m=TP.iim")
Here is the TPS file. htmCode: Select all
RetVal = Shell("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe file:/// C:\Users\...\Documents\iMacros\Macros/TPS.htm")
It works but there are two tabs opened: an useless "TPS.htm" tab with "Lauch Cr iMacros" an after the web page defined in the instructions of the script.Code: Select all
html> <body onload="window.setTimeout('document.getElementById(\'criimlaunch\').click();', 1000);"> <script> var e_m64 = " VkVSU0lPTiUyMEJVSUxEJTNEMTAwMSUyMFJFQ09SREVSJTNEQ1IlMEFVUkwlMjBHT1RPJTNEaHR0cCUzQSUyRiUyRmNvcnJlc3BvbmRhbnRzLmxldGVsZWdyYW1tZS5mciUyRldEMTYwQVdQJTJGV0QxNjBBd3AuZXhlJTJGQ09OTkVDVCUyRnBvcnRhaWxfY29yciUzRl9XV1JFRkVSRVJfJTNEJTI2X1dXTkFUSU9OXyUzRDUlMEFUQUclMjBQT1MlM0QxJTIwVFlQRSUzRElNRyUyMEFUVFIlM0RJRCUzQUEyJTBBVEFHJTIwUE9TJTNEMSUyMFRZUEUlM0RTRUxFQ1QlMjBGT1JNJTNETkFNRSUzQVBBR0VfQVJUSUNMRVNfTk9VVkVBVV9URVhURSUyMEFUVFIlM0RJRCUzQUExJTIwQ09OVEVOVCUzRCUyNTM="; </script> </script> <a id="criimlaunch" href="javascript:(function() {try{if(!/^(?:chrome|https?|file)/.test(location)){alert('iMacros: Open webpage to run a macro.');return;}var macro = {};macro.source = decodeURIComponent(atob(e_m64));macro.name = 'MacroBookmarklet';var evt = document.createEvent('CustomEvent');evt.initCustomEvent('iMacrosRunMacro', true, true, macro);window.dispatchEvent(evt);}catch(e){alert('iMacros Bookmarklet error: '+e.toString());}}) ();">Launch CR iMacros</a> </body> < </script> </html>
How to have only the web page without the TPS.htm tab ? Or close immédiately this tab?
thank you in advance for your help.
Sanfric
Simply use a:
Code: Select all
TAB CLOSEALLOTHERS
Code: Select all
TAB T=0
TAB CLOSE
You might need '!ERRORIGNORE' for the Script to pass Parsing-Validation as I think there is a Check there for 'TAB T>0', but Negative Tab_Nbs do work, at least in iMacros for FF until at least v8.9.7, I reckon it will work in iMacros for CR as well, v8.4.4 or v10.0.
Hum, and mini-Detail, you have a "dangerous" or at least unneeded Space in "file:/// C:\Users\..."...