@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,565 @@
|
|
|
1
|
+
#!/usr/bin/osascript
|
|
2
|
+
(*
|
|
3
|
+
* Apply Conditional Formatting to Selection
|
|
4
|
+
* Applies common conditional formatting rules to selected cells using native AppleScript API.
|
|
5
|
+
*
|
|
6
|
+
* Usage: osascript apply-conditional-format.applescript [rule] [value]
|
|
7
|
+
*
|
|
8
|
+
* Rules:
|
|
9
|
+
* positive-green - Green fill for positive numbers, red for negative (default)
|
|
10
|
+
* data-bars - Data bars showing relative values
|
|
11
|
+
* color-scale - 3-color scale (red-yellow-green)
|
|
12
|
+
* top10 - Highlight top 10 values
|
|
13
|
+
* greater-than - Highlight cells greater than value (requires value arg)
|
|
14
|
+
* less-than - Highlight cells less than value (requires value arg)
|
|
15
|
+
* clear - Remove all conditional formatting from selection
|
|
16
|
+
*
|
|
17
|
+
* Examples:
|
|
18
|
+
* osascript apply-conditional-format.applescript
|
|
19
|
+
* osascript apply-conditional-format.applescript positive-green
|
|
20
|
+
* osascript apply-conditional-format.applescript data-bars
|
|
21
|
+
* osascript apply-conditional-format.applescript greater-than 80
|
|
22
|
+
* osascript apply-conditional-format.applescript clear
|
|
23
|
+
*
|
|
24
|
+
* Note:
|
|
25
|
+
* - Excel must be open with cells selected.
|
|
26
|
+
* - "duplicates" and "blanks" rules are not supported on macOS (expression type crashes Excel).
|
|
27
|
+
* Use greater-than/less-than with cell value conditions instead.
|
|
28
|
+
*)
|
|
29
|
+
|
|
30
|
+
on run argv
|
|
31
|
+
-- ============================================================
|
|
32
|
+
-- BATCH MODE: osascript apply-conditional-format.applescript batch '<json>'
|
|
33
|
+
-- JSON: [{"rule":"positive-green","value":"","sheetName":"Sheet1","range":"C2:C20"}, ...]
|
|
34
|
+
-- ============================================================
|
|
35
|
+
if (count of argv) > 0 and (item 1 of argv as string) is "batch" then
|
|
36
|
+
if (count of argv) < 2 then
|
|
37
|
+
return "Error: batch mode requires JSON array."
|
|
38
|
+
end if
|
|
39
|
+
set batchJson to item 2 of argv as string
|
|
40
|
+
set batchItems to my parseBatchJson(batchJson)
|
|
41
|
+
if batchItems is "PARSE_ERROR" then
|
|
42
|
+
return "Error: Failed to parse batch JSON."
|
|
43
|
+
end if
|
|
44
|
+
|
|
45
|
+
set totalOps to count of batchItems
|
|
46
|
+
set successCount to 0
|
|
47
|
+
set errList to {}
|
|
48
|
+
set tabChar to tab
|
|
49
|
+
|
|
50
|
+
tell application "Microsoft Excel"
|
|
51
|
+
if not (exists active workbook) then
|
|
52
|
+
return "Error: No workbook is open in Excel."
|
|
53
|
+
end if
|
|
54
|
+
|
|
55
|
+
repeat with i from 1 to totalOps
|
|
56
|
+
set opItem to item i of batchItems
|
|
57
|
+
set AppleScript's text item delimiters to tabChar
|
|
58
|
+
set opParts to text items of opItem
|
|
59
|
+
set AppleScript's text item delimiters to ""
|
|
60
|
+
|
|
61
|
+
set opRule to item 1 of opParts
|
|
62
|
+
set opValue to item 2 of opParts
|
|
63
|
+
set opSheet to item 3 of opParts
|
|
64
|
+
set opRange to item 4 of opParts
|
|
65
|
+
-- Style JSON arrives as the 5th field (may be empty). Round-11
|
|
66
|
+
-- batch parity with single mode so per-item backgroundColor /
|
|
67
|
+
-- fontColor / bold reach the format condition.
|
|
68
|
+
set opStyleJson to ""
|
|
69
|
+
if (count of opParts) >= 5 then
|
|
70
|
+
set opStyleJson to item 5 of opParts
|
|
71
|
+
end if
|
|
72
|
+
set opStyle to my parseStyleJson(opStyleJson)
|
|
73
|
+
|
|
74
|
+
try
|
|
75
|
+
-- Resolve the target worksheet by NAME and operate on
|
|
76
|
+
-- it directly. Excel for Mac's `set active sheet to ...`
|
|
77
|
+
-- is a silent no-op, so reading back `active sheet`
|
|
78
|
+
-- after that assignment would return the WRONG sheet
|
|
79
|
+
-- and the format-condition would apply to the wrong
|
|
80
|
+
-- range. Keep the explicit ws reference.
|
|
81
|
+
if opSheet is not "" and opRange is not "" then
|
|
82
|
+
set ws to worksheet opSheet of active workbook
|
|
83
|
+
set r to range opRange of ws
|
|
84
|
+
else if opRange is not "" then
|
|
85
|
+
set ws to active sheet
|
|
86
|
+
set r to range opRange of ws
|
|
87
|
+
else
|
|
88
|
+
set ws to active sheet
|
|
89
|
+
set r to selection
|
|
90
|
+
end if
|
|
91
|
+
set selAddress to get address of r
|
|
92
|
+
|
|
93
|
+
if opRule is "clear" then
|
|
94
|
+
try
|
|
95
|
+
delete every format condition of r
|
|
96
|
+
end try
|
|
97
|
+
else if opRule is "positive-green" then
|
|
98
|
+
set fc1 to make new format condition at r with properties {format condition type:cell value, condition operator:operator greater, formula 1:"0"}
|
|
99
|
+
my applyStyleOrDefaultFill(fc1, opStyle, {198, 239, 206})
|
|
100
|
+
set fc2 to make new format condition at r with properties {format condition type:cell value, condition operator:operator less, formula 1:"0"}
|
|
101
|
+
set color of interior object of fc2 to {255, 199, 206}
|
|
102
|
+
else if opRule is "data-bars" then
|
|
103
|
+
make new format condition at r with properties {format condition type:databar}
|
|
104
|
+
else if opRule is "color-scale" then
|
|
105
|
+
make new format condition at r with properties {format condition type:color scale}
|
|
106
|
+
else if opRule is "top10" then
|
|
107
|
+
set fc to make new format condition at r with properties {format condition type:top 10}
|
|
108
|
+
my applyStyle(fc, opStyle)
|
|
109
|
+
else if opRule is "greater-than" then
|
|
110
|
+
set fc to make new format condition at r with properties {format condition type:cell value, condition operator:operator greater, formula 1:opValue}
|
|
111
|
+
my applyStyleOrDefaultFill(fc, opStyle, {198, 239, 206})
|
|
112
|
+
else if opRule is "less-than" then
|
|
113
|
+
set fc to make new format condition at r with properties {format condition type:cell value, condition operator:operator less, formula 1:opValue}
|
|
114
|
+
my applyStyleOrDefaultFill(fc, opStyle, {255, 199, 206})
|
|
115
|
+
else if opRule is "expression" then
|
|
116
|
+
-- Expression: formula-based CF. opValue is the formula
|
|
117
|
+
-- (e.g. "=MOD(ROW(),2)=0"). Without a style spec, the
|
|
118
|
+
-- rule still runs but is invisible; per docs the caller
|
|
119
|
+
-- should pass backgroundColor.
|
|
120
|
+
if opValue is "" then
|
|
121
|
+
error "'expression' rule requires a formula in value1"
|
|
122
|
+
end if
|
|
123
|
+
set fc to make new format condition at r with properties {format condition type:expression, formula 1:opValue}
|
|
124
|
+
my applyStyle(fc, opStyle)
|
|
125
|
+
else if opRule is "containsText" or opRule is "contains-text" then
|
|
126
|
+
-- containsText: ISNUMBER(SEARCH("value", firstCellRef))
|
|
127
|
+
-- Mirrors the single-mode branch. Required to reach
|
|
128
|
+
-- parity with the documented single-mode API; batch
|
|
129
|
+
-- silently dropped this rule before.
|
|
130
|
+
if opValue is "" then
|
|
131
|
+
error "'containsText' rule requires a value argument"
|
|
132
|
+
end if
|
|
133
|
+
set escapedForFormula to opValue
|
|
134
|
+
set AppleScript's text item delimiters to "\""
|
|
135
|
+
set _partsCT to text items of escapedForFormula
|
|
136
|
+
set AppleScript's text item delimiters to "\"\""
|
|
137
|
+
set escapedForFormula to _partsCT as string
|
|
138
|
+
set AppleScript's text item delimiters to ""
|
|
139
|
+
set firstCellRef to "A1"
|
|
140
|
+
try
|
|
141
|
+
set rawAddr to get address of cell 1 of r
|
|
142
|
+
set AppleScript's text item delimiters to "$"
|
|
143
|
+
set _addrPartsCT to text items of rawAddr
|
|
144
|
+
set AppleScript's text item delimiters to ""
|
|
145
|
+
set firstCellRef to _addrPartsCT as string
|
|
146
|
+
end try
|
|
147
|
+
set ctFormula to "=ISNUMBER(SEARCH(\"" & escapedForFormula & "\"," & firstCellRef & "))"
|
|
148
|
+
set fc to make new format condition at r with properties {format condition type:expression, formula 1:ctFormula}
|
|
149
|
+
my applyStyleOrDefaultFill(fc, opStyle, {255, 235, 156})
|
|
150
|
+
else if opRule is "duplicates" or opRule is "blanks" then
|
|
151
|
+
error "'" & opRule & "' rule is not supported on macOS"
|
|
152
|
+
else
|
|
153
|
+
-- Reject unknown rules. Without this, the batch was
|
|
154
|
+
-- silently incrementing successCount for typos and
|
|
155
|
+
-- unsupported rule names like "above-avg".
|
|
156
|
+
error "Unknown rule '" & opRule & "': use positive-green, data-bars, color-scale, top10, greater-than, less-than, containsText, expression, or clear"
|
|
157
|
+
end if
|
|
158
|
+
|
|
159
|
+
set successCount to successCount + 1
|
|
160
|
+
on error errMsg
|
|
161
|
+
set end of errList to "Item " & i & ": " & errMsg
|
|
162
|
+
end try
|
|
163
|
+
end repeat
|
|
164
|
+
end tell
|
|
165
|
+
|
|
166
|
+
set errCount to count of errList
|
|
167
|
+
if errCount is 0 then
|
|
168
|
+
return "{\"success\":true,\"operationsCompleted\":" & successCount & ",\"total\":" & totalOps & "}"
|
|
169
|
+
else
|
|
170
|
+
set AppleScript's text item delimiters to "; "
|
|
171
|
+
set errStr to errList as string
|
|
172
|
+
-- JSON-escape backslashes (FIRST) and quotes so the emitted
|
|
173
|
+
-- errorDetails JSON parses on the TS side even when Excel error
|
|
174
|
+
-- messages contain literal quotes or backslashes. Without this,
|
|
175
|
+
-- a quote-bearing error message broke JSON.parse and the
|
|
176
|
+
-- executor's catch silently treated the result as success.
|
|
177
|
+
set AppleScript's text item delimiters to "\\"
|
|
178
|
+
set _p to text items of errStr
|
|
179
|
+
set AppleScript's text item delimiters to "\\\\"
|
|
180
|
+
set errStr to _p as string
|
|
181
|
+
set AppleScript's text item delimiters to "\""
|
|
182
|
+
set _p to text items of errStr
|
|
183
|
+
set AppleScript's text item delimiters to "\\\""
|
|
184
|
+
set errStr to _p as string
|
|
185
|
+
set AppleScript's text item delimiters to ""
|
|
186
|
+
-- ANY errors -> success:false (executor propagates as 'error').
|
|
187
|
+
return "{\"success\":false,\"operationsCompleted\":" & successCount & ",\"errors\":" & errCount & ",\"total\":" & totalOps & ",\"errorDetails\":\"" & errStr & "\"}"
|
|
188
|
+
end if
|
|
189
|
+
end if
|
|
190
|
+
|
|
191
|
+
-- ============================================================
|
|
192
|
+
-- SINGLE MODE (original behavior)
|
|
193
|
+
-- ============================================================
|
|
194
|
+
set formatRule to "positive-green"
|
|
195
|
+
set ruleValue to ""
|
|
196
|
+
set sheetName to ""
|
|
197
|
+
set rangeArg to ""
|
|
198
|
+
-- 5th arg: JSON blob with optional style fields
|
|
199
|
+
-- {"backgroundColor":"#RRGGBB","fontColor":"#RRGGBB","bold":true}
|
|
200
|
+
-- Codex review round 11 wired docs-API style fields through. When
|
|
201
|
+
-- provided, this overrides the legacy hard-coded green/red fills for
|
|
202
|
+
-- CellValue rules and enables Expression rules to render visibly.
|
|
203
|
+
set styleJson to ""
|
|
204
|
+
-- 6th arg: optional workbookName. When provided, the rule targets
|
|
205
|
+
-- that workbook explicitly instead of `active workbook` (which can
|
|
206
|
+
-- drift to a different open workbook). Codex review round 12 /
|
|
207
|
+
-- battery group F flagged that with multiple workbooks open the
|
|
208
|
+
-- format condition could be applied to the wrong workbook.
|
|
209
|
+
set workbookName to ""
|
|
210
|
+
if (count of argv) > 0 then
|
|
211
|
+
set formatRule to item 1 of argv
|
|
212
|
+
end if
|
|
213
|
+
if (count of argv) > 1 then
|
|
214
|
+
set ruleValue to item 2 of argv as string
|
|
215
|
+
end if
|
|
216
|
+
if (count of argv) > 2 then
|
|
217
|
+
set sheetName to item 3 of argv as string
|
|
218
|
+
end if
|
|
219
|
+
if (count of argv) > 3 then
|
|
220
|
+
set rangeArg to item 4 of argv as string
|
|
221
|
+
end if
|
|
222
|
+
if (count of argv) > 4 then
|
|
223
|
+
set styleJson to item 5 of argv as string
|
|
224
|
+
end if
|
|
225
|
+
if (count of argv) > 5 then
|
|
226
|
+
set workbookName to item 6 of argv as string
|
|
227
|
+
end if
|
|
228
|
+
|
|
229
|
+
set styleSpec to my parseStyleJson(styleJson)
|
|
230
|
+
|
|
231
|
+
tell application "Microsoft Excel"
|
|
232
|
+
if not (exists active workbook) then
|
|
233
|
+
return "Error: No workbook is open in Excel."
|
|
234
|
+
end if
|
|
235
|
+
|
|
236
|
+
if workbookName is "" then
|
|
237
|
+
set targetWb to active workbook
|
|
238
|
+
else
|
|
239
|
+
try
|
|
240
|
+
set targetWb to workbook workbookName
|
|
241
|
+
on error
|
|
242
|
+
return "Error: Workbook \"" & workbookName & "\" not found."
|
|
243
|
+
end try
|
|
244
|
+
end if
|
|
245
|
+
|
|
246
|
+
-- Activate the target workbook so `make new format condition`
|
|
247
|
+
-- creates the rule on the right workbook (Excel for Mac writes
|
|
248
|
+
-- mutations to active wb).
|
|
249
|
+
try
|
|
250
|
+
activate object targetWb
|
|
251
|
+
end try
|
|
252
|
+
|
|
253
|
+
-- Resolve target sheet and range. Excel for Mac's `set active sheet
|
|
254
|
+
-- to ...` is a silent no-op, so we keep an explicit worksheet
|
|
255
|
+
-- reference and target the range directly. Falling back to `active
|
|
256
|
+
-- sheet` after a no-op assignment would apply the format condition
|
|
257
|
+
-- to the wrong sheet.
|
|
258
|
+
set ws to missing value
|
|
259
|
+
if sheetName is not "" then
|
|
260
|
+
try
|
|
261
|
+
set ws to worksheet sheetName of targetWb
|
|
262
|
+
on error errMsg
|
|
263
|
+
return "Error: Sheet \"" & sheetName & "\" not found: " & errMsg
|
|
264
|
+
end try
|
|
265
|
+
else
|
|
266
|
+
set ws to active sheet of targetWb
|
|
267
|
+
end if
|
|
268
|
+
|
|
269
|
+
if rangeArg is not "" then
|
|
270
|
+
try
|
|
271
|
+
set r to range rangeArg of ws
|
|
272
|
+
on error errMsg
|
|
273
|
+
return "Error: Could not resolve range \"" & rangeArg & "\": " & errMsg
|
|
274
|
+
end try
|
|
275
|
+
else if sheetName is not "" then
|
|
276
|
+
-- sheetName without range is ambiguous: `selection` returns the
|
|
277
|
+
-- workbook-wide selection which can belong to a DIFFERENT sheet,
|
|
278
|
+
-- so applying the format condition there would mutate the wrong
|
|
279
|
+
-- worksheet. Require a range when sheetName is provided.
|
|
280
|
+
return "Error: range is required when sheetName is provided (otherwise the workbook selection may be on a different sheet)."
|
|
281
|
+
else
|
|
282
|
+
-- Both sheetName and range omitted: caller relied on prior
|
|
283
|
+
-- `select` from the executor's selectRange step on the active
|
|
284
|
+
-- sheet. The selection belongs to active sheet.
|
|
285
|
+
set r to selection
|
|
286
|
+
if r is missing value then
|
|
287
|
+
return "Error: Please select cells first or pass range + sheetName explicitly."
|
|
288
|
+
end if
|
|
289
|
+
end if
|
|
290
|
+
|
|
291
|
+
set selAddress to get address of r
|
|
292
|
+
|
|
293
|
+
try
|
|
294
|
+
if formatRule is "clear" then
|
|
295
|
+
-- Clear all format conditions from selection (batch delete avoids crash with special types)
|
|
296
|
+
try
|
|
297
|
+
delete every format condition of r
|
|
298
|
+
end try
|
|
299
|
+
delay 0.3
|
|
300
|
+
return "{\"success\":true,\"action\":\"clear\",\"range\":\"" & selAddress & "\"}"
|
|
301
|
+
|
|
302
|
+
else if formatRule is "positive-green" then
|
|
303
|
+
-- Green for positive (>0), red for negative (<0). Style override
|
|
304
|
+
-- (round 11) only applies the override to the positive branch
|
|
305
|
+
-- since "positive-green" is a single semantic rule; callers
|
|
306
|
+
-- who want fully-custom colors should use CellValue with
|
|
307
|
+
-- explicit operator + style.
|
|
308
|
+
set fc1 to make new format condition at r with properties {format condition type:cell value, condition operator:operator greater, formula 1:"0"}
|
|
309
|
+
my applyStyleOrDefaultFill(fc1, styleSpec, {198, 239, 206})
|
|
310
|
+
set fc2 to make new format condition at r with properties {format condition type:cell value, condition operator:operator less, formula 1:"0"}
|
|
311
|
+
set color of interior object of fc2 to {255, 199, 206}
|
|
312
|
+
return "{\"success\":true,\"rule\":\"positive-green\",\"range\":\"" & selAddress & "\"}"
|
|
313
|
+
|
|
314
|
+
else if formatRule is "data-bars" then
|
|
315
|
+
-- Data bars showing relative values (built-in visual, no color needed)
|
|
316
|
+
set fc to make new format condition at r with properties {format condition type:databar}
|
|
317
|
+
return "{\"success\":true,\"rule\":\"data-bars\",\"range\":\"" & selAddress & "\"}"
|
|
318
|
+
|
|
319
|
+
else if formatRule is "color-scale" then
|
|
320
|
+
-- 3-color scale (built-in visual, no color needed)
|
|
321
|
+
set fc to make new format condition at r with properties {format condition type:color scale}
|
|
322
|
+
return "{\"success\":true,\"rule\":\"color-scale\",\"range\":\"" & selAddress & "\"}"
|
|
323
|
+
|
|
324
|
+
else if formatRule is "top10" then
|
|
325
|
+
-- Highlight top 10 values (built-in visual, no color needed)
|
|
326
|
+
set fc to make new format condition at r with properties {format condition type:top 10}
|
|
327
|
+
my applyStyle(fc, styleSpec)
|
|
328
|
+
return "{\"success\":true,\"rule\":\"top10\",\"range\":\"" & selAddress & "\"}"
|
|
329
|
+
|
|
330
|
+
else if formatRule is "greater-than" then
|
|
331
|
+
if ruleValue is "" then
|
|
332
|
+
return "Error: 'greater-than' rule requires a value argument."
|
|
333
|
+
end if
|
|
334
|
+
set fc to make new format condition at r with properties {format condition type:cell value, condition operator:operator greater, formula 1:ruleValue}
|
|
335
|
+
-- Honor documented style fields (advanced.md:50-52). Without
|
|
336
|
+
-- a style spec, fall back to the legacy green fill.
|
|
337
|
+
my applyStyleOrDefaultFill(fc, styleSpec, {198, 239, 206})
|
|
338
|
+
return "{\"success\":true,\"rule\":\"greater-than\",\"value\":\"" & ruleValue & "\",\"range\":\"" & selAddress & "\"}"
|
|
339
|
+
|
|
340
|
+
else if formatRule is "less-than" then
|
|
341
|
+
if ruleValue is "" then
|
|
342
|
+
return "Error: 'less-than' rule requires a value argument."
|
|
343
|
+
end if
|
|
344
|
+
set fc to make new format condition at r with properties {format condition type:cell value, condition operator:operator less, formula 1:ruleValue}
|
|
345
|
+
my applyStyleOrDefaultFill(fc, styleSpec, {255, 199, 206})
|
|
346
|
+
return "{\"success\":true,\"rule\":\"less-than\",\"value\":\"" & ruleValue & "\",\"range\":\"" & selAddress & "\"}"
|
|
347
|
+
|
|
348
|
+
else if formatRule is "expression" then
|
|
349
|
+
-- Documented Expression rule (advanced.md:60-66). value1 is
|
|
350
|
+
-- the formula (e.g. "=MOD(ROW(),2)=0"). Without a style
|
|
351
|
+
-- spec, the rule still runs but produces no visible fill;
|
|
352
|
+
-- docs note backgroundColor is required for visible output.
|
|
353
|
+
if ruleValue is "" then
|
|
354
|
+
return "Error: 'expression' rule requires a formula in value1."
|
|
355
|
+
end if
|
|
356
|
+
set fc to make new format condition at r with properties {format condition type:expression, formula 1:ruleValue}
|
|
357
|
+
my applyStyle(fc, styleSpec)
|
|
358
|
+
return "{\"success\":true,\"rule\":\"expression\",\"range\":\"" & selAddress & "\"}"
|
|
359
|
+
|
|
360
|
+
else if formatRule is "containsText" or formatRule is "contains-text" then
|
|
361
|
+
if ruleValue is "" then
|
|
362
|
+
return "Error: 'containsText' rule requires a value argument."
|
|
363
|
+
end if
|
|
364
|
+
|
|
365
|
+
-- Use a formula-based condition: =ISNUMBER(SEARCH("<value>",<firstCellRef>)).
|
|
366
|
+
-- The "expression" type avoids the native text-type CF that has
|
|
367
|
+
-- caused macOS Excel crashes; SEARCH+ISNUMBER works in every
|
|
368
|
+
-- Excel version. Inside the Excel formula string, embedded
|
|
369
|
+
-- double quotes are escaped by doubling them.
|
|
370
|
+
set escapedForFormula to ruleValue
|
|
371
|
+
set AppleScript's text item delimiters to "\""
|
|
372
|
+
set _parts to text items of escapedForFormula
|
|
373
|
+
set AppleScript's text item delimiters to "\"\""
|
|
374
|
+
set escapedForFormula to _parts as string
|
|
375
|
+
set AppleScript's text item delimiters to ""
|
|
376
|
+
|
|
377
|
+
-- Derive a relative first-cell reference (e.g. "B1" not "$B$1")
|
|
378
|
+
-- so Excel applies the formula per-cell across the range.
|
|
379
|
+
set firstCellRef to "A1"
|
|
380
|
+
try
|
|
381
|
+
set rawAddr to get address of cell 1 of r
|
|
382
|
+
set AppleScript's text item delimiters to "$"
|
|
383
|
+
set _addrParts to text items of rawAddr
|
|
384
|
+
set AppleScript's text item delimiters to ""
|
|
385
|
+
set firstCellRef to _addrParts as string
|
|
386
|
+
end try
|
|
387
|
+
|
|
388
|
+
set ctFormula to "=ISNUMBER(SEARCH(\"" & escapedForFormula & "\"," & firstCellRef & "))"
|
|
389
|
+
set fc to make new format condition at r with properties {format condition type:expression, formula 1:ctFormula}
|
|
390
|
+
my applyStyleOrDefaultFill(fc, styleSpec, {255, 235, 156})
|
|
391
|
+
return "{\"success\":true,\"rule\":\"containsText\",\"range\":\"" & selAddress & "\"}"
|
|
392
|
+
|
|
393
|
+
else if formatRule is "duplicates" or formatRule is "blanks" then
|
|
394
|
+
return "Error: '" & formatRule & "' rule is not supported on macOS (causes Excel instability). Use greater-than/less-than with cell value conditions instead."
|
|
395
|
+
|
|
396
|
+
else
|
|
397
|
+
return "Error: Unknown rule '" & formatRule & "'. Available: positive-green, data-bars, color-scale, top10, greater-than, less-than, containsText, expression, clear"
|
|
398
|
+
end if
|
|
399
|
+
|
|
400
|
+
on error errMsg
|
|
401
|
+
return "Error applying conditional formatting: " & errMsg
|
|
402
|
+
end try
|
|
403
|
+
end tell
|
|
404
|
+
end run
|
|
405
|
+
|
|
406
|
+
-- Parse batch JSON array into list of tab-separated strings using Python.
|
|
407
|
+
-- Round-11: include `style` as a JSON-encoded 5th field so each batch item
|
|
408
|
+
-- can carry backgroundColor/fontColor/bold through to applyStyle.
|
|
409
|
+
-- Each item: rule\tvalue\tsheetName\trange\tstyleJson
|
|
410
|
+
on parseBatchJson(jsonStr)
|
|
411
|
+
try
|
|
412
|
+
set shellCmd to "echo " & quoted form of jsonStr & " | /usr/bin/python3 -c \"
|
|
413
|
+
import json, sys
|
|
414
|
+
items = json.load(sys.stdin)
|
|
415
|
+
if not isinstance(items, list):
|
|
416
|
+
print('PARSE_ERROR')
|
|
417
|
+
sys.exit(0)
|
|
418
|
+
for item in items:
|
|
419
|
+
r = item.get('rule', '')
|
|
420
|
+
v = item.get('value', '')
|
|
421
|
+
s = item.get('sheetName', '')
|
|
422
|
+
rng = item.get('range', '')
|
|
423
|
+
style = item.get('style', '')
|
|
424
|
+
if isinstance(style, dict):
|
|
425
|
+
style = json.dumps(style)
|
|
426
|
+
elif style is None:
|
|
427
|
+
style = ''
|
|
428
|
+
print(str(r) + '\\t' + str(v) + '\\t' + str(s) + '\\t' + str(rng) + '\\t' + str(style))
|
|
429
|
+
\""
|
|
430
|
+
set rawOutput to do shell script shellCmd
|
|
431
|
+
if rawOutput is "PARSE_ERROR" then return "PARSE_ERROR"
|
|
432
|
+
set resultList to paragraphs of rawOutput
|
|
433
|
+
set cleanList to {}
|
|
434
|
+
repeat with ln in resultList
|
|
435
|
+
if (ln as string) is not "" then
|
|
436
|
+
set end of cleanList to (ln as string)
|
|
437
|
+
end if
|
|
438
|
+
end repeat
|
|
439
|
+
return cleanList
|
|
440
|
+
on error
|
|
441
|
+
return "PARSE_ERROR"
|
|
442
|
+
end try
|
|
443
|
+
end parseBatchJson
|
|
444
|
+
|
|
445
|
+
-- Parse style JSON ({"backgroundColor":"#RRGGBB","fontColor":"#RRGGBB","bold":true})
|
|
446
|
+
-- into a record. Returns missing value when blank or malformed.
|
|
447
|
+
-- Codex review round 11 wired the documented backgroundColor/fontColor/bold
|
|
448
|
+
-- fields through; the .applescript previously ignored them entirely.
|
|
449
|
+
on parseStyleJson(jsonStr)
|
|
450
|
+
if jsonStr is "" then return missing value
|
|
451
|
+
try
|
|
452
|
+
set shellCmd to "echo " & quoted form of jsonStr & " | /usr/bin/python3 -c \"
|
|
453
|
+
import json, sys
|
|
454
|
+
try:
|
|
455
|
+
s = json.load(sys.stdin)
|
|
456
|
+
if not isinstance(s, dict): print('NULL'); sys.exit(0)
|
|
457
|
+
bg = s.get('backgroundColor') or ''
|
|
458
|
+
fg = s.get('fontColor') or ''
|
|
459
|
+
bold = '1' if s.get('bold') is True else '0'
|
|
460
|
+
print(str(bg) + '\\t' + str(fg) + '\\t' + str(bold))
|
|
461
|
+
except Exception:
|
|
462
|
+
print('NULL')
|
|
463
|
+
\""
|
|
464
|
+
set rawOutput to do shell script shellCmd
|
|
465
|
+
if rawOutput is "NULL" then return missing value
|
|
466
|
+
set AppleScript's text item delimiters to tab
|
|
467
|
+
set parts to text items of rawOutput
|
|
468
|
+
set AppleScript's text item delimiters to ""
|
|
469
|
+
if (count of parts) < 3 then return missing value
|
|
470
|
+
set bgHex to item 1 of parts
|
|
471
|
+
set fgHex to item 2 of parts
|
|
472
|
+
set boldFlag to (item 3 of parts is "1")
|
|
473
|
+
return {bgHex:bgHex, fgHex:fgHex, isBold:boldFlag}
|
|
474
|
+
on error
|
|
475
|
+
return missing value
|
|
476
|
+
end try
|
|
477
|
+
end parseStyleJson
|
|
478
|
+
|
|
479
|
+
-- Convert "#RRGGBB" / "RRGGBB" into Excel's {R, G, B} 0-255 triplet.
|
|
480
|
+
-- Returns missing value on malformed input.
|
|
481
|
+
on hexToRGB(hex)
|
|
482
|
+
if hex is "" then return missing value
|
|
483
|
+
set h to hex
|
|
484
|
+
if h starts with "#" then set h to text 2 thru -1 of h
|
|
485
|
+
if (count of characters of h) is not 6 then return missing value
|
|
486
|
+
try
|
|
487
|
+
set r to my hex2int(text 1 thru 2 of h)
|
|
488
|
+
set g to my hex2int(text 3 thru 4 of h)
|
|
489
|
+
set b to my hex2int(text 5 thru 6 of h)
|
|
490
|
+
return {r, g, b}
|
|
491
|
+
on error
|
|
492
|
+
return missing value
|
|
493
|
+
end try
|
|
494
|
+
end hexToRGB
|
|
495
|
+
|
|
496
|
+
on hex2int(twoChar)
|
|
497
|
+
set digits to "0123456789ABCDEF"
|
|
498
|
+
set c1 to character 1 of twoChar
|
|
499
|
+
set c2 to character 2 of twoChar
|
|
500
|
+
set upperC1 to my upperOne(c1)
|
|
501
|
+
set upperC2 to my upperOne(c2)
|
|
502
|
+
set v1 to (offset of upperC1 in digits) - 1
|
|
503
|
+
set v2 to (offset of upperC2 in digits) - 1
|
|
504
|
+
if v1 < 0 or v2 < 0 then error "Invalid hex char"
|
|
505
|
+
return v1 * 16 + v2
|
|
506
|
+
end hex2int
|
|
507
|
+
|
|
508
|
+
on upperOne(ch)
|
|
509
|
+
set lower to "abcdef"
|
|
510
|
+
set upper to "ABCDEF"
|
|
511
|
+
set idx to offset of ch in lower
|
|
512
|
+
if idx > 0 then return character idx of upper
|
|
513
|
+
return ch
|
|
514
|
+
end upperOne
|
|
515
|
+
|
|
516
|
+
-- Apply a parsed style spec to a format condition. Silently no-ops when
|
|
517
|
+
-- styleSpec is missing value. Best-effort per-field so a bad fontColor
|
|
518
|
+
-- doesn't prevent backgroundColor from applying.
|
|
519
|
+
--
|
|
520
|
+
-- The handler body wraps every Excel-term access (`interior object`,
|
|
521
|
+
-- `font object`, `bold`, `color`) in `tell application "Microsoft Excel"`
|
|
522
|
+
-- because AppleScript compiles handlers in app-agnostic scope by default,
|
|
523
|
+
-- and `interior object` / `font object` are Excel-dialect terms that
|
|
524
|
+
-- raise a -2740 parse error outside an Excel `tell` block.
|
|
525
|
+
on applyStyle(fc, styleSpec)
|
|
526
|
+
if styleSpec is missing value then return
|
|
527
|
+
tell application "Microsoft Excel"
|
|
528
|
+
try
|
|
529
|
+
set bgTriplet to my hexToRGB(bgHex of styleSpec)
|
|
530
|
+
if bgTriplet is not missing value then
|
|
531
|
+
set color of interior object of fc to bgTriplet
|
|
532
|
+
end if
|
|
533
|
+
end try
|
|
534
|
+
try
|
|
535
|
+
set fgTriplet to my hexToRGB(fgHex of styleSpec)
|
|
536
|
+
if fgTriplet is not missing value then
|
|
537
|
+
set color of font object of fc to fgTriplet
|
|
538
|
+
end if
|
|
539
|
+
end try
|
|
540
|
+
try
|
|
541
|
+
if isBold of styleSpec then
|
|
542
|
+
set bold of font object of fc to true
|
|
543
|
+
end if
|
|
544
|
+
end try
|
|
545
|
+
end tell
|
|
546
|
+
end applyStyle
|
|
547
|
+
|
|
548
|
+
-- Apply style when present, else apply the legacy default RGB fill. Used
|
|
549
|
+
-- by CellValue-style rules (greater-than / less-than / positive-green /
|
|
550
|
+
-- containsText) so callers who don't pass a style still get the historical
|
|
551
|
+
-- green/red/yellow defaults.
|
|
552
|
+
on applyStyleOrDefaultFill(fc, styleSpec, defaultRGB)
|
|
553
|
+
tell application "Microsoft Excel"
|
|
554
|
+
if styleSpec is missing value then
|
|
555
|
+
set color of interior object of fc to defaultRGB
|
|
556
|
+
else
|
|
557
|
+
my applyStyle(fc, styleSpec)
|
|
558
|
+
if bgHex of styleSpec is "" then
|
|
559
|
+
try
|
|
560
|
+
set color of interior object of fc to defaultRGB
|
|
561
|
+
end try
|
|
562
|
+
end if
|
|
563
|
+
end if
|
|
564
|
+
end tell
|
|
565
|
+
end applyStyleOrDefaultFill
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/osascript
|
|
2
|
+
(*
|
|
3
|
+
* Auto-fit Columns in Excel
|
|
4
|
+
* Automatically adjusts column widths to fit their content using the pure
|
|
5
|
+
* Apple Event API. Previous version used UI Automation (Format > Column >
|
|
6
|
+
* AutoFit menu navigation) which required bringing Excel to the foreground.
|
|
7
|
+
*
|
|
8
|
+
* Usage: osascript autofit-columns.applescript [sheetName] [columns]
|
|
9
|
+
*
|
|
10
|
+
* Parameters:
|
|
11
|
+
* sheetName - Optional: sheet to autofit (uses active sheet if empty)
|
|
12
|
+
* columns - Optional: column range like "A:D" (uses used range if empty)
|
|
13
|
+
*
|
|
14
|
+
* Note: Excel must be open with an active workbook.
|
|
15
|
+
*)
|
|
16
|
+
|
|
17
|
+
on run argv
|
|
18
|
+
set sheetName to ""
|
|
19
|
+
set colRange to ""
|
|
20
|
+
if (count of argv) > 0 then
|
|
21
|
+
set sheetName to item 1 of argv as string
|
|
22
|
+
end if
|
|
23
|
+
if (count of argv) > 1 then
|
|
24
|
+
set colRange to item 2 of argv as string
|
|
25
|
+
end if
|
|
26
|
+
|
|
27
|
+
tell application "Microsoft Excel"
|
|
28
|
+
if not (exists active workbook) then
|
|
29
|
+
return "Error: No workbook is open in Excel."
|
|
30
|
+
end if
|
|
31
|
+
|
|
32
|
+
try
|
|
33
|
+
if sheetName is not "" then
|
|
34
|
+
set ws to worksheet sheetName of active workbook
|
|
35
|
+
else
|
|
36
|
+
set ws to active sheet
|
|
37
|
+
end if
|
|
38
|
+
on error errMsg
|
|
39
|
+
return "Error: Could not find sheet: " & errMsg
|
|
40
|
+
end try
|
|
41
|
+
|
|
42
|
+
-- Resolve the column range to autofit. `autofit (entire column of <range>)`
|
|
43
|
+
-- is the pure Apple Event path and does NOT raise the Excel app.
|
|
44
|
+
try
|
|
45
|
+
if colRange is not "" then
|
|
46
|
+
-- colRange may be like "A:D" (column letters) or "A1:D1" (cells)
|
|
47
|
+
set targetRange to range colRange of ws
|
|
48
|
+
else
|
|
49
|
+
set targetRange to used range of ws
|
|
50
|
+
end if
|
|
51
|
+
try
|
|
52
|
+
autofit (entire column of targetRange)
|
|
53
|
+
return "{\"success\":true,\"autofitApplied\":true,\"message\":\"Columns auto-fitted\"}"
|
|
54
|
+
on error autofitErr
|
|
55
|
+
-- Fallback: some macOS Excel builds reject the `autofit` command.
|
|
56
|
+
-- We can only bump narrow columns to a minimum readable width,
|
|
57
|
+
-- which is NOT autofit and may leave too-wide columns unchanged.
|
|
58
|
+
-- Report success:false to signal the partial behavior to callers
|
|
59
|
+
-- so they can choose to retry via a different path (UIA) or
|
|
60
|
+
-- accept the limited result.
|
|
61
|
+
set firstCol to first column index of targetRange
|
|
62
|
+
set lastColIdx to firstCol + (count of columns of targetRange) - 1
|
|
63
|
+
set bumped to 0
|
|
64
|
+
repeat with i from firstCol to lastColIdx
|
|
65
|
+
try
|
|
66
|
+
set col to column i of ws
|
|
67
|
+
if (column width of col) < 10 then
|
|
68
|
+
set column width of col to 12
|
|
69
|
+
set bumped to bumped + 1
|
|
70
|
+
end if
|
|
71
|
+
end try
|
|
72
|
+
end repeat
|
|
73
|
+
return "{\"success\":false,\"autofitApplied\":false,\"columnsBumped\":" & bumped & ",\"message\":\"AutoFit Apple Event rejected by this Excel build; applied minimum-width fallback only. Wider columns left unchanged.\"}"
|
|
74
|
+
end try
|
|
75
|
+
on error errMsg
|
|
76
|
+
return "Error: Failed to auto-fit columns: " & errMsg
|
|
77
|
+
end try
|
|
78
|
+
end tell
|
|
79
|
+
end run
|