Skip to content

Instantly share code, notes, and snippets.

@grey-code
Created February 7, 2013 04:38
Show Gist options
  • Save grey-code/4728599 to your computer and use it in GitHub Desktop.
Save grey-code/4728599 to your computer and use it in GitHub Desktop.
AutoHotkey: inObj
inObj(obj, ss, cs:=false, bv:=true) {
r := false
if (!cs && !bv)
return ObjHasKey(obj, ss)
for a, b in obj
if (r := !r ? (cs ? (ss == (bv ? b : a)) : (ss = b)) : r)
break ; stop loop if found
return r ? a : r
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment