StrokesPlus.net Forum
»
General Discussion
»
Scripts
»
Copy List of Gesture Usage to Clipboard
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,359 Location: Tampa, FL Thanks: 28 times Was thanked: 419 time(s) in 356 post(s)
|
This loops through all gestures and builds a list of usage, then copies the results to the clipboard. This is just per drawing, not based on the action. For example, if you had the same gesture in two actions they both are counted here. Code://Array to hold values
var tuples = [];
//Loop through all gestures and build list/count
for(j=0;j<sp_config.Gestures.Count;j++){
tuples.push([sp_config.Gestures[j].Name, sp_config.Gestures[j].MatchCount]);
}
//Sort array
tuples.sort(function(a, b) {
a = a[1];
b = b[1];
return a < b ? -1 : (a > b ? 1 : 0);
});
//Build output string and copy to clipboard
var output = "";
for (var i = tuples.length-1; i >= 0; i--) {
output += tuples[i][1] + ' - ' + tuples[i][0] + '\r\n';
}
clip.SetText(output);
|
|
|
|
StrokesPlus.net Forum
»
General Discussion
»
Scripts
»
Copy List of Gesture Usage to Clipboard
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close