A more general approach without
OR and without
in is below, though in v2 one might use arrays instead of comma-delimited strings.
Code: Select all
#Requires AutoHotkey v1.1.33.11
banlist := "ab,cd,ef"
current_list := "gh,ij"
random_num := "gh"
random_num := "cdd"
o := ","
If InStr(o banlist o current_list o, o random_num o)
MsgBox 64, Success, Found!
Else MsgBox 48, Failure, Not found!
Code: Select all
#Requires AutoHotkey v2.0
banlist := 'ab,cd,ef'
current_list := 'gh,ij'
random_num := 'gh'
random_num := 'cdd'
o := ','
If InStr(o banlist o current_list o, o random_num o)
MsgBox 'Found!' , 'Success', 'Iconi'
Else MsgBox 'Not found!', 'Failure', 'Icon!'