why I can't this.var with if statement?

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
User avatar
xMaxrayx
Posts: 220
Joined: 06 Dec 2022, 02:56
Contact:

why I can't this.var with if statement?

20 May 2024, 13:27

Code: Select all

        musicplayer__path := this.musicplayer__path??unset
        if !IsSet(path) && isSet(musicplayer__path)
            path := this.musicplayer__path
wish I can do this but I can't

Code: Select all

        if !IsSet(path) && isSet(this.musicplayer__path)
            path := this.musicplayer__path
-----------------------ヾ(•ω•`)o------------------------------
https://github.com/xmaxrayx/
User avatar
CoffeeChaton
Posts: 37
Joined: 11 May 2024, 10:50

Re: why I can't this.var with if statement?

20 May 2024, 19:07

did you lost ??unset at exp2?
User avatar
Noitalommi_2
Posts: 297
Joined: 16 Aug 2023, 10:58

Re: why I can't this.var with if statement?

20 May 2024, 20:08

Hi.

@xMaxrayx
I guess you must use this.HasOwnProp("musicplayer__path") instead of IsSet(this.musicplayer__path)? :think:
User avatar
thqby
Posts: 431
Joined: 16 Apr 2021, 11:18
Contact:

Re: why I can't this.var with if statement?

21 May 2024, 02:55

v2.1
path ??= this.musicplayer__path ?? unset

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: Bing [Bot] and 23 guests