Mega dropdown problem

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
udovcic
Posts: 12
Joined: Fri Apr 17, 2009 2:09 pm

Mega dropdown problem

Post by udovcic » Mon Dec 20, 2010 1:55 pm

Hello,

I have a problem with drop down menus.

On our site, we have mega drop down menus, that has a timeout that when expired, the menu will close. This happens when the mouse is moved from the mega drop down area.

Now, my problem is when my macro ends, the drop down will close it self, but i want it to still to be opened.

Here is an example.

Code: Select all

VERSION BUILD=7050969
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://svenskaspel.se/p4.aspx?pageid=3
TAG POS=1 TYPE=A ATTR=ID:topNavSport EXTRACT=TXT
DS CMD=MOVETO X={{!TAGX}} Y={{!TAGY}}
WAIT SECONDS=5
As soon as the macro ends, the menu closes. But, how can i get it to stay opened, in the next macro?

Can you pass the coordinates from a macro to another?

Best regards
Josip Udovcic
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: Mega dropdown problem

Post by Tech Support » Sun Dec 26, 2010 11:44 am

Hi Josip,

The problem here is that the mouse-over effect goes away when the macro stops. That closes the menu.

The best solution is to add the mouse-over DS command to your next macro, too.

Yes, you can pass variables from one macro to another. The "trick" is to use the iimGetLastExtract command to return data (= any kind of extracted text or variable content) to the calling script:

(1) Store the values in !EXTRACT

Code: Select all

SET !EXTRACT {{!TAGX}}
SET !EXTRACT {{!TAGY}}
(2) In your calling script, retrieve the values via iimGetLastExtract

Code: Select all

x = iim1.iimGetLastExtract (1)
y = iim1.iimGetLastExtract (2)
(3) Set the new values for your next macro

Code: Select all

i = iim.iimSet ("valuex", x)
i = iim.iimSet ("valuey", y)
i = iim1.iimPlay ("nextmacro")
(4) Use these values in the next macro

Code: Select all

DS CMD=MOVETO X={{VALUEX}} Y={{VALUEY}}
Post Reply