wait for user click

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
ptoing
Posts: 4
Joined: Fri Feb 02, 2007 12:37 pm

wait for user click

Post by ptoing » Fri Feb 02, 2007 12:47 pm

is there any way that the script waits for a user to click, and after that it continues to run? the situation is needed when e.g. u need to click a security image and you don't use any image recognition.
i tried:

Code: Select all

WAIT SECONDS=number
but still i would like it to be more flexible then that, so the script continues not only when number is reached, but also when in the meantime a page is fully loaded.
i hope that i expressed myself clearly :)
Hannes, Tech Support

Post by Hannes, Tech Support » Fri Feb 02, 2007 3:12 pm

Hello,

the PAUSE command (http://www.iopus.com/imacros/help/cmd_pause.htm) is not yet implemented in the FF plugin, but surely will be in one of the next releases.


Best,

Hannes
ptoing
Posts: 4
Joined: Fri Feb 02, 2007 12:37 pm

Post by ptoing » Fri Feb 02, 2007 6:37 pm

PAUSE
Same as a manual click of the "Pause" button: Stops the execution of the macro. Waits for user to click "Continue" to continue.
I would like my script to load one page with security image on it, then I would like to click it, and after that I would like the script to load another page. It could look like this:

Code: Select all

URL GOTO=http://one.page (with security image)
PAUSE (user clicks security image)
URL GOTO=http://another.page
And the question again: will i have to click PLAY after clicking security image, or will the script continue itself?
Hannes, Tech Support

Post by Hannes, Tech Support » Mon Feb 05, 2007 1:13 pm

Yes, the PAUSE command (which is not yet available for the FF-plugin) requests the user clicking "continue" to go on (with whatever the macro does).

There is no "PAUSE until user has clicked anything" command.

If the page changes after clicking the image (e.g. some success message), you can use the scripting interface in order to get the behavior you are interested in:

[Remark: This refers to the iMacros browser, not the FF plugin]

1) Script runs first macro until there is the security image
2) Makro tries to find the success message (e.g. via EXTRACT command).
3a) If page has not changed (picture not clicked -> no success message), the script returns to 2), trying to find the success message
3b) If message is found -> continue with next part of macro.

That way, the script will loop until the changes are made, i.e. until you have clicked the image.


Hannes
Last edited by Hannes, Tech Support on Tue Feb 06, 2007 5:07 pm, edited 1 time in total.
ptoing
Posts: 4
Joined: Fri Feb 02, 2007 12:37 pm

Post by ptoing » Mon Feb 05, 2007 6:58 pm

Excellent, this is what i was looking for. I am waiting for the PAUSE command to be implemented then.
Post Reply