- Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathplugins_clipboard.html
82 lines (82 loc) · 3.89 KB
/
plugins_clipboard.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<htmllang="en">
<head>
<metacharset="utf-8">
<metahttp-equiv="X-UA-Compatible" content="IE=edge">
<metaname="viewport" content="width=device-width, initial-scale=1">
<title>SmallBASIC | plugins_clipboard</title>
<metaname="description" content="SmallBASIC | One more basic">
<linkrel="canonical" href="/plugins_clipboard.html">
<linkrel="keywords" href="plugins_clipboard">
<linkrel="stylesheet" href="/css/style.css">
<linkrel="icon" type="image/png" href="/images/sb-desktop-32x32.png">
<scriptsrc="/clipboard.js"></script>
</head>
<body>
<buttononclick="topFunction()" id="BackToTopBtn" title="Go to top">⯅</button>
<scriptsrc="/backtotop.js"></script>
<divclass="wrapAll clearfix">
<navclass="navigation">
<divclass="logo">
<ahref="/"><imgsrc='/images/sb-logo.png?v=2' alt="logo"></a>
</div>
<divclass="navlinks">
<ahref="/pages/download.html">Download</a>
<ahref="/pages/news.html">News</a>
<ahref="/pages/community.html">Community</a>
<aclass='active' href="/pages/articles.html">Resources</a>
<ahref="/pages/reference.html">Language Reference</a>
<ahref="/pages/guide.html">SmallBASIC Manual</a>
</div>
</nav>
<divclass="mainsection">
<divclass="tabs clearfix">
<divclass="tabsRight">
<atarget="_github" href="https://github.com/smallbasic/smallbasic.github.io/blob/master/_build/pages/plugins_clipboard.markdown">Edit</a>
<atarget="_github" href="https://github.com/smallbasic/smallbasic.github.io/commits/master/_build/pages/plugins_clipboard.markdown">History</a>
</div>
</div>
<divclass="article">
<h1id="clipboard---copy-and-paste">Clipboard - Copy and Paste</h1>
<h2id="about-the-plugin">About the plugin</h2>
<p>Clipboard is a simple plugin to copy and paste text between your
SmallBASIC program and the Windows or Linux desktop.</p>
<h2id="using-the-plugin">Using the plugin</h2>
<p>The plugin can be used by importing it with
<code>import clipboard</code>. A simple “Hello World” program looks like
this:</p>
<divclass="sourceCode" id="cb1"><pre
class="sourceCode smallbasic"><codeclass="sourceCode smallbasic"><spanid="cb1-1"><ahref="#cb1-1" aria-hidden="true" tabindex="-1"></a><spanclass="pp">import</span> clipboard</span>
<spanid="cb1-2"><ahref="#cb1-2" aria-hidden="true" tabindex="-1"></a></span>
<spanid="cb1-3"><ahref="#cb1-3" aria-hidden="true" tabindex="-1"></a><spanclass="kw">print</span> clipboard.paste()</span>
<spanid="cb1-4"><ahref="#cb1-4" aria-hidden="true" tabindex="-1"></a></span>
<spanid="cb1-5"><ahref="#cb1-5" aria-hidden="true" tabindex="-1"></a>text = <spanclass="st">"Hello World"</span></span>
<spanid="cb1-6"><ahref="#cb1-6" aria-hidden="true" tabindex="-1"></a></span>
<spanid="cb1-7"><ahref="#cb1-7" aria-hidden="true" tabindex="-1"></a>clipboard.<spanclass="fu">copy</span>(text)</span>
<spanid="cb1-8"><ahref="#cb1-8" aria-hidden="true" tabindex="-1"></a></span>
<spanid="cb1-9"><ahref="#cb1-9" aria-hidden="true" tabindex="-1"></a><spanclass="kw">print</span> clipboard.paste()</span></code></pre></div>
<h2id="supported-commands">Supported Commands</h2>
<h3id="paste">PASTE</h3>
<blockquote>
<p>text = paste()</p>
</blockquote>
<p>text (String): content of the clipboard</p>
<p>Copies the content of the system clipboard to <em>text</em>.</p>
<h3id="copy">COPY</h3>
<blockquote>
<p>copy(text)</p>
</blockquote>
<p>text (String): text for copying to the clipboard</p>
<p>Copies <em>text</em> to the system clipboard.</p>
</div>
<divclass="pagefooter">
This page was last edited on Sat, 9 Sep 2023 22:31:16 +0200
|
<ahref="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
processed with
<ahref="https://pandoc.org/MANUAL.html#pandocs-markdown" target="_blank" rel="nofollow">pandoc 3.1.12.1</a>
</div>
</div>
</div>
</body>
</html>