4d-form-screenshot
4D Form Screenshot
Capture a screenshot for a specific form and save it as Project/Sources/Forms/<FormName>/form.png.
Inputs
Accept either:
- A form name such as
Form1 - A path to
form.4DFormsuch asProject/Sources/Forms/Form1/form.4DForm - A path to the form folder if that folder contains
form.4DForm
Pass the raw form input through --user-param. The bundled _formScreenshot.4dm resolves a form.4DForm path to the form name before calling FORM SCREENSHOT.
Use /4d-run
Use the /4d-run skill to locate tool4d and to run the startup method.
Workflow
- Locate the current
.4DProject. - Copy
assets/_formScreenshot.4dmtoProject/Sources/Methods/_formScreenshot.4dmif it is missing. - Keep the user input unchanged and pass it as
--user-param=<form name or path>. - Use
/4d-runto run_formScreenshoton the current project. - Prefer
tool4dfirst. If/4d-runneeds the full 4D runtime, use the user-provided 4D executable path through/4d-run. - If the run crashes because
defaultJsonForm.jsonis missing, copyassets/defaultJsonForm.jsoninto theResourcesfolder of the runtime being used, then retry. - Return the generated screenshot path:
Project/Sources/Forms/<FormName>/form.png.
Missing defaultJsonForm.json
Some runtimes crash on FORM SCREENSHOT when defaultJsonForm.json is missing.
When that happens:
- If
/4d-runis usingtool4d.app, copy the bundledassets/defaultJsonForm.jsontotool4d.app/Contents/Resources/defaultJsonForm.json - Retry the same
_formScreenshotrun afterward
More from e-marchand/skills
4d-check-syntax
Check syntax and compile a 4D project to find errors and type issues. Use this skill when the user wants to compile, check syntax, or validate a 4D project. Creates a _compile method if not present, then runs it using tool4d. Returns compilation errors in JSON format for easy parsing.
114d-run
Run a 4D project method. Use tool4d by default for fast dataless execution, and fall back to a user-provided 4D executable path when the method needs a real database or runtime features unavailable in tool4d. Includes Python helpers for macOS and Windows.
94d-find-command
Find 4D commands by keyword. Use this skill when the user wants to search for, find, or discover 4D commands matching a term. Searches the gram.4dsyntax file from tool4d.app to list matching command names and uses bundled syntax metadata for readable signatures and summaries. Filters out deprecated commands.
94d-clean-project
Clean a 4D project by removing generated files, caches, and system artifacts.
64d-add-dependency
Add dependencies to a 4D project. Use when the user wants to add a component, library, or dependency to their 4D project. Supports GitHub repos (owner/repo format), GitHub URLs (with automatic tag extraction from release URLs), and local folder paths. Handles dependencies.json and environment4d.json configuration.
6skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
5