Results 1 to 10 of 10

Thread: Perform action when menu is open but no button is pressed

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by Ni3ls View Post
    HI all.

    I would like to know how to do an action of a certain menu is opened but no button is pressed.
    Code:
    	for(;;)
    	{	
    		self waittill("menuresponse", menu, response);
    This wait till a button is pressed. I want to do it the same with a waittill if thats possible. Because the other solution should be a normal loop. DOnt know if thats buggy?
    The "menuresponse" notification tells you if the menu is open without any further action being necessary because part of its parameters is the menu that has just opened. So, all you have to do is:

    PHP Code:
        for(;;)
        {    
            
    self waittill"menuresponse"menuresponse );
            
            if( 
    menu == "themenuyouwanttomonitor" )
            {
                
    self dostuff();
            }
        } 

  2. #2
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Quote Originally Posted by Tally View Post
    The "menuresponse" notification tells you if the menu is open without any further action being necessary because part of its parameters is the menu that has just opened. So, all you have to do is:

    PHP Code:
        for(;;)
        {    
            
    self waittill"menuresponse"menuresponse );
            
            if( 
    menu == "themenuyouwanttomonitor" )
            {
                
    self dostuff();
            }
        } 
    `No this is not working. It waits for a scriptresponse ( button action)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •