[FIXED] Misc. SC Get Trigger Concerns

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

: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: Use Your Profile Or Signature
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: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

[FIXED] Misc. SC Get Trigger Concerns

Post by TheQwerty »

  1. 'ctbindex' is case-sensitive. Anything other than all lowercase is treated as the default 'mousebtn' and leads to utter confusion when testing on CTB1 or CTB2.
  2. Scripts triggered by dropping items on a CTB show as having an index of -1.
  3. As a direct result of the previous item, the other CTB functions (ctbname(), etc.) fail after dropping items because -1 is an "Invalid button index".
  4. mousebtn returns 0 (none) when dropping files on a CTB.
Testing Snippet:

Code: Select all

Snip: CTB 1
  XYplorer 16.20.0001, 1/20/2016 10:03:43 AM
Action
  NewUserButton
Name
  Triger Test
Icon
  
ScriptL
  function a($n) {
    $f = Get('Trigger', $n);
    $v = eval("<get trigger $n>");
    $m = Get('Trigger', 'mousebtn');
    return <<<RET
  Case: $n  -  Function: $f  -  Variable: $v  -  MouseBtn: $m
  
  RET;
  }
  
  "Test"
     $report = '';
     $report = $report . a('ctbindex');
     $report = $report . a('ctbIndex') . <crlf>;
     $report = $report . a('Ctbindex');
     $report = $report . a('CTBIndex');
     $report = $report . a('CTBINDEX');
     text $report;
  
ScriptR
  function a($n) {
    $f = Get('Trigger', $n);
    $v = eval("<get trigger $n>");
    $m = Get('Trigger', 'mousebtn');
    return <<<RET
  Case: $n  -  Function: $f  -  Variable: $v  -  MouseBtn: $m
  
  RET;
  }
  
  "Test"
     $report = '';
     $report = $report . a('ctbindex');
     $report = $report . a('ctbIndex') . <crlf>;
     $report = $report . a('Ctbindex');
     $report = $report . a('CTBIndex');
     $report = $report . a('CTBINDEX');
     text $report;
  
FireClick
  0
[/size]
Last edited by TheQwerty on 25 Jan 2016 13:43, edited 1 time in total.
Reason: Fixed in v16.20.0006 - 2016-01-22 13:21

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

Re: Misc. SC Get Trigger Concerns

Post by admin »

All fixed in next beta. Thanks!

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Misc. SC Get Trigger Concerns

Post by TheQwerty »

Much better!

Post Reply