Any way to reset trigger modifier keys variables?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
eil
Posts: 1864
Joined: 13 Jan 2011 19:44

Any way to reset trigger modifier keys variables?

Post by eil »

Help file for <get trigger menushift> and get("Trigger", "callshift") states:
The value is never reset within the running session, so you can retrieve it even hours after the last menu was clicked.
Is there any way to manually reset that in user script?
Win 7 SP1 x64 100% 1366x768|1900x1080

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

Re: Any way to reset trigger modifier keys variables?

Post by admin »

Currently not. Why?

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

Re: Any way to reset trigger modifier keys variables?

Post by eil »

Well, just as Help file states - cause variable stays uncleaned for whole session.
Say i have a button-script that behaves differently depending if there was a modifier key = first i use it with modifier, next time without - but var is still there and it remembers it was "filled" by first use, so second use behaves as if modifier Was used(while it wasn't).
Win 7 SP1 x64 100% 1366x768|1900x1080

highend
Posts: 14923
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Any way to reset trigger modifier keys variables?

Post by highend »

oO

Code: Select all

$modKey = <get trigger callshift>;
    if     ($modKey == 1) { e "shift"; }
    elseif ($modKey == 2) { e "ctrl";  }
    elseif ($modKey == 4) { e "alt";   }
    else                  { e "none";  }
Guess what happens on the next call after you've used it on a button with e.g. shift pressed...
One of my scripts helped you out? Please donate via Paypal

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

Re: Any way to reset trigger modifier keys variables?

Post by eil »

Hm, seems like like my bad and smth else glitched... I had this line inside a big script $Shift = (get("Trigger", "callshift") == 2) ? "1" : "0"; and several times got false results >> while searching for possible issue in help i stumbled upon the notice: value is never reset within the running session >> leading me to think it was a source of an issue.(i stopped even thinking there was smth else)
That line is really misleading.! :evil:
Thanks for a hint.
Win 7 SP1 x64 100% 1366x768|1900x1080

Post Reply