Created
May 15, 2026 00:39
-
-
Save cbaragao/34058db19d0769d34e225f3af764f6e0 to your computer and use it in GitHub Desktop.
A prompt form for OneNote using OneTastic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Main($arg, $context) | |
| $prompter = DialogBox_Create("") | |
| DialogBox_AddLabel($prompter, "1 - Objective") | |
| DialogBox_AddLabel($prompter, " ") | |
| DialogBox_AddTextBox($prompter, "&Task", "Task", "", false) | |
| DialogBox_AddDropDown($prompter, "&Output format", "OutputFormat", "Prose", Array("Prose", "Bullet list", "Numbered list", "Table", "JSON", "Code", "Step-by-step")) | |
| DialogBox_AddDropDown($prompter, "&Length target", "LengthTarget", "Concise", Array("Very short", "Concise", "Medium", "Long")) | |
| DialogBox_AddLabel($prompter, " ") | |
| DialogBox_AddLabel($prompter, "2 - Role and Audience") | |
| DialogBox_AddLabel($prompter, " ") | |
| DialogBox_AddTextBox($prompter, "&Persona / role for the model", "Persona", "", false) | |
| DialogBox_AddTextBox($prompter, "&Intended audience", "IntendedAudience", "", false) | |
| DialogBox_AddDropDown($prompter, "&Tone", "Tone", "Professional", Array("Professional", "Conversational", "Academic", "Direct", "Empathetic", "Assertive")) | |
| DialogBox_AddDropDown($prompter, "&Expertise assumed in reader", "Expertise", "Intermediate", Array("Beginner", "Intermediate", "Expert")) | |
| DialogBox_AddLabel($prompter, " ") | |
| DialogBox_AddLabel($prompter, "3 - Context and Constraints") | |
| DialogBox_AddLabel($prompter, " ") | |
| DialogBox_AddTextBox($prompter, "&Background context", "BackgroundContext", "", false) | |
| DialogBox_AddTextBox($prompter, "&Must include (keywords/topics)", "MustInclude", "", false) | |
| DialogBox_AddTextBox($prompter, "&Must avoid (topics/phrases)", "MustAvoid", "", false) | |
| DialogBox_AddLabel($prompter, " ") | |
| DialogBox_AddLabel($prompter, "4 - Reasoning and Behavior") | |
| DialogBox_AddLabel($prompter, " ") | |
| DialogBox_AddCheckBox($prompter, "&Think step-by-step before answering (chain of thought)", "Chain", true) | |
| DialogBox_AddCheckBox($prompter, "&Acknowledging uncertainty when confident answer is unavailable", "Uncertainty", false) | |
| DialogBox_AddCheckBox($prompter, "&Offer alternative approaches if one exists", "Alternatives", false) | |
| DialogBox_AddCheckBox($prompter, "&Wrap output in XML tags (structured extraction)", "Structured", false) | |
| DialogBox_AddButton($prompter, "&Generate Prompt", "Generate") | |
| DialogBox_Show($prompter) | |
| //Get values | |
| $task = " - Task: " & $prompter.controls["Task"] | |
| $output_format = " - Output format: " & $prompter.controls["OutputFormat"] | |
| $length_target = " - Length target: " $prompter.controls["LengthTarget"] | |
| $persona = " - Persona / role for the model: " & $prompter.controls["Persona"] | |
| $intended_audience = " - Intended audience: " & $prompter.controls["IntendedAudience"] | |
| $tone = " - Tone: " & $prompter.controls["Tone"] | |
| $expertise = " - Expertise: " & $prompter.controls["Expertise"] | |
| $background_context = " - Background context: " & $prompter.controls["BackgroundContext"] | |
| $must_include = " - Must include: " & $prompter.controls["MustInclude"] | |
| $must_avoid = " - Must avoid: " & $prompter.controls["MustAvoid"] | |
| $chain = " - Think step-by-step before answering (chain of thought): " & $prompter.controls["Chain"] | |
| $uncertainty = " - Acknowledging uncertainty when confident answer is unavailable: " & $prompter.controls["Uncertainty"] | |
| $alternatives = " - Offer alternative approaches if one exists: " & $prompter.controls["Alternatives"] | |
| $structured = " - Wrap output in XML tags (structured extraction): " & $prompter.controls["Structured"] | |
| //Structure sections | |
| $objective = Array_Join(Array("1 - Objective", $task, $output_format, $length_target), "\n") | |
| $role = Array_Join(Array("2 - Role and Audience", $persona, $intended_audience, $tone, $expertise), "\n") | |
| $context = Array_Join(Array("3 - Context and Constraints", $background_context, $must_include, $must_avoid), "\n") | |
| $reasoning = Array_Join(Array("4 - Reasoning and Behavior", $chain, $uncertainty, $alternatives, $structured), "\n") | |
| //Generate output | |
| $output = Array_Join(Array($objective, $role, $context, $reasoning), "\n\n") | |
| $Page = GetCurrentPage() | |
| $Outline = InsertObject($Page, "Outline", -1) | |
| $Paragraph = InsertObject($Outline, "Paragraph", 0) | |
| $Paragraph.text = $output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment