
Get List of Named Window Hook Functions

jjweimer
// returns list of named window hook functions // name(string) = name of window (default topmost) // hook(string) = name of string to find (default all) // example - check whether the topmost graph has any of my named hook functions // string myhookfunctions = GetLoNamedWindowHookFunctions(hook="jjw*") // print myhookfunctions --> hook(jjw0)=gotozero; hook(jjw1)=gotoone; Function/S GetLoNamedWindowHookFunctions([name,hook]) string name, hook variable all string wrecStr, lStr="" variable sp=0, cp, ep if (ParamIsDefault(name)) name = WinName(0,1) if (strlen(name)==0) return "" endif endif wrecstr = WinRecreation(name,0) // notebook winrec, text = wrecStr // uncomment and have notebook winrec fo winrecreation string do cp = strsearch(wrecStr,"hook(",sp) if (cp == -1) break endif ep = strsearch(wrecStr,"\r",cp) lStr += wrecStr[cp,ep-1] + ";" sp = ep+1 while(1) if (ParamIsDefault(hook)) hook = lStr else hook = "hook("+hook+")=*" hook = ListMatch(lStr,hook) endif return hook end

Forum

Support

Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More