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

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
eil
Posts: 1888
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|1900x1080

klownboy
Posts: 4468
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

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.

admin
Site Admin
Posts: 66652
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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: 66652
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @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: 1888
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|1900x1080

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

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

Post by admin »

Well, it was a bug nevertheless. :)

Post Reply