get("Trigger") for ctb shows wrong return.

Things you’d like to miss in the future...
Post Reply
eil
Posts: 1622
Joined: 13 Jan 2011 19:44

get("Trigger") for ctb shows wrong return.

Post by eil »

while experimenting, tried this in ctb code and it gets 1 while should be 2.. maybe i simply don't understand smt?

Code: Select all

echo get("Trigger", [mode="context"]);
Win 7 SP1 x64 100% 1366x768

klownboy
Posts: 4141
Joined: 28 Feb 2012 19:27

Re: get("Trigger") for ctb shows wrong return.

Post by klownboy »

Agree, something doesn't seem right. I tried the following at the beginning of a script which was started by a CTB and I got "0" for the $context value - which is started manually . The "callmenu" value was correct. I have received correct returns for "context" when used in a CEA, "8".

Code: Select all

  $mod = get("trigger","callshift"); e $mod;
  $context = get("trigger","context"); e $context;
EDIT: I tried the same script, but ran it from a UDC and received a correct return of "4". So the issue seems to be with CTBs.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

admin
Site Admin
Posts: 60588
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: get("Trigger") for ctb shows wrong return.

Post by admin »

Confirmed and fixed. Thanks! :tup:

(The context had not been set for left clicks, only for right-clicks.)

admin
Site Admin
Posts: 60588
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: get("Trigger") for ctb shows wrong return.

Post by admin »

eil wrote: 22 Jan 2021 17:22 while experimenting, tried this in ctb code and it gets 1 while should be 2.. maybe i simply don't understand smt?

Code: Select all

echo get("Trigger", [mode="context"]);
BTW, this should look like this:

Code: Select all

echo get("Trigger", "context");

eil
Posts: 1622
Joined: 13 Jan 2011 19:44

Re: get("Trigger") for ctb shows wrong return.

Post by eil »

admin wrote: 01 Feb 2021 16:31 BTW, this should look like this:

Code: Select all

echo get("Trigger", "context");
i understood example from help file wrong. :oops:
Win 7 SP1 x64 100% 1366x768

admin
Site Admin
Posts: 60588
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: get("Trigger") for ctb shows wrong return.

Post by admin »

Well, it was a bug nevertheless. :)

Post Reply