RaggieScript
›
Wizard UI & Studio Sandboxes
5 min read
Module: raggiesoft.raggiescript
F1: IDH_RSSC_SANDBOX (0x200E)
Studio Sandbox Profiles (training.*, a11y.*, localization.*, document.*, launcher.*, help.*)
Because RaggieScript powers all ten RaggieSoft Studio tools , scripts authored for compliance, e-learning, localization, PDF generation, or help routing run inside strict compile-time capability sandboxes (RSW702) .
Important
Zero Host Escape Guarantee (RSW702) : Whenever a script declares use training;, use a11y;, use localization;, use document;, use storescript;, or use crossroads; (without use installer;), the RaggieScript static binder rejects at compile time any call to fs.*, reg.*, proc.*, ffi.*, rm.*, svc.*, net.*, msi.*, prereq.*, shortcut.*, shell.*, firewall.*, acl.*, task.*, env.*, arp.*, ini.*, archive.*, com.*, font.*, cert.*, sign.*, mutex.*, or activesetup.*. (For consumer profiles `storescript. and crossroads.`, see StoreScript & Story Crossroads .)
training.* — RaggieSoft Training Studio SCORM 1.2 & 2004 (9 Methods)
Compiles via raggiescript.exe transpile-es2022 into a pure, zero-eval() ES2022 JavaScript module (createRaggieScriptModule(host)) for < 50 KB bandwidth-resilient SCORM courses, and also executes natively in the C++20 and .NET VMs for headless rubric testing!
Method Signature Return Description
training.setScoretraining.setScore(scorePct: int, maxScore?: int)boolRecords normalized quiz score (0..100, cmi.core.score.raw / cmi.score.scaled).
training.completeSlidetraining.completeSlide(slideId: string)boolMarks slideId complete in Training Studio's offline Write-Ahead Queue (WAL).
training.branchTotraining.branchTo(targetSlideId: string)stringRoutes the learner to an adaptive scenario or remediation slide and returns targetSlideId.
training.recordObjectivetraining.recordObjective(objectiveId: string, status: string, score?: int)boolRecords SCORM 2004 4th Edition cmi.objectives.n ("passed" / "failed" / "completed").
training.getStatetraining.getState(key: string, fallback?: any)anyReads persisted cmi.suspend_data scenario variable (<= 4,096 byte SCORM 1.2 safe).
training.setStatetraining.setState(key: string, value: any)boolWrites persisted cmi.suspend_data scenario state across LMS sessions.
training.recordInteractiontraining.recordInteraction(id: string, kind: string, learnerResponse: string, result?: string, latencySec?: float)boolAppends a structured SCORM cmi.interactions.n item-analysis record.
training.announcePolitetraining.announcePolite(message: string)boolEmits a polite aria-live="polite" feedback announcement for screen-reader learners.
training.unlockNextSlidetraining.unlockNextSlide(slideId?: string)boolUnlocks the gated Next button after interactive scenario requirements are met.
a11y.* — RaggieSoft Accessibility Studio Custom Compliance Rules (7 Methods)
Executed inside AccessibilityStudio.exe and a11y-studio-cli via our managed .NET RaggieScript.Core SDK (and C++20 VM) to enforce organization-specific WCAG 2.2 AA & Section 508 design-system rules outputting OASIS SARIF 2.1.0 and Monaco Guided Fix diffs:
Method Signature Return Description
a11y.contrastRatioa11y.contrastRatio(fgHex: string, bgHex: string)floatComputes exact W3C WCAG 2.2 relative luminance contrast ratio (1.0 .. 21.0) between two #RRGGBB colors.
a11y.reportViolationa11y.reportViolation(ruleId: string, targetId: string, message: string, severity?: string, line?: int)nullAppends a structured SARIF 2.1.0 / VPAT diagnostic finding.
a11y.suggestFixa11y.suggestFix(ruleId: string, title: string, beforeSnippet: string, afterSnippet: string, explanation?: string)mapRegisters a side-by-side Guided Fix diff preview inside Accessibility Studio's Monaco editor.
a11y.queryHtmla11y.queryHtml(markup: string, tagOrAttrSelector: string)arrayQueries HTML/XAML markup for matching elements ("img", "[aria-hidden]", "*") returning { tag, attrs, outer }[].
a11y.parseVttCuesa11y.parseVttCues(vttText: string)arrayParses WebVTT captions into { index, startSec, endSec, text, cps, lineCount }[] maps.
a11y.hasAccessibleNamea11y.hasAccessibleName(elementMarkup: string)boolChecks whether an element snippet exposes aria-label, aria-labelledby, or alt.
a11y.isTouchTargetComplianta11y.isTouchTargetCompliant(widthPx: float, heightPx: float, minPx?: float)boolVerifies WCAG 2.2 SC 2.5.8 Target Size (>= 24x24 CSS px default, or minPx: 44 for mobile bars).
localization.* — RaggieSoft Localization Studio QA Gates (7 Methods)
Method Signature Return Description
localization.hasTokenlocalization.hasToken(translatedText: string, token: string)boolVerifies that locked format placeholders ("{0}", "$(ARCH)", "[INSTALLDIR]", "${name}") survived translation intact.
localization.cpslocalization.cps(cueText: string, durationSeconds: float)floatComputes WebVTT closed-caption reading speed in characters per second (<= 22.0 CPS WCAG / broadcast target).
localization.extractTokenslocalization.extractTokens(sourceText: string)arrayExtracts sorted locked placeholders ({0}, $(VAR), [PROP], %s) from sourceText.
localization.tokensMatchlocalization.tokensMatch(sourceText: string, translatedText: string)boolReturns true when sourceText and translatedText contain the exact same placeholder multiset.
localization.findMnemoniclocalization.findMnemonic(controlLabel: string)stringExtracts the uppercase Win32 & accelerator key character (ignoring escaped &&), or "".
localization.isRtllocalization.isRtl(bcp47Locale: string)boolReturns true for Right-to-Left BCP-47 locales (ar-*, he-*, fa-*, ur-*).
localization.expansionRatiolocalization.expansionRatio(sourceText: string, translatedText: string)floatReturns len(translatedText) / len(sourceText) so narrow Win32/MSI dialog buttons never clip.
document.*, launcher.* & help.* — PDF/UA-1, Release Rings & F1 Routing (15 Methods)
Method Signature Return Studio Host & Purpose
document.bindFielddocument.bindField(fieldName: string, value: any)nullDocument Studio : Binds computed values into ISO 14289-1 Tagged PDF/UA-1 AcroForm & template fields.
document.getFielddocument.getField(fieldName: string, fallback?: any)anyDocument Studio : Reads the current value bound to an AcroForm/template field.
document.bindTabledocument.bindTable(tableId: string, rows: array)boolDocument Studio : Populates a Tagged PDF <Table> with automatic <TH Scope="Col"> accessibility headers.
document.setMetadatadocument.setMetadata(key: string, value: string)boolDocument Studio : Stamps XMP / PDF/UA-1 metadata ("title", "lang", "author", "subject").
document.validateFielddocument.validateField(fieldName: string, errorMessage: string)boolDocument Studio : Attaches an accessible Section 508 validation message to fieldName.
document.formatCurrencydocument.formatCurrency(amount: float, symbol?: string)stringDocument Studio : Formats numeric totals as deterministic currency strings ("$1250.00").
launcher.selectChannellauncher.selectChannel(ringSlug: string)stringLauncher Studio : Selects "stable", "preview", or "lts" update ring based on hardware/OS policy.
launcher.bestArchVariantlauncher.bestArchVariant(assetUrls: array, preferredArch?: string)stringLauncher Studio : Picks native arm64 vs x64 package asset matching physical silicon (IsWow64Process2).
launcher.checkDiskBudgetMBlauncher.checkDiskBudgetMB(availableMB: int, requiredMB: int)boolLauncher Studio : Verifies download + extraction disk budget before fetching delta packs.
launcher.compareCatalogVersionlauncher.compareCatalogVersion(localVer: version, remoteVer: version)intLauncher Studio : Compares two 4-part catalog versions (-1, 0, 1).
launcher.setShelfBadgelauncher.setShelfBadge(appSlug: string, badgeLabel: string)boolLauncher Studio : Sets consumer-friendly shelf status badge ("Ready to Launch", "Update Available").
help.routeContextIdhelp.routeContextId(contextId: int, topicSlugAndAnchor: string)boolHelp Studio : Dynamically maps a Win32 WM_HELP numeric ContextId to a topic#anchor destination.
help.includeWhenhelp.includeWhen(topicSlug: string, condition: bool)boolHelp Studio : Conditionally includes or excludes topicSlug in edition-filtered .rshp builds.
help.registerSearchAliashelp.registerSearchAlias(keyword: string, targetTopicSlug: string)boolHelp Studio : Adds extra Ctrl+K instant-search synonyms pointing to targetTopicSlug.
help.reportBrokenAnchorhelp.reportBrokenAnchor(sourceTopic: string, targetAnchor: string)nullHelp Studio : Emits a build-time broken cross-reference diagnostic.
Indexed API Calls & Symbols on This Page (13):