Page 1 of 1

Mega dropdown problem

Posted: Mon Dec 20, 2010 6:55 am
by udovcic
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

Re: Mega dropdown problem

Posted: Sun Dec 26, 2010 4:44 am
by Tech Support
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}}