I just tested your code with both versions and they work for me on win10 in chrome and edge
try this
I have provided a way to give different messages depending on whether alt key pressed or address bar change
try this
I have provided a way to give different messages depending on whether alt key pressed or address bar change
int w=win("" "Chrome_WidgetWin_1")
Acc a.Find(w "TEXT" "Address and search bar" "class=Chrome_WidgetWin_1" 0x35)
str originalValue=a.Value
int action
rep
,a.Find(w "TEXT" "Address and search bar" "class=Chrome_WidgetWin_1" 0x35)
,str newValue=a.Value
,if newValue!=originalValue
,,action=1
,,break
,lef X X
,rep 10*1
,,0.1
,,ifk A
,,,action=0
,,,break
bee
if action=1
,mes "my message here";;address bar changed message
else
,,mes "my message here";;alt key pressed message