0
48 次瀏覽
我正在嘗試建立自訂腳本以在 Paratext 中使用。問題是它們似乎靜默失敗,沒有任何輸出。我嘗試了幾個不同的腳本,但都沒有錯誤訊息(有時會出現一個短暫的對話框顯示「執行中」,但沒有輸出。)以下是我 cm 資料夾中的 Python 程式碼:

# -*- coding: utf-8 -*-

print "TEST SUCCESSFUL"

print "This script is working"

print "Project: " + Project

以及我在 cms 資料夾中的程式碼:

\check Simple Test

\subMenu TestScripts

\script SimpleTest.py

\description Simplest possible test

\toText

\utf8
機器翻譯自 English
Paratext (107 點) 提出 | 48 次瀏覽

1 個回答

0
\toText 選項表示該腳本應該建立一個輸出檔案。

如果您將其更改為 \toList(或刪除該行,因為 \toList 是預設值),輸出將顯示在清單視窗中。

SampleScript.py 檔案提供了腳本的較大範例。
機器翻譯自 English
[Administrator]
(3.4k 點) 提出
謝謝!我已經讓它運作起來了。
機器翻譯自 English

相關問題

+4
2 個回答 495 次瀏覽
歡迎來到 Paratext 腳本與技巧(hacks)專區 我見過不少這類腳本流傳在外,最近也得知有人有一個 Google Drive 資料夾,裡面存放了許多不同的 Python 腳本,可以加入 Paratext 選單中 我意識到我們之前沒有合適的 ... 主意 您需要自行託管(self-host)您的腳本,並在此處提供連結,但至少我們可以在一個地方找到它們!
[Moderator]
dhigby
1.3k 提出
已提問 10月 22, 2021
0
2 個回答 72 次瀏覽
我試圖在 Paratext 9.5 專案中設定一個 autocorrect.txt 檔案。我已經按照 Paratext 說明檔案中的指示操作,但它似乎完全沒有作用。可能是哪裡出錯了呢?
anon399461 123 提出 已提問 5月 8
0
2 個回答 35 次瀏覽
我在 MacBook Pro(M1 處理器)上使用 Parallels Desktop 版本 26.3.3 運行 Paratext 9.5 Paratext 運行起來非常緩慢,經常出現故障(在螢幕左上角顯示一個小的 Paratext 視窗) 如果我連接到 ... 量 RAM 的其他程式,問題仍然存在 有其他人遇到過這個問題嗎?任何建議都將不勝感激
anon055151 176 提出 已提問 5月 30
0
0 個回答 132 次瀏覽
本節區提供用於在 Paratext 中執行特定功能的腳本,利用 Paratext 內建的 Python 腳本功能 此處的每個主題都應涵蓋一項特定任務,例如處理交叉引用 這些文章採用 Wiki 格式,因此您可以將腳本新增至 ... Paratext 8/9 Projects*CMS 資料夾 我們將在頂端的置頂文章中包含安裝這些 Python 檔案的一般說明
[Moderator]
dhigby
1.3k 提出
已提問 10月 22, 2021
0
0 個回答 304 次瀏覽
Have you done anything with custom checks and scripts in Python? If so could you send me ([Email Removed]) a ... out the best way to support Python in P8. Blessings, anon451647
匿名 提出 已提問 6月 1, 2016
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
For just as each of us has one body with many members, and these members do not all have the same function, so in Christ we, though many, form one body, and each member belongs to all the others.
Romans 12:4-5
3,046 個問題
6,006 個回答
5,671 則評論
2,027 位使用者