Close display in JavaScript.

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Posts: 67
Joined: Mon Feb 25, 2008 12:19 pm

Close display in JavaScript.

Post by evertt » Thu Mar 06, 2008 12:34 pm

Close display in JavaScript.

Is it possible to close the window in the imacro browser triggered with the
iimDisplay (“my text”)

I want to close that window when the JavaScript has terminated.

The command iimDisplay ("#HIDEDISPLAY") doesn’t work!!

Please a JavaScript command

Thank you for support
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm

Post by Tech Support » Thu Mar 06, 2008 5:17 pm

Thanks for this suggestion. I added it to our todo list.

FYI, there will be more advanced display options in the near future :)
Posts: 33
Joined: Mon Aug 06, 2007 8:49 pm

Post by joe_brown » Thu Mar 06, 2008 8:11 pm

NOTE: This way of "hotpatching" is NOT supported by iOpus at all!

A simple hotpatch would be ..


Find the string

Code: Select all

in rec.js in imacros.jar
and replace it for

Code: Select all


Restart Firefox and try it ..


Code: Select all

iimDisplay("Will hide Display in 5 secs for 5 secs..");
[Refresh Macro List] and run the iMacro test_hidedisplay.js


More info with regard to how to edit rec.js see post

.. On the other hand I suppose, if you wait for a few weeks, you may get, what you want (and more), included in the base-code (based on Tech Support's response).

Posts: 67
Joined: Mon Feb 25, 2008 12:19 pm

Post by evertt » Fri Mar 07, 2008 2:52 pm

I have not tried it yet but thank you for your answer!
Posts: 23
Joined: Sun Jun 16, 2019 10:27 pm

Re: Close display in JavaScript.

Post by rstancuna » Sun Jun 16, 2019 10:47 pm

Firefox 55, iMacros V8.9.7, Windows

Looked for a long time for a way to hide iimDisplay in javascript.
I couldn't find rec.js in imacros.jar to try the fix from above but my workaround is to run another macro.

In your js code, just run another macro at the end. The macro can be empty, just needs to run that other file.

Code: Select all

iimPlay("CODE: URL GOTO=imacros://run/?m=other%5Cremovedisplay.js");
Since I use it in several places and wanted to have a timeout before the display is hidden without having to enter WAIT SECONDS all the time before it, I made a nice function:

Code: Select all

function hidedisplay(timeout){
	if (timeout !== undefined && timeout.toString().match(/\d/)){
		iimPlay("CODE:WAIT SECONDS="+timeout.toString());
	iimPlay("CODE: URL GOTO=imacros://run/?m=other%5Cremovedisplay.js");
The function allows to enter a timeout with or without quotes ( hidedisplay(1.5) or hidedisplay("1.5") ) or you can leave it blank ( hidedisplay() ) for no timeout.
Waterfox 56.2, iMacros V8.9.7 on Windows
Post Reply