@uipath/delegate-sdk 1.203.1 → 1.203.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -3
- package/dist/index.mjs +2 -2
- package/dist/skills/business-analysis/SKILL.md +729 -0
- package/dist/skills/business-analysis/as-is-capture.md +444 -0
- package/dist/skills/business-analysis/assets/progress.yaml +19 -0
- package/dist/skills/business-analysis/assets/task-list.md +34 -0
- package/dist/skills/business-analysis/automation-hub-publishing.md +47 -0
- package/dist/skills/business-analysis/bpmn-to-be-design.md +274 -0
- package/dist/skills/business-analysis/case-to-be-design.md +223 -0
- package/dist/skills/business-analysis/diagram-authoring.md +224 -0
- package/dist/skills/business-analysis/industry-gaps.md +134 -0
- package/dist/skills/business-analysis/interview-spine.md +297 -0
- package/dist/skills/business-analysis/locales/de.json +54 -0
- package/dist/skills/business-analysis/locales/en.json +54 -0
- package/dist/skills/business-analysis/locales/es-MX.json +54 -0
- package/dist/skills/business-analysis/locales/es.json +54 -0
- package/dist/skills/business-analysis/locales/fr.json +54 -0
- package/dist/skills/business-analysis/locales/ja.json +54 -0
- package/dist/skills/business-analysis/locales/ko.json +54 -0
- package/dist/skills/business-analysis/locales/pt-BR.json +54 -0
- package/dist/skills/business-analysis/locales/pt.json +54 -0
- package/dist/skills/business-analysis/locales/ro.json +54 -0
- package/dist/skills/business-analysis/locales/tr.json +54 -0
- package/dist/skills/business-analysis/locales/zh-CN.json +54 -0
- package/dist/skills/business-analysis/locales/zh-TW.json +54 -0
- package/dist/skills/business-analysis/pdd-generation.md +204 -0
- package/dist/skills/business-analysis/pdd-template.md +562 -0
- package/dist/skills/business-analysis/progress-presentation.json +13 -0
- package/dist/skills/business-analysis/recording-first.md +19 -0
- package/dist/skills/business-analysis/recording-processing.md +152 -0
- package/dist/skills/business-analysis/references/automation-hub-open-api.md +57 -0
- package/dist/skills/business-analysis/references/case-definition-spec.md +90 -0
- package/dist/skills/business-analysis/references/case-design-patterns/loan-origination-spec.md +86 -0
- package/dist/skills/business-analysis/references/component-type-mapping.md +52 -0
- package/dist/skills/business-analysis/references/uipath-products/case-management-schema.md +62 -0
- package/dist/skills/business-analysis/references/uipath-products/maestro-case-framework.md +65 -0
- package/dist/skills/business-analysis/references/uipath-products/maestro-case-management.md +49 -0
- package/dist/skills/business-analysis/research-offer.md +104 -0
- package/dist/skills/business-analysis/research-pass.md +149 -0
- package/dist/skills/business-analysis/scripts/assemble-pdd.ps1 +294 -0
- package/dist/skills/business-analysis/scripts/assemble-pdd.sh +453 -0
- package/dist/skills/business-analysis/scripts/check-phase-ready.ps1 +72 -0
- package/dist/skills/business-analysis/scripts/check-phase-ready.sh +98 -0
- package/dist/skills/business-analysis/scripts/lint-diagram.ps1 +524 -0
- package/dist/skills/business-analysis/scripts/lint-diagram.sh +519 -0
- package/dist/skills/business-analysis/scripts/stamp-pages.ps1 +363 -0
- package/dist/skills/business-analysis/scripts/stamp-pages.sh +360 -0
- package/dist/skills/business-analysis/to-be-design.md +199 -0
- package/dist/skills/confluence/SKILL.md +386 -0
- package/dist/skills/doc-coauthoring/SKILL.md +295 -0
- package/dist/skills/excel-architect/SKILL.macos.md +161 -0
- package/dist/skills/excel-architect/SKILL.md +180 -0
- package/dist/skills/excel-architect/SKILL.windows.md +61 -0
- package/dist/skills/excel-architect/archetypes/01-financial-model-advanced.md +332 -0
- package/dist/skills/excel-architect/archetypes/01-financial-model.md +248 -0
- package/dist/skills/excel-architect/archetypes/02-data-analysis.md +171 -0
- package/dist/skills/excel-architect/archetypes/03-tracking-dashboard.md +160 -0
- package/dist/skills/excel-architect/archetypes/04-project-planning.md +193 -0
- package/dist/skills/excel-architect/archetypes/05-simple-table.md +111 -0
- package/dist/skills/excel-architect/building.md +279 -0
- package/dist/skills/excel-architect/create.md +64 -0
- package/dist/skills/excel-architect/data-and-formulas.md +186 -0
- package/dist/skills/excel-architect/generator.md +272 -0
- package/dist/skills/excel-architect/macos/scripts/add-data-validation.applescript +242 -0
- package/dist/skills/excel-architect/macos/scripts/append-rows.applescript +310 -0
- package/dist/skills/excel-architect/macos/scripts/apply-conditional-format.applescript +565 -0
- package/dist/skills/excel-architect/macos/scripts/autofit-columns.applescript +79 -0
- package/dist/skills/excel-architect/macos/scripts/benchmark.sh +135 -0
- package/dist/skills/excel-architect/macos/scripts/check-compile.sh +30 -0
- package/dist/skills/excel-architect/macos/scripts/clear-range.applescript +152 -0
- package/dist/skills/excel-architect/macos/scripts/copy-paste.applescript +179 -0
- package/dist/skills/excel-architect/macos/scripts/create-chart.applescript +531 -0
- package/dist/skills/excel-architect/macos/scripts/create-pivot.applescript +443 -0
- package/dist/skills/excel-architect/macos/scripts/create-sheets.applescript +264 -0
- package/dist/skills/excel-architect/macos/scripts/create-workbook.applescript +92 -0
- package/dist/skills/excel-architect/macos/scripts/delete-chart.applescript +105 -0
- package/dist/skills/excel-architect/macos/scripts/delete-sheet.applescript +127 -0
- package/dist/skills/excel-architect/macos/scripts/filter-data.applescript +213 -0
- package/dist/skills/excel-architect/macos/scripts/find-replace.applescript +238 -0
- package/dist/skills/excel-architect/macos/scripts/format-range.applescript +531 -0
- package/dist/skills/excel-architect/macos/scripts/freeze-panes.applescript +133 -0
- package/dist/skills/excel-architect/macos/scripts/get-current-file.applescript +24 -0
- package/dist/skills/excel-architect/macos/scripts/get-sheet-dimensions.applescript +115 -0
- package/dist/skills/excel-architect/macos/scripts/health-check.applescript +704 -0
- package/dist/skills/excel-architect/macos/scripts/list-open-workbooks.applescript +80 -0
- package/dist/skills/excel-architect/macos/scripts/maximize-window.applescript +47 -0
- package/dist/skills/excel-architect/macos/scripts/merge-cells.applescript +227 -0
- package/dist/skills/excel-architect/macos/scripts/open-workbook.applescript +139 -0
- package/dist/skills/excel-architect/macos/scripts/read-range.applescript +267 -0
- package/dist/skills/excel-architect/macos/scripts/rename-sheet.applescript +231 -0
- package/dist/skills/excel-architect/macos/scripts/select-sheet.applescript +133 -0
- package/dist/skills/excel-architect/macos/scripts/set-tab-color.applescript +109 -0
- package/dist/skills/excel-architect/macos/scripts/sort-data.applescript +136 -0
- package/dist/skills/excel-architect/macos/scripts/undo.applescript +59 -0
- package/dist/skills/excel-architect/macos/scripts/workbook-lifecycle.applescript +149 -0
- package/dist/skills/excel-architect/macos/scripts/write-formula.applescript +225 -0
- package/dist/skills/excel-architect/macos/scripts/write-range.applescript +351 -0
- package/dist/skills/excel-architect/reference/api/advanced.md +381 -0
- package/dist/skills/excel-architect/reference/api/basic.md +747 -0
- package/dist/skills/excel-architect/reference/guides.md +348 -0
- package/dist/skills/excel-architect/reference/repair.md +174 -0
- package/dist/skills/excel-architect/reference/troubleshooting.md +46 -0
- package/dist/skills/excel-architect/scripting.md +266 -0
- package/dist/skills/excel-architect/styling-and-features.md +433 -0
- package/dist/skills/excel-architect/windows/api/composites.md +337 -0
- package/dist/skills/excel-architect/windows/api/scripting.md +139 -0
- package/dist/skills/excel-architect/windows/examples/level-1-workflows.md +485 -0
- package/dist/skills/excel-architect/windows/examples/level-2-advanced.md +690 -0
- package/dist/skills/excel-architect/windows/examples/level-3-scripting.md +337 -0
- package/dist/skills/github/SKILL.md +446 -0
- package/dist/skills/github/recipes/add-comment.md +85 -0
- package/dist/skills/github/recipes/check-pr-status.md +122 -0
- package/dist/skills/github/recipes/compare-branches.md +79 -0
- package/dist/skills/github/recipes/create-issue.md +103 -0
- package/dist/skills/github/recipes/create-pr.md +97 -0
- package/dist/skills/github/recipes/get-file-contents.md +76 -0
- package/dist/skills/github/recipes/get-last-commit.md +128 -0
- package/dist/skills/github/recipes/list-my-open-prs.md +105 -0
- package/dist/skills/github/recipes/list-recent-commits.md +84 -0
- package/dist/skills/github/recipes/search-issues.md +115 -0
- package/dist/skills/google-workspace/SKILL.md +217 -0
- package/dist/skills/google-workspace/services/calendar.md +311 -0
- package/dist/skills/google-workspace/services/docs.md +426 -0
- package/dist/skills/google-workspace/services/drive.md +504 -0
- package/dist/skills/google-workspace/services/gmail.md +466 -0
- package/dist/skills/google-workspace/services/sheets.md +370 -0
- package/dist/skills/internal-comms/SKILL.md +35 -0
- package/dist/skills/internal-comms/examples/3p-updates.md +47 -0
- package/dist/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/dist/skills/internal-comms/examples/faq-answers.md +30 -0
- package/dist/skills/internal-comms/examples/general-comms.md +15 -0
- package/dist/skills/jira/SKILL.md +397 -0
- package/dist/skills/jira/recipes/add-comment.md +123 -0
- package/dist/skills/jira/recipes/assign-issue.md +157 -0
- package/dist/skills/jira/recipes/create-issue.md +274 -0
- package/dist/skills/jira/recipes/get-issue-details.md +154 -0
- package/dist/skills/jira/recipes/list-projects.md +151 -0
- package/dist/skills/jira/recipes/my-issues.md +180 -0
- package/dist/skills/jira/recipes/search-issues.md +215 -0
- package/dist/skills/jira/recipes/transition-issue.md +154 -0
- package/dist/skills/jira/recipes/troubleshooting.md +387 -0
- package/dist/skills/knowledge-base/SKILL.md +289 -0
- package/dist/skills/media-tools/SKILL.md +204 -0
- package/dist/skills/media-tools/references/encode-runbook.md +24 -0
- package/dist/skills/media-tools/references/resolve-binaries.md +88 -0
- package/dist/skills/media-tools/scripts/macos/ff-launch.sh +22 -0
- package/dist/skills/media-tools/scripts/macos/ff-poll.sh +10 -0
- package/dist/skills/media-tools/scripts/windows/ff-launch.ps1 +34 -0
- package/dist/skills/media-tools/scripts/windows/ff-poll.ps1 +20 -0
- package/dist/skills/office-download/SKILL.md +161 -0
- package/dist/skills/outlook-365/SKILL.macos.md +331 -0
- package/dist/skills/outlook-365/SKILL.md +171 -0
- package/dist/skills/outlook-365/SKILL.windows.md +124 -0
- package/dist/skills/outlook-365/api/bulk-email-operations.md +178 -0
- package/dist/skills/outlook-365/api/check-availability.md +87 -0
- package/dist/skills/outlook-365/api/create-inbox-rule.md +182 -0
- package/dist/skills/outlook-365/api/download-attachments.md +149 -0
- package/dist/skills/outlook-365/api/find-and-email-contact.md +185 -0
- package/dist/skills/outlook-365/api/manage-calendar-events.md +189 -0
- package/dist/skills/outlook-365/api/organize-with-folders.md +178 -0
- package/dist/skills/outlook-365/api/reply-to-conversation.md +68 -0
- package/dist/skills/outlook-365/api/schedule-meeting.md +73 -0
- package/dist/skills/outlook-365/api/search-and-read-email.md +93 -0
- package/dist/skills/outlook-365/api/send-email-with-attachments.md +94 -0
- package/dist/skills/outlook-365/api/send-email.md +396 -0
- package/dist/skills/outlook-365/api/set-out-of-office.md +196 -0
- package/dist/skills/outlook-365/macos/scripts/bulk-operations.applescript +429 -0
- package/dist/skills/outlook-365/macos/scripts/calendar.applescript +642 -0
- package/dist/skills/outlook-365/macos/scripts/contacts.applescript +635 -0
- package/dist/skills/outlook-365/macos/scripts/helpers.applescript +227 -0
- package/dist/skills/outlook-365/macos/scripts/read-emails.applescript +299 -0
- package/dist/skills/outlook-365/macos/scripts/search-emails.applescript +339 -0
- package/dist/skills/outlook-365/macos/scripts/send-email.applescript +245 -0
- package/dist/skills/outlook-365/uia/BASIC_OPERATIONS.md +278 -0
- package/dist/skills/outlook-365/uia/CALENDAR_OPERATIONS.md +386 -0
- package/dist/skills/outlook-365/uia/COMPOSE_EMAIL.md +426 -0
- package/dist/skills/outlook-365/uia/README.md +75 -0
- package/dist/skills/outlook-365/windows/com/bulk-operations.ps1 +241 -0
- package/dist/skills/outlook-365/windows/com/calendar.ps1 +227 -0
- package/dist/skills/outlook-365/windows/com/contacts.ps1 +270 -0
- package/dist/skills/outlook-365/windows/com/helpers.ps1 +158 -0
- package/dist/skills/outlook-365/windows/com/read-emails.ps1 +115 -0
- package/dist/skills/outlook-365/windows/com/search-emails.ps1 +141 -0
- package/dist/skills/outlook-365/windows/com/send-email.ps1 +121 -0
- package/dist/skills/pdf-architect/SKILL.md +640 -0
- package/dist/skills/powerpoint-architect/SKILL.macos.md +271 -0
- package/dist/skills/powerpoint-architect/SKILL.md +853 -0
- package/dist/skills/powerpoint-architect/SKILL.windows.md +458 -0
- package/dist/skills/powerpoint-architect/custom_themes.md +141 -0
- package/dist/skills/powerpoint-architect/editing-guide.md +424 -0
- package/dist/skills/powerpoint-architect/generator-reference.md +668 -0
- package/dist/skills/powerpoint-architect/images-guide.md +207 -0
- package/dist/skills/powerpoint-architect/issue-fix-mapping.md +768 -0
- package/dist/skills/powerpoint-architect/macos/scripts/add-html-to-slide.applescript +389 -0
- package/dist/skills/powerpoint-architect/macos/scripts/add-slide.applescript +255 -0
- package/dist/skills/powerpoint-architect/macos/scripts/add-speaker-notes.applescript +132 -0
- package/dist/skills/powerpoint-architect/macos/scripts/add-text.applescript +245 -0
- package/dist/skills/powerpoint-architect/macos/scripts/apply-slide-layout.applescript +80 -0
- package/dist/skills/powerpoint-architect/macos/scripts/apply-theme.applescript +122 -0
- package/dist/skills/powerpoint-architect/macos/scripts/autofit-placeholders.applescript +62 -0
- package/dist/skills/powerpoint-architect/macos/scripts/close-presentation.applescript +24 -0
- package/dist/skills/powerpoint-architect/macos/scripts/copy-slides.applescript +303 -0
- package/dist/skills/powerpoint-architect/macos/scripts/create-chart-with-data.applescript +305 -0
- package/dist/skills/powerpoint-architect/macos/scripts/create-with-theme.applescript +56 -0
- package/dist/skills/powerpoint-architect/macos/scripts/delete-slides.applescript +137 -0
- package/dist/skills/powerpoint-architect/macos/scripts/export-presentation.applescript +100 -0
- package/dist/skills/powerpoint-architect/macos/scripts/extract-slide-data.applescript +138 -0
- package/dist/skills/powerpoint-architect/macos/scripts/format-shape.applescript +192 -0
- package/dist/skills/powerpoint-architect/macos/scripts/format-slide-content.applescript +336 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-current-slide-number.applescript +38 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-file-path.applescript +94 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-layout-elements.applescript +141 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-layouts.applescript +58 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-opened-files.applescript +50 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-presentation-info.applescript +150 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-recent-files.applescript +68 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-slide-count.applescript +37 -0
- package/dist/skills/powerpoint-architect/macos/scripts/get-slide-info.applescript +105 -0
- package/dist/skills/powerpoint-architect/macos/scripts/health-check.applescript +690 -0
- package/dist/skills/powerpoint-architect/macos/scripts/insert-shape.applescript +188 -0
- package/dist/skills/powerpoint-architect/macos/scripts/insert-table.applescript +112 -0
- package/dist/skills/powerpoint-architect/macos/scripts/insert-text-box.applescript +225 -0
- package/dist/skills/powerpoint-architect/macos/scripts/manage-image.applescript +486 -0
- package/dist/skills/powerpoint-architect/macos/scripts/maximize-window.applescript +48 -0
- package/dist/skills/powerpoint-architect/macos/scripts/navigate-to-slide.applescript +84 -0
- package/dist/skills/powerpoint-architect/macos/scripts/open-presentation.applescript +38 -0
- package/dist/skills/powerpoint-architect/macos/scripts/reorder-slides.applescript +106 -0
- package/dist/skills/powerpoint-architect/macos/scripts/replace-text.applescript +193 -0
- package/dist/skills/powerpoint-architect/macos/scripts/save-presentation.applescript +54 -0
- package/dist/skills/powerpoint-architect/macos/scripts/set-animation.applescript +203 -0
- package/dist/skills/powerpoint-architect/macos/scripts/set-transition.applescript +130 -0
- package/dist/skills/powerpoint-architect/visual-styling-guide.md +206 -0
- package/dist/skills/powerpoint-architect/windows/api/advanced.md +317 -0
- package/dist/skills/powerpoint-architect/windows/api/basic.md +392 -0
- package/dist/skills/powerpoint-architect/windows/examples/10-slide-presentation.md +140 -0
- package/dist/skills/powerpoint-architect/windows/examples/custom-theme-workflow.md +219 -0
- package/dist/skills/powerpoint-architect/windows/examples/level-1-workflows.md +531 -0
- package/dist/skills/powerpoint-architect/windows/examples/level-2-scripting.md +239 -0
- package/dist/skills/powerpoint-architect/windows/scripts/create-with-theme.ps1 +81 -0
- package/dist/skills/project-task-list/SKILL.md +174 -0
- package/dist/skills/slack-operation/SKILL.md +97 -0
- package/dist/skills/slack-operation/api/advanced-api/GUIDE.md +277 -0
- package/dist/skills/slack-operation/api/search-and-read/EXAMPLE.md +75 -0
- package/dist/skills/slack-operation/api/search-and-read/GUIDE.md +108 -0
- package/dist/skills/slack-operation/api/send-message/EXAMPLE.md +112 -0
- package/dist/skills/slack-operation/api/send-message/GUIDE.md +63 -0
- package/dist/skills/slack-operation/api/share-files/EXAMPLE.md +94 -0
- package/dist/skills/slack-operation/api/share-files/GUIDE.md +63 -0
- package/dist/skills/slack-operation/ui/desktop-automation/GUIDE.md +55 -0
- package/dist/skills/system-diagnostics/SKILL.md +263 -0
- package/dist/skills/teams-operation/SKILL.md +79 -0
- package/dist/skills/teams-operation/api/advanced-api/GUIDE.md +234 -0
- package/dist/skills/teams-operation/api/meetings/EXAMPLE.md +63 -0
- package/dist/skills/teams-operation/api/meetings/GUIDE.md +52 -0
- package/dist/skills/teams-operation/api/search-and-read/EXAMPLE.md +72 -0
- package/dist/skills/teams-operation/api/search-and-read/GUIDE.md +54 -0
- package/dist/skills/teams-operation/api/send-message/EXAMPLE.md +92 -0
- package/dist/skills/teams-operation/api/send-message/GUIDE.md +60 -0
- package/dist/skills/teams-operation/ui/desktop-automation/GUIDE.md +66 -0
- package/dist/skills/transcribe-media/SKILL.md +142 -0
- package/dist/skills/uipath-integrations/SKILL.md +370 -0
- package/dist/skills/uipath-integrations/reference/connectors.md +331 -0
- package/dist/skills/uipath-integrations/reference/endpoints.md +220 -0
- package/dist/skills/uipath-integrations/reference/errors.md +211 -0
- package/dist/skills/uipath-integrations/reference/metadata.md +317 -0
- package/dist/skills/uipath-integrations/reference/operations.md +297 -0
- package/dist/skills/uipath-orchestrator/SKILL.md +312 -0
- package/dist/skills/uipath-orchestrator/recipes/assets.md +282 -0
- package/dist/skills/uipath-orchestrator/recipes/audit-logs.md +215 -0
- package/dist/skills/uipath-orchestrator/recipes/buckets.md +205 -0
- package/dist/skills/uipath-orchestrator/recipes/jobs.md +286 -0
- package/dist/skills/uipath-orchestrator/recipes/list-folders.md +207 -0
- package/dist/skills/uipath-orchestrator/recipes/queue-items.md +292 -0
- package/dist/skills/uipath-orchestrator/recipes/queues.md +232 -0
- package/dist/skills/uipath-orchestrator/recipes/releases.md +212 -0
- package/dist/skills/uipath-orchestrator/recipes/robots-sessions.md +274 -0
- package/dist/skills/uipath-orchestrator/recipes/schedules.md +280 -0
- package/dist/skills/uipath-orchestrator/reference/endpoints.md +85 -0
- package/dist/skills/uipath-orchestrator/reference/schemas.md +153 -0
- package/dist/skills/uipath-taskautomation/SKILL.md +310 -0
- package/dist/skills/uipath-taskautomation/assets/CodedWorkflow.template.cs +98 -0
- package/dist/skills/uipath-taskautomation/assets/ExampleWorkflow.cs +146 -0
- package/dist/skills/uipath-taskautomation/references/action-activity-map.json +32 -0
- package/dist/skills/uipath-taskautomation/references/action-activity-map.md +44 -0
- package/dist/skills/uipath-taskautomation/references/app-profiles.md +63 -0
- package/dist/skills/uipath-taskautomation/references/automation-spec.md +88 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/before-after-hooks-template.md +115 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/codedworkflow-template.md +186 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/helper-utility-template.md +22 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/json-template.md +91 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/assets/testcase-template.md +92 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/cli-reference.md +249 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/codedworkflow-reference.md +275 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/coding-guidelines.md +229 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/inspect-package-guide.md +81 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/integration-service-guide.md +507 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/operations-guide.md +410 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/coded/third-party-packages-guide.md +67 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/data-manipulation-guide.md +110 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/environment-setup.md +194 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/error-handling-guide.md +195 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/powershell-interop-guide.md +57 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/project-structure-guide.md +114 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/project-structure.md +126 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/uia-elements-interaction-guide.md +109 -0
- package/dist/skills/uipath-taskautomation/references/coded-reference/validation-guide.md +147 -0
- package/dist/skills/uipath-taskautomation/references/coded-workflow-authoring.md +219 -0
- package/dist/skills/uipath-taskautomation/references/profiling-output.md +80 -0
- package/dist/skills/uipath-taskautomation/references/reliability-guide.md +83 -0
- package/dist/skills/uipath-taskautomation/references/task-automation-cheatsheet.md +272 -0
- package/dist/skills/uipath-taskautomation/references/template-preflight.md +17 -0
- package/dist/skills/uipath-workflow-documenter/SKILL.md +430 -0
- package/dist/skills/uipath-workflow-documenter/layouts/pdd-template.md +265 -0
- package/dist/skills/uipath-workflow-documenter/routines/from-orchestrator.md +11 -0
- package/dist/skills/uipath-workflow-documenter/routines/from-workflow.md +11 -0
- package/dist/skills/word-architect/SKILL.macos.md +147 -0
- package/dist/skills/word-architect/SKILL.md +502 -0
- package/dist/skills/word-architect/SKILL.windows.md +55 -0
- package/dist/skills/word-architect/api/advanced.md +522 -0
- package/dist/skills/word-architect/api/basic.md +378 -0
- package/dist/skills/word-architect/api/expert.md +302 -0
- package/dist/skills/word-architect/generation.md +308 -0
- package/dist/skills/word-architect/layouts/01-professional.md +168 -0
- package/dist/skills/word-architect/layouts/02-educational-kids.md +354 -0
- package/dist/skills/word-architect/layouts/03-academic.md +83 -0
- package/dist/skills/word-architect/layouts/04-creative.md +242 -0
- package/dist/skills/word-architect/layouts/05-operational.md +94 -0
- package/dist/skills/word-architect/macos/scripts/apply-heading-style.applescript +215 -0
- package/dist/skills/word-architect/macos/scripts/apply-style.applescript +272 -0
- package/dist/skills/word-architect/macos/scripts/autofit-tables.applescript +53 -0
- package/dist/skills/word-architect/macos/scripts/close-document.applescript +287 -0
- package/dist/skills/word-architect/macos/scripts/create-chart-with-data.applescript +379 -0
- package/dist/skills/word-architect/macos/scripts/create-chart.applescript +191 -0
- package/dist/skills/word-architect/macos/scripts/delete-selection.applescript +223 -0
- package/dist/skills/word-architect/macos/scripts/export-document.applescript +167 -0
- package/dist/skills/word-architect/macos/scripts/extract-table.applescript +168 -0
- package/dist/skills/word-architect/macos/scripts/find-by-style.applescript +173 -0
- package/dist/skills/word-architect/macos/scripts/find-text.applescript +199 -0
- package/dist/skills/word-architect/macos/scripts/format-table.applescript +234 -0
- package/dist/skills/word-architect/macos/scripts/format-text.applescript +431 -0
- package/dist/skills/word-architect/macos/scripts/get-document-properties.applescript +95 -0
- package/dist/skills/word-architect/macos/scripts/get-document-structure.applescript +371 -0
- package/dist/skills/word-architect/macos/scripts/get-header-footer-text.applescript +106 -0
- package/dist/skills/word-architect/macos/scripts/get-images.applescript +166 -0
- package/dist/skills/word-architect/macos/scripts/get-opened-files.applescript +103 -0
- package/dist/skills/word-architect/macos/scripts/get-paragraph-bounds.applescript +133 -0
- package/dist/skills/word-architect/macos/scripts/get-paragraph-format.applescript +134 -0
- package/dist/skills/word-architect/macos/scripts/get-recent-files.applescript +82 -0
- package/dist/skills/word-architect/macos/scripts/get-styled-text.applescript +256 -0
- package/dist/skills/word-architect/macos/scripts/get-tables.applescript +126 -0
- package/dist/skills/word-architect/macos/scripts/get-text-formatting.applescript +224 -0
- package/dist/skills/word-architect/macos/scripts/get-text.applescript +383 -0
- package/dist/skills/word-architect/macos/scripts/get-theme-colors.applescript +123 -0
- package/dist/skills/word-architect/macos/scripts/health-check.applescript +606 -0
- package/dist/skills/word-architect/macos/scripts/insert-cover-page.applescript +77 -0
- package/dist/skills/word-architect/macos/scripts/insert-header-footer.applescript +87 -0
- package/dist/skills/word-architect/macos/scripts/insert-horizontal-line.applescript +112 -0
- package/dist/skills/word-architect/macos/scripts/insert-html.applescript +440 -0
- package/dist/skills/word-architect/macos/scripts/insert-hyperlink.applescript +191 -0
- package/dist/skills/word-architect/macos/scripts/insert-image.applescript +320 -0
- package/dist/skills/word-architect/macos/scripts/insert-list.applescript +317 -0
- package/dist/skills/word-architect/macos/scripts/insert-pagebreak.applescript +181 -0
- package/dist/skills/word-architect/macos/scripts/insert-smartart.applescript +104 -0
- package/dist/skills/word-architect/macos/scripts/insert-table.applescript +238 -0
- package/dist/skills/word-architect/macos/scripts/insert-text.applescript +677 -0
- package/dist/skills/word-architect/macos/scripts/insert-textbox.applescript +261 -0
- package/dist/skills/word-architect/macos/scripts/maximize-window.applescript +67 -0
- package/dist/skills/word-architect/macos/scripts/normalize-formatting.applescript +56 -0
- package/dist/skills/word-architect/macos/scripts/open-document.applescript +222 -0
- package/dist/skills/word-architect/macos/scripts/replace-text.applescript +390 -0
- package/dist/skills/word-architect/macos/scripts/save-document.applescript +230 -0
- package/dist/skills/word-architect/macos/scripts/select-range.applescript +142 -0
- package/dist/skills/word-architect/macos/scripts/set-document-properties.applescript +195 -0
- package/dist/skills/word-architect/macos/scripts/set-page-layout.applescript +273 -0
- package/dist/skills/word-architect/macos/scripts/set-theme-colors.applescript +264 -0
- package/dist/skills/word-architect/macos/scripts/undo-redo.applescript +61 -0
- package/dist/skills/word-architect/macos/scripts/update-toc.applescript +112 -0
- package/dist/skills/word-architect/reference/formatting.md +119 -0
- package/dist/skills/word-architect/reference/html-layouts/01-executive-summary-box.md +36 -0
- package/dist/skills/word-architect/reference/html-layouts/02-kpi-summary-table.md +68 -0
- package/dist/skills/word-architect/reference/html-layouts/03-comparison-table.md +63 -0
- package/dist/skills/word-architect/reference/html-layouts/04-pros-cons-table.md +86 -0
- package/dist/skills/word-architect/reference/html-layouts/05-timeline-table.md +114 -0
- package/dist/skills/word-architect/reference/html-layouts/06-raci-matrix.md +95 -0
- package/dist/skills/word-architect/reference/html-layouts/07-data-table-alternating.md +84 -0
- package/dist/skills/word-architect/reference/html-layouts/08-callout-box.md +102 -0
- package/dist/skills/word-architect/reference/html-layouts/09-vertical-milestone.md +100 -0
- package/dist/skills/word-architect/reference/quality-assurance.md +102 -0
- package/dist/skills/word-architect/reference/tables.md +62 -0
- package/dist/skills/word-architect/reference/tracked-changes.md +34 -0
- package/dist/skills/word-architect/reference/uia-fallback.md +231 -0
- package/dist/skills/word-architect/reference/visual-elements.md +82 -0
- package/dist/skills/word-architect/windows/scripts/apply-heading-style.ps1 +190 -0
- package/dist/skills/word-architect/windows/scripts/autofit-tables.ps1 +64 -0
- package/dist/skills/word-architect/windows/scripts/create-chart-with-data.ps1 +133 -0
- package/dist/skills/word-architect/windows/scripts/create-chart.ps1 +73 -0
- package/dist/skills/word-architect/windows/scripts/export-document.ps1 +86 -0
- package/dist/skills/word-architect/windows/scripts/get-current-file.ps1 +27 -0
- package/dist/skills/word-architect/windows/scripts/insert-cover-page.ps1 +79 -0
- package/dist/skills/word-architect/windows/scripts/insert-horizontal-line.ps1 +74 -0
- package/dist/skills/word-architect/windows/scripts/insert-image.ps1 +98 -0
- package/dist/skills/word-architect/windows/scripts/insert-smartart.ps1 +118 -0
- package/dist/skills/word-architect/windows/scripts/insert-text-box.ps1 +90 -0
- package/dist/skills/word-architect/windows/scripts/normalize-formatting.ps1 +63 -0
- package/package.json +5 -4
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
#!/usr/bin/osascript
|
|
2
|
+
(*
|
|
3
|
+
* Insert Text Box in Word (Native AppleScript API)
|
|
4
|
+
* Creates a text box shape at a specified position with configurable dimensions,
|
|
5
|
+
* text content, border, background, and alignment.
|
|
6
|
+
*
|
|
7
|
+
* Usage: osascript insert-textbox.applescript <filePath> <argsJson>
|
|
8
|
+
*
|
|
9
|
+
* Parameters:
|
|
10
|
+
* filePath - The full POSIX path of the document
|
|
11
|
+
* argsJson - JSON string with text box properties:
|
|
12
|
+
* text - Text content to place inside the text box
|
|
13
|
+
* position - Character position (0-based) or "end" (default: "end")
|
|
14
|
+
* width - Width in points (default: 200)
|
|
15
|
+
* height - Height in points (default: 100)
|
|
16
|
+
* borderColorHex - Border color as hex string without # (e.g. "0000FF")
|
|
17
|
+
* borderWidth - Border width in points (default: 1)
|
|
18
|
+
* backgroundColorHex - Background fill color as hex string without #
|
|
19
|
+
* alignment - Text alignment: "Left", "Center", "Right", "Justify"
|
|
20
|
+
* rotation - Rotation angle in degrees (default: 0)
|
|
21
|
+
*
|
|
22
|
+
* Examples:
|
|
23
|
+
* osascript insert-textbox.applescript "/Users/me/doc.docx" '{"text":"Hello World","width":300,"height":150}'
|
|
24
|
+
* osascript insert-textbox.applescript "/Users/me/doc.docx" '{"text":"Note","borderColorHex":"FF0000","backgroundColorHex":"FFFFCC"}'
|
|
25
|
+
*
|
|
26
|
+
* Output:
|
|
27
|
+
* {"success":true,"message":"Text box inserted","shapeName":"..."}
|
|
28
|
+
*
|
|
29
|
+
* Note: Word must be open with an active document.
|
|
30
|
+
* Creates a text box via native AppleScript Word API calls.
|
|
31
|
+
*)
|
|
32
|
+
|
|
33
|
+
on run argv
|
|
34
|
+
if (count of argv) < 2 then
|
|
35
|
+
return "Error: Usage: osascript insert-textbox.applescript <filePath> <argsJson>"
|
|
36
|
+
end if
|
|
37
|
+
|
|
38
|
+
set filePath to item 1 of argv as string
|
|
39
|
+
set argsJson to item 2 of argv as string
|
|
40
|
+
|
|
41
|
+
-- Parse JSON arguments
|
|
42
|
+
set textVal to my extractJsonValue(argsJson, "text")
|
|
43
|
+
set positionVal to my extractJsonValue(argsJson, "position")
|
|
44
|
+
set widthVal to my extractJsonValue(argsJson, "width")
|
|
45
|
+
set heightVal to my extractJsonValue(argsJson, "height")
|
|
46
|
+
set borderColorVal to my extractJsonValue(argsJson, "borderColorHex")
|
|
47
|
+
set borderWidthVal to my extractJsonValue(argsJson, "borderWidth")
|
|
48
|
+
set bgColorVal to my extractJsonValue(argsJson, "backgroundColorHex")
|
|
49
|
+
set alignmentVal to my extractJsonValue(argsJson, "alignment")
|
|
50
|
+
set rotationVal to my extractJsonValue(argsJson, "rotation")
|
|
51
|
+
|
|
52
|
+
-- Defaults
|
|
53
|
+
set boxWidth to 200
|
|
54
|
+
set boxHeight to 100
|
|
55
|
+
set boxBorderWidth to 1.0
|
|
56
|
+
set boxRotation to 0
|
|
57
|
+
set boxLeft to 72
|
|
58
|
+
set boxTop to 72
|
|
59
|
+
|
|
60
|
+
if widthVal is not "" then
|
|
61
|
+
try
|
|
62
|
+
set boxWidth to widthVal as real
|
|
63
|
+
end try
|
|
64
|
+
end if
|
|
65
|
+
if heightVal is not "" then
|
|
66
|
+
try
|
|
67
|
+
set boxHeight to heightVal as real
|
|
68
|
+
end try
|
|
69
|
+
end if
|
|
70
|
+
if borderWidthVal is not "" then
|
|
71
|
+
try
|
|
72
|
+
set boxBorderWidth to borderWidthVal as real
|
|
73
|
+
end try
|
|
74
|
+
end if
|
|
75
|
+
if rotationVal is not "" then
|
|
76
|
+
try
|
|
77
|
+
set boxRotation to rotationVal as real
|
|
78
|
+
end try
|
|
79
|
+
end if
|
|
80
|
+
|
|
81
|
+
tell application "Microsoft Word"
|
|
82
|
+
if not (exists active document) then
|
|
83
|
+
return "Error: No document is open in Word."
|
|
84
|
+
end if
|
|
85
|
+
|
|
86
|
+
try
|
|
87
|
+
set doc to active document
|
|
88
|
+
|
|
89
|
+
-- Move selection to position first if specified
|
|
90
|
+
if positionVal is not "" and positionVal is not "end" then
|
|
91
|
+
try
|
|
92
|
+
set posIdx to (positionVal as integer) + 1
|
|
93
|
+
set selRange to create range doc start posIdx end posIdx
|
|
94
|
+
select selRange
|
|
95
|
+
end try
|
|
96
|
+
end if
|
|
97
|
+
|
|
98
|
+
-- Record shape count before insertion
|
|
99
|
+
set shapeCountBefore to count of shapes of doc
|
|
100
|
+
|
|
101
|
+
-- Create the text box shape using native AppleScript API
|
|
102
|
+
set newShape to make new shape at doc with properties {shape type:text box, left position:boxLeft, top:boxTop, width:boxWidth, height:boxHeight}
|
|
103
|
+
|
|
104
|
+
-- Set text content via JXA (set content fails in on run argv context)
|
|
105
|
+
if textVal is not "" then
|
|
106
|
+
try
|
|
107
|
+
set shapeName to name of newShape
|
|
108
|
+
set jxaScript to "var word = Application('Microsoft Word'); var doc = word.activeDocument(); var s = doc.shapes.whose({name:'" & shapeName & "'})[0]; s.textFrame.textRange.content = " & my toJSString(textVal) & ";"
|
|
109
|
+
do shell script "osascript -l JavaScript -e " & quoted form of jxaScript
|
|
110
|
+
on error
|
|
111
|
+
-- Fallback: try direct AppleScript approach with delay
|
|
112
|
+
try
|
|
113
|
+
delay 0.3
|
|
114
|
+
set tfRange to text object of text frame of newShape
|
|
115
|
+
set content of tfRange to textVal
|
|
116
|
+
end try
|
|
117
|
+
end try
|
|
118
|
+
end if
|
|
119
|
+
|
|
120
|
+
-- Set text alignment via JXA (avoids stale reference issue)
|
|
121
|
+
if alignmentVal is not "" then
|
|
122
|
+
set shapeName to name of newShape
|
|
123
|
+
-- Word JXA alignment constants: 0=Left, 1=Center, 2=Right, 3=Justify
|
|
124
|
+
set alignNum to 0
|
|
125
|
+
if alignmentVal is "Center" or alignmentVal is "center" then
|
|
126
|
+
set alignNum to 1
|
|
127
|
+
else if alignmentVal is "Right" or alignmentVal is "right" then
|
|
128
|
+
set alignNum to 2
|
|
129
|
+
else if alignmentVal is "Justify" or alignmentVal is "justify" then
|
|
130
|
+
set alignNum to 3
|
|
131
|
+
end if
|
|
132
|
+
try
|
|
133
|
+
set jxaScript to "var word = Application('Microsoft Word'); var doc = word.activeDocument(); var s = doc.shapes.whose({name:'" & shapeName & "'})[0]; s.textFrame.textRange.paragraphFormat.alignment = " & alignNum & ";"
|
|
134
|
+
do shell script "osascript -l JavaScript -e " & quoted form of jxaScript
|
|
135
|
+
end try
|
|
136
|
+
end if
|
|
137
|
+
|
|
138
|
+
-- Set rotation
|
|
139
|
+
if boxRotation is not 0 then
|
|
140
|
+
set rotation of newShape to boxRotation
|
|
141
|
+
end if
|
|
142
|
+
|
|
143
|
+
-- Set border and background colors via JXA (AppleScript color API is unreliable for shapes)
|
|
144
|
+
set shapeName to name of newShape
|
|
145
|
+
if borderColorVal is not "" then
|
|
146
|
+
set rgbVals to my hexToRGB(borderColorVal)
|
|
147
|
+
set borderColorLong to (item 1 of rgbVals) + ((item 2 of rgbVals) * 256) + ((item 3 of rgbVals) * 65536)
|
|
148
|
+
try
|
|
149
|
+
set jxaScript to "var word = Application('Microsoft Word'); var doc = word.activeDocument(); var s = doc.shapes.whose({name:'" & shapeName & "'})[0]; s.lineFormat.visible = true; s.lineFormat.foreColor.color = " & borderColorLong & "; s.lineFormat.weight = " & boxBorderWidth & ";"
|
|
150
|
+
do shell script "osascript -l JavaScript -e " & quoted form of jxaScript
|
|
151
|
+
end try
|
|
152
|
+
end if
|
|
153
|
+
|
|
154
|
+
if bgColorVal is not "" then
|
|
155
|
+
set rgbVals to my hexToRGB(bgColorVal)
|
|
156
|
+
set bgColorLong to (item 1 of rgbVals) + ((item 2 of rgbVals) * 256) + ((item 3 of rgbVals) * 65536)
|
|
157
|
+
try
|
|
158
|
+
set jxaScript to "var word = Application('Microsoft Word'); var doc = word.activeDocument(); var s = doc.shapes.whose({name:'" & shapeName & "'})[0]; s.fillFormat.visible = true; s.fillFormat.foreColor.color = " & bgColorLong & ";"
|
|
159
|
+
do shell script "osascript -l JavaScript -e " & quoted form of jxaScript
|
|
160
|
+
end try
|
|
161
|
+
end if
|
|
162
|
+
|
|
163
|
+
-- Get the name of the newly created shape
|
|
164
|
+
set shapeName to name of newShape
|
|
165
|
+
return "{\"success\":true,\"message\":\"Text box inserted\",\"shapeName\":\"" & my escapeJSONString(shapeName) & "\"}"
|
|
166
|
+
|
|
167
|
+
on error errMsg
|
|
168
|
+
return "Error: Failed to insert text box: " & errMsg
|
|
169
|
+
end try
|
|
170
|
+
end tell
|
|
171
|
+
end run
|
|
172
|
+
|
|
173
|
+
-- Convert text to a JavaScript string literal
|
|
174
|
+
on toJSString(theText)
|
|
175
|
+
set theText to my replaceText(theText, "\\", "\\\\")
|
|
176
|
+
set theText to my replaceText(theText, "'", "\\'")
|
|
177
|
+
set theText to my replaceText(theText, "\"", "\\\"")
|
|
178
|
+
set theText to my replaceText(theText, return, "\\n")
|
|
179
|
+
set theText to my replaceText(theText, linefeed, "\\n")
|
|
180
|
+
return "'" & theText & "'"
|
|
181
|
+
end toJSString
|
|
182
|
+
|
|
183
|
+
-- Extract a value from a simple JSON string by key name
|
|
184
|
+
on extractJsonValue(jsonStr, keyName)
|
|
185
|
+
set AppleScript's text item delimiters to "\"" & keyName & "\":"
|
|
186
|
+
if (count of text items of jsonStr) < 2 then
|
|
187
|
+
set AppleScript's text item delimiters to ""
|
|
188
|
+
return ""
|
|
189
|
+
end if
|
|
190
|
+
set afterKey to text item 2 of jsonStr
|
|
191
|
+
set AppleScript's text item delimiters to ""
|
|
192
|
+
|
|
193
|
+
-- Trim leading spaces before checking value type
|
|
194
|
+
set trimmedAfter to my trimLeadingSpaces(afterKey)
|
|
195
|
+
if trimmedAfter starts with "\"" then
|
|
196
|
+
set AppleScript's text item delimiters to "\""
|
|
197
|
+
set parts to text items of trimmedAfter
|
|
198
|
+
set AppleScript's text item delimiters to ""
|
|
199
|
+
if (count of parts) >= 3 then
|
|
200
|
+
return item 2 of parts
|
|
201
|
+
end if
|
|
202
|
+
return ""
|
|
203
|
+
end if
|
|
204
|
+
set AppleScript's text item delimiters to {",", "}"}
|
|
205
|
+
set val to text item 1 of trimmedAfter
|
|
206
|
+
set AppleScript's text item delimiters to ""
|
|
207
|
+
return my trimLeadingSpaces(val)
|
|
208
|
+
end extractJsonValue
|
|
209
|
+
|
|
210
|
+
-- Escape special characters for JSON strings
|
|
211
|
+
on escapeJSONString(theText)
|
|
212
|
+
set theText to my replaceText(theText, "\\", "\\\\")
|
|
213
|
+
set theText to my replaceText(theText, "\"", "\\\"")
|
|
214
|
+
set theText to my replaceText(theText, return, "\\n")
|
|
215
|
+
set theText to my replaceText(theText, linefeed, "\\n")
|
|
216
|
+
set theText to my replaceText(theText, tab, "\\t")
|
|
217
|
+
return theText
|
|
218
|
+
end escapeJSONString
|
|
219
|
+
|
|
220
|
+
-- Replace all occurrences of searchStr with replaceStr in theText
|
|
221
|
+
on replaceText(theText, searchStr, replaceStr)
|
|
222
|
+
set AppleScript's text item delimiters to searchStr
|
|
223
|
+
set theItems to text items of theText
|
|
224
|
+
set AppleScript's text item delimiters to replaceStr
|
|
225
|
+
set theText to theItems as string
|
|
226
|
+
set AppleScript's text item delimiters to ""
|
|
227
|
+
return theText
|
|
228
|
+
end replaceText
|
|
229
|
+
|
|
230
|
+
-- Convert hex color string to RGB list {r, g, b}
|
|
231
|
+
on hexToRGB(hexStr)
|
|
232
|
+
set r to hexToDec(text 1 thru 2 of hexStr)
|
|
233
|
+
set g to hexToDec(text 3 thru 4 of hexStr)
|
|
234
|
+
set b to hexToDec(text 5 thru 6 of hexStr)
|
|
235
|
+
return {r, g, b}
|
|
236
|
+
end hexToRGB
|
|
237
|
+
|
|
238
|
+
on hexToDec(hexPair)
|
|
239
|
+
set upper to "0123456789ABCDEF"
|
|
240
|
+
set c1 to character 1 of hexPair
|
|
241
|
+
set c2 to character 2 of hexPair
|
|
242
|
+
-- Normalize to uppercase
|
|
243
|
+
set p1 to offset of c1 in upper
|
|
244
|
+
if p1 = 0 then set p1 to offset of c1 in "0123456789abcdef"
|
|
245
|
+
set p2 to offset of c2 in upper
|
|
246
|
+
if p2 = 0 then set p2 to offset of c2 in "0123456789abcdef"
|
|
247
|
+
return (p1 - 1) * 16 + (p2 - 1)
|
|
248
|
+
end hexToDec
|
|
249
|
+
|
|
250
|
+
-- Trim leading spaces
|
|
251
|
+
on trimLeadingSpaces(txt)
|
|
252
|
+
set t to txt
|
|
253
|
+
repeat while t starts with " " or t starts with tab
|
|
254
|
+
if (count of t) > 1 then
|
|
255
|
+
set t to text 2 thru -1 of t
|
|
256
|
+
else
|
|
257
|
+
return ""
|
|
258
|
+
end if
|
|
259
|
+
end repeat
|
|
260
|
+
return t
|
|
261
|
+
end trimLeadingSpaces
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/osascript
|
|
2
|
+
(*
|
|
3
|
+
* Maximize Word Window
|
|
4
|
+
* Maximizes the Word window to fill the screen (without entering full screen mode).
|
|
5
|
+
* Sets window bounds to match the visible screen area.
|
|
6
|
+
*
|
|
7
|
+
* Usage: osascript maximize-window.applescript
|
|
8
|
+
*
|
|
9
|
+
* Note: Word must be open with a document.
|
|
10
|
+
*)
|
|
11
|
+
|
|
12
|
+
on run argv
|
|
13
|
+
tell application "Microsoft Word"
|
|
14
|
+
if not (exists active document) then
|
|
15
|
+
return "{\"success\":false,\"error\":\"No document is open in Word\"}"
|
|
16
|
+
end if
|
|
17
|
+
end tell
|
|
18
|
+
|
|
19
|
+
-- Maximize by setting window bounds to screen size (not full screen)
|
|
20
|
+
try
|
|
21
|
+
tell application "Finder"
|
|
22
|
+
set screenBounds to bounds of window of desktop
|
|
23
|
+
set screenWidth to item 3 of screenBounds
|
|
24
|
+
set screenHeight to item 4 of screenBounds
|
|
25
|
+
end tell
|
|
26
|
+
|
|
27
|
+
-- Account for menu bar (approximately 25 pixels)
|
|
28
|
+
set topMargin to 25
|
|
29
|
+
set bottomMargin to 0
|
|
30
|
+
|
|
31
|
+
tell application "System Events"
|
|
32
|
+
tell process "Microsoft Word"
|
|
33
|
+
set frontWindow to window 1
|
|
34
|
+
if exists frontWindow then
|
|
35
|
+
-- Set position to top-left (after menu bar)
|
|
36
|
+
set position of frontWindow to {0, topMargin}
|
|
37
|
+
-- Set size to fill screen
|
|
38
|
+
set size of frontWindow to {screenWidth, screenHeight - topMargin - bottomMargin}
|
|
39
|
+
end if
|
|
40
|
+
end tell
|
|
41
|
+
end tell
|
|
42
|
+
|
|
43
|
+
return "{\"success\":true,\"method\":\"bounds\"}"
|
|
44
|
+
on error errMsg
|
|
45
|
+
return "{\"success\":false,\"error\":\"" & my escapeJSONString(errMsg) & "\"}"
|
|
46
|
+
end try
|
|
47
|
+
end run
|
|
48
|
+
|
|
49
|
+
-- Escape special characters for JSON strings
|
|
50
|
+
on escapeJSONString(theText)
|
|
51
|
+
set theText to my replaceText(theText, "\\", "\\\\")
|
|
52
|
+
set theText to my replaceText(theText, "\"", "\\\"")
|
|
53
|
+
set theText to my replaceText(theText, return, "\\n")
|
|
54
|
+
set theText to my replaceText(theText, linefeed, "\\n")
|
|
55
|
+
set theText to my replaceText(theText, tab, "\\t")
|
|
56
|
+
return theText
|
|
57
|
+
end escapeJSONString
|
|
58
|
+
|
|
59
|
+
-- Replace all occurrences of searchStr with replaceStr
|
|
60
|
+
on replaceText(theText, searchStr, replaceStr)
|
|
61
|
+
set AppleScript's text item delimiters to searchStr
|
|
62
|
+
set theItems to text items of theText
|
|
63
|
+
set AppleScript's text item delimiters to replaceStr
|
|
64
|
+
set theText to theItems as string
|
|
65
|
+
set AppleScript's text item delimiters to ""
|
|
66
|
+
return theText
|
|
67
|
+
end replaceText
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/osascript
|
|
2
|
+
(*
|
|
3
|
+
* Normalize Formatting in Word
|
|
4
|
+
* Applies consistent font and spacing to the entire document or selection.
|
|
5
|
+
*
|
|
6
|
+
* Usage: osascript normalize-formatting.applescript [scope] [--font="Font Name"]
|
|
7
|
+
*
|
|
8
|
+
* Scope:
|
|
9
|
+
* all - Entire document (default)
|
|
10
|
+
* selection - Current selection only
|
|
11
|
+
*
|
|
12
|
+
* Options:
|
|
13
|
+
* --font="Font Name" - Font to use (default: Aptos)
|
|
14
|
+
*
|
|
15
|
+
* Note: Word must be open with an active document.
|
|
16
|
+
*)
|
|
17
|
+
|
|
18
|
+
on run argv
|
|
19
|
+
set targetScope to "all"
|
|
20
|
+
set fontName to "Aptos"
|
|
21
|
+
|
|
22
|
+
-- Parse arguments
|
|
23
|
+
repeat with arg in argv
|
|
24
|
+
set argStr to arg as string
|
|
25
|
+
if argStr starts with "--font=" then
|
|
26
|
+
set fontName to text 8 thru -1 of argStr
|
|
27
|
+
else if argStr is "selection" or argStr is "all" then
|
|
28
|
+
set targetScope to argStr
|
|
29
|
+
end if
|
|
30
|
+
end repeat
|
|
31
|
+
|
|
32
|
+
tell application "Microsoft Word"
|
|
33
|
+
if not (exists active document) then
|
|
34
|
+
return "Error: No document is open in Word."
|
|
35
|
+
end if
|
|
36
|
+
|
|
37
|
+
set doc to active document
|
|
38
|
+
|
|
39
|
+
if targetScope is "all" then
|
|
40
|
+
set targetRange to text object of doc
|
|
41
|
+
else
|
|
42
|
+
set targetRange to text object of selection
|
|
43
|
+
end if
|
|
44
|
+
|
|
45
|
+
-- Apply font to the text range
|
|
46
|
+
set name of font object of targetRange to fontName
|
|
47
|
+
|
|
48
|
+
-- Apply consistent paragraph spacing via paragraph format
|
|
49
|
+
set pf to paragraph format of targetRange
|
|
50
|
+
set space before of pf to 0
|
|
51
|
+
set space after of pf to 8
|
|
52
|
+
set line spacing rule of pf to line space single
|
|
53
|
+
|
|
54
|
+
return "Applied " & fontName & " font and normalized spacing to " & targetScope
|
|
55
|
+
end tell
|
|
56
|
+
end run
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
#!/usr/bin/osascript
|
|
2
|
+
use framework "Foundation"
|
|
3
|
+
use scripting additions
|
|
4
|
+
|
|
5
|
+
(*
|
|
6
|
+
* Open or Create Word Document
|
|
7
|
+
* Opens an existing Word document or creates a new one at the specified path.
|
|
8
|
+
*
|
|
9
|
+
* Usage: osascript open-document.applescript <filePath> <createNew>
|
|
10
|
+
*
|
|
11
|
+
* Parameters:
|
|
12
|
+
* filePath - The full POSIX path to the Word document
|
|
13
|
+
* createNew - "true" to create a new document, "false" to open existing
|
|
14
|
+
*
|
|
15
|
+
* Examples:
|
|
16
|
+
* osascript open-document.applescript "/Users/me/Documents/report.docx" "false"
|
|
17
|
+
* osascript open-document.applescript "/Users/me/Documents/new-report.docx" "true"
|
|
18
|
+
*
|
|
19
|
+
* Output:
|
|
20
|
+
* {"success":true,"filePath":"/Users/me/Documents/report.docx","documentName":"report.docx","pageCount":3,"wordCount":1500,"paragraphCount":25,"characterCount":8500}
|
|
21
|
+
*
|
|
22
|
+
* Note: Word must be running or will be launched automatically.
|
|
23
|
+
* When createNew is "true", the file must not already exist.
|
|
24
|
+
*)
|
|
25
|
+
|
|
26
|
+
on run argv
|
|
27
|
+
if (count of argv) < 2 then
|
|
28
|
+
return "Error: Please specify a file path and createNew flag. Usage: osascript open-document.applescript <filePath> <createNew>
|
|
29
|
+
Examples:
|
|
30
|
+
osascript open-document.applescript \"/Users/me/Documents/report.docx\" \"false\"
|
|
31
|
+
osascript open-document.applescript \"/Users/me/Documents/new-report.docx\" \"true\""
|
|
32
|
+
end if
|
|
33
|
+
|
|
34
|
+
set filePath to item 1 of argv as string
|
|
35
|
+
set createNew to item 2 of argv as string
|
|
36
|
+
|
|
37
|
+
if createNew is "true" then
|
|
38
|
+
-- Check that the file does NOT already exist
|
|
39
|
+
try
|
|
40
|
+
set fileRef to POSIX file filePath
|
|
41
|
+
-- Existence probe: the coercion throws into the surrounding on error handler.
|
|
42
|
+
fileRef as alias
|
|
43
|
+
-- If we get here, file exists - fail
|
|
44
|
+
return "Error: File already exists at path: " & filePath
|
|
45
|
+
on error
|
|
46
|
+
-- File does not exist, which is what we want
|
|
47
|
+
end try
|
|
48
|
+
|
|
49
|
+
-- Parent-directory existence is checked by WordMacOsExecutor before this script runs.
|
|
50
|
+
|
|
51
|
+
-- Activate Word and wait for it to be ready
|
|
52
|
+
tell application "Microsoft Word" to activate
|
|
53
|
+
delay 2
|
|
54
|
+
|
|
55
|
+
-- Create a new document
|
|
56
|
+
try
|
|
57
|
+
tell application "Microsoft Word" to set targetDoc to make new document
|
|
58
|
+
on error errMsg
|
|
59
|
+
return "Error: Failed to create document: " & errMsg
|
|
60
|
+
end try
|
|
61
|
+
delay 1
|
|
62
|
+
|
|
63
|
+
-- Save it to the specified path
|
|
64
|
+
set hfsPath to POSIX file filePath as text
|
|
65
|
+
try
|
|
66
|
+
tell application "Microsoft Word" to save as targetDoc file name hfsPath file format format document
|
|
67
|
+
on error errMsg
|
|
68
|
+
return "Error: Failed to save new document: " & errMsg
|
|
69
|
+
end try
|
|
70
|
+
delay 0.5
|
|
71
|
+
|
|
72
|
+
-- Collect document statistics
|
|
73
|
+
try
|
|
74
|
+
tell application "Microsoft Word"
|
|
75
|
+
set docName to name of targetDoc
|
|
76
|
+
|
|
77
|
+
set wCount to count of words of targetDoc
|
|
78
|
+
set pCount to count of paragraphs of targetDoc
|
|
79
|
+
set cCount to count of characters of targetDoc
|
|
80
|
+
set pgCount to count of pages of targetDoc
|
|
81
|
+
|
|
82
|
+
return "{\"success\":true,\"filePath\":\"" & my escapeJSONString(filePath) & "\",\"documentName\":\"" & my escapeJSONString(docName) & "\",\"pageCount\":" & pgCount & ",\"wordCount\":" & wCount & ",\"paragraphCount\":" & pCount & ",\"characterCount\":" & cCount & "}"
|
|
83
|
+
end tell
|
|
84
|
+
on error errMsg
|
|
85
|
+
return "Error: Failed to get document info: " & errMsg
|
|
86
|
+
end try
|
|
87
|
+
else
|
|
88
|
+
-- Open existing file
|
|
89
|
+
try
|
|
90
|
+
set fileRef to POSIX file filePath
|
|
91
|
+
-- Existence probe: the coercion throws into the surrounding on error handler.
|
|
92
|
+
fileRef as alias
|
|
93
|
+
on error
|
|
94
|
+
return "Error: File not found at path: " & filePath
|
|
95
|
+
end try
|
|
96
|
+
|
|
97
|
+
-- DELEGATE_RESTRICTED_WORD_OMIT_BEGIN
|
|
98
|
+
-- Launch a background watcher BEFORE opening the document.
|
|
99
|
+
-- Word's "open" command blocks when a modal dialog appears
|
|
100
|
+
-- ("This document contains fields that may refer to other files...").
|
|
101
|
+
-- The background process polls for that specific dialog and clicks "Yes".
|
|
102
|
+
-- Only matches dialogs containing "fields" to avoid auto-approving unrelated prompts.
|
|
103
|
+
do shell script "osascript -e '
|
|
104
|
+
delay 1
|
|
105
|
+
tell application \"System Events\"
|
|
106
|
+
tell process \"Microsoft Word\"
|
|
107
|
+
repeat 20 times
|
|
108
|
+
try
|
|
109
|
+
if exists (sheet 1 of window 1) then
|
|
110
|
+
set sheetDesc to description of sheet 1 of window 1
|
|
111
|
+
-- Only click Yes for the update-fields dialog
|
|
112
|
+
if sheetDesc contains \"field\" then
|
|
113
|
+
click button \"Yes\" of sheet 1 of window 1
|
|
114
|
+
return
|
|
115
|
+
end if
|
|
116
|
+
end if
|
|
117
|
+
end try
|
|
118
|
+
try
|
|
119
|
+
-- Fallback: standalone dialog window with static text
|
|
120
|
+
set allText to value of every static text of window 1
|
|
121
|
+
set joined to allText as text
|
|
122
|
+
if joined contains \"field\" then
|
|
123
|
+
if exists (button \"Yes\" of window 1) then
|
|
124
|
+
click button \"Yes\" of window 1
|
|
125
|
+
return
|
|
126
|
+
end if
|
|
127
|
+
end if
|
|
128
|
+
end try
|
|
129
|
+
delay 0.5
|
|
130
|
+
end repeat
|
|
131
|
+
end tell
|
|
132
|
+
end tell
|
|
133
|
+
' &> /dev/null &"
|
|
134
|
+
-- DELEGATE_RESTRICTED_WORD_OMIT_END
|
|
135
|
+
|
|
136
|
+
tell application "Microsoft Word"
|
|
137
|
+
activate
|
|
138
|
+
delay 1
|
|
139
|
+
|
|
140
|
+
try
|
|
141
|
+
open fileRef
|
|
142
|
+
delay 1
|
|
143
|
+
|
|
144
|
+
-- DELEGATE_RESTRICTED_WORD_OMIT_BEGIN
|
|
145
|
+
-- Word document-object statistics can block indefinitely after a
|
|
146
|
+
-- Compatibility Mode file is visibly open. The alias above is
|
|
147
|
+
-- already resolved and the exact named Word window is present,
|
|
148
|
+
-- so return a bounded minimal result without querying Word state.
|
|
149
|
+
set requestedName to my fileNameFromPath(filePath)
|
|
150
|
+
set compatibilityLookup to my delegateFindCompatibilityModeWindow(filePath, "Refusing to query Word document state.", false)
|
|
151
|
+
set compatibilityWindow to item 1 of compatibilityLookup
|
|
152
|
+
set compatibilityError to item 2 of compatibilityLookup
|
|
153
|
+
if compatibilityError is not "" then
|
|
154
|
+
return "Error: " & compatibilityError
|
|
155
|
+
end if
|
|
156
|
+
if compatibilityWindow is not missing value then
|
|
157
|
+
return "{\"success\":true,\"filePath\":\"" & my escapeJSONString(filePath) & "\",\"documentName\":\"" & my escapeJSONString(requestedName) & "\",\"compatibilityMode\":true}"
|
|
158
|
+
end if
|
|
159
|
+
-- DELEGATE_RESTRICTED_WORD_OMIT_END
|
|
160
|
+
|
|
161
|
+
set expectedIdentity to my delegateCanonicalOfficeIdentity(filePath)
|
|
162
|
+
if expectedIdentity is missing value then
|
|
163
|
+
return "Error: The requested file path does not resolve to a canonical identity: " & filePath
|
|
164
|
+
end if
|
|
165
|
+
set doc to missing value
|
|
166
|
+
set openDocuments to documents
|
|
167
|
+
repeat with candidateDocument in openDocuments
|
|
168
|
+
try
|
|
169
|
+
if my delegateIdentitiesMatch(my delegateCanonicalOfficeIdentity(posix full name of candidateDocument), expectedIdentity) then
|
|
170
|
+
set doc to candidateDocument
|
|
171
|
+
exit repeat
|
|
172
|
+
end if
|
|
173
|
+
end try
|
|
174
|
+
end repeat
|
|
175
|
+
if doc is missing value then
|
|
176
|
+
return "Error: Failed to establish the exact opened document: " & filePath
|
|
177
|
+
end if
|
|
178
|
+
|
|
179
|
+
-- Collect document statistics
|
|
180
|
+
set docName to name of doc
|
|
181
|
+
|
|
182
|
+
set wCount to count of words of doc
|
|
183
|
+
set pCount to count of paragraphs of doc
|
|
184
|
+
set cCount to count of characters of doc
|
|
185
|
+
set pgCount to count of pages of doc
|
|
186
|
+
|
|
187
|
+
return "{\"success\":true,\"filePath\":\"" & my escapeJSONString(filePath) & "\",\"documentName\":\"" & my escapeJSONString(docName) & "\",\"pageCount\":" & pgCount & ",\"wordCount\":" & wCount & ",\"paragraphCount\":" & pCount & ",\"characterCount\":" & cCount & "}"
|
|
188
|
+
|
|
189
|
+
on error errMsg
|
|
190
|
+
return "Error: Failed to open document: " & errMsg
|
|
191
|
+
end try
|
|
192
|
+
end tell
|
|
193
|
+
end if
|
|
194
|
+
end run
|
|
195
|
+
|
|
196
|
+
on fileNameFromPath(filePath)
|
|
197
|
+
set previousDelimiters to AppleScript's text item delimiters
|
|
198
|
+
set AppleScript's text item delimiters to "/"
|
|
199
|
+
set pathParts to text items of filePath
|
|
200
|
+
set AppleScript's text item delimiters to previousDelimiters
|
|
201
|
+
return item -1 of pathParts
|
|
202
|
+
end fileNameFromPath
|
|
203
|
+
|
|
204
|
+
-- Helper function to escape special characters for JSON strings
|
|
205
|
+
on escapeJSONString(theText)
|
|
206
|
+
set theText to my replaceText(theText, "\\", "\\\\")
|
|
207
|
+
set theText to my replaceText(theText, "\"", "\\\"")
|
|
208
|
+
set theText to my replaceText(theText, return, "\\n")
|
|
209
|
+
set theText to my replaceText(theText, linefeed, "\\n")
|
|
210
|
+
set theText to my replaceText(theText, tab, "\\t")
|
|
211
|
+
return theText
|
|
212
|
+
end escapeJSONString
|
|
213
|
+
|
|
214
|
+
-- Helper function to replace text
|
|
215
|
+
on replaceText(theText, searchStr, replaceStr)
|
|
216
|
+
set AppleScript's text item delimiters to searchStr
|
|
217
|
+
set theItems to text items of theText
|
|
218
|
+
set AppleScript's text item delimiters to replaceStr
|
|
219
|
+
set theText to theItems as string
|
|
220
|
+
set AppleScript's text item delimiters to ""
|
|
221
|
+
return theText
|
|
222
|
+
end replaceText
|