Skip to content

Commit

Permalink
add plugin from wmjordan to work around issue #24
Browse files Browse the repository at this point in the history
closes #24
  • Loading branch information
stefankueng committed May 25, 2023
1 parent dc7bac3 commit 102b0d9
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
Binary file added plugins/Copy.zip
Binary file not shown.
36 changes: 36 additions & 0 deletions plugins/Copy/Copy.bpj
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// returns the version of the plugin
// this callback is not optional! If you fail to implement this, the plugin
// config dialog won't work properly with your plugin
function Version() { return 100; }


// this is the main function that gets executed when the command is run, i.e.
// the button is clicked
function Execute()
{
var t = BowPad.SciGetSelText();
if (t.length == 0) {
t = BowPad.SciGetCurLine();
}
BowPad.SetClipboardData(t, "");
var retry = 1000;
while ((t = BowPad.GetClipboardText()).length == 0 && --retry > 0) {
/*BowPad.sleep(10);*/
BowPad.SetClipboardData(t, "");
}
if (t.length == 0 && BowPad.GetClipboardText().length == 0) {
BowPad.alert("Copy failed");
return false;
}
return true;
}

// return true if the plugin command is enabled (used for the button)
// note: not used yet by BowPad, but planned for the future
function IsEnabled() { return true; }

// return true if the plugin button should appear as checked
// note: not used yet by BowPad, but planned for the future
function IsChecked() { return false; }


4 changes: 4 additions & 0 deletions plugins/Copy/Copy.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
100
208
Compatible copy\nUse this script to copy text when you have trouble copying content from BowPad while another program keeps accessing clipboard
wmjordan
Binary file added plugins/Copy/Copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions plugins/plugins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ Calculate
201
200
Calculate arithmetic expressions\nCtrl click: copy result to clipboard.\nShift click: display expression and result in a new window.\nwmjordan\n
Copy
100
208
Compatible copy\nUse this script to copy text when you have trouble copying content from BowPad while another program keeps accessing clipboard\nwmjordan\n
CountCharacters
100
200
Expand Down

0 comments on commit 102b0d9

Please sign in to comment.