Jump to content
Sign in to follow this  

probl with limit of contextmenus

Recommended Posts


The following script relates a ContextMenu to every child window, but from the 17th window on, the connected function doesn't start.

In http://www.autoitscript.com/forum/index.ph...c=24902&hl= it is said, that the reason is a limit of autoit. Do you have ideas for a workaround of this limit?

many thanx in advance,


#include <GUIConstants.au3>
#include <Array.au3>
HotKeySet("{ESC}", "Terminate")
DIM $i, $sub [80][99], $sub_context[80][99]

AutoItSetOption ( "TrayIconDebug", 1 )
Opt("WinTitleMatchMode", 3) 
Opt("GUIOnEventMode", 1)

$parent = GUICreate("Gui" & $i, 200, 100, 50, 45)
GUISetState (@SW_SHOW)

For $i = 1 To 20
    GUICreate("Gui" & $i, 200, 100, 40*$i, 45*$i, -1, -1, $parent)
    GUISetState (@SW_SHOW)
    $contextmenu = GUICtrlCreateContextMenu ()

    $context_sub = GUICtrlCreateMenu("Play Track", $contextmenu)
    $context_verkn = GUICtrlCreateMenuItem ("Verknüpfung bearbeiten...", $contextmenu)
    GUICtrlSetOnEvent($context_verkn, "f_start_Song")
    GUICtrlCreateMenuitem ("",$contextmenu) 
    $context_entf = GUICtrlCreateMenuitem ("Delete", $contextmenu)
    GUICtrlSetOnEvent($context_entf,  "Terminate")
    $z = 0
    While $z<12
        $z = $z + 1
        $sub[$i][$z] = GUICtrlCreateMenuitem ('Title ' & $z, $context_sub)
        GUICtrlSetOnEvent($sub[$i][$z], "f_Start_Song")
        $sub_context[$i][$z] = $i

While 1

Func f_start_Song()
        Beep(400, 10)

Func Terminate()

Share this post

Link to post
Share on other sites

I dont see any purpos to this

if there was... i would try to help... ( obviously i looked at it)

waist of time to fill the screen with players that cant all play at the same time


Edited by Valuater


Share this post

Link to post
Share on other sites

Every Window should represent the cover of one music-album . In the context Menu I'd like to show the name of the songs, comming from the .m3u-File of the album. And if you choose one title I want e.g. Winamp to play this song.

So the Menu is different for every Release, because the name of the Songs are different !!! ;-) Sorry my english is not the best, do you understand now what I would like to do?

Edited by Laetterman

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.