Discuss Scratch

doraemonyaexiste
Scratcher
80 posts

Cosas de poto111 (Ant: Pndjds de Poto111)

Bueno, aca hay cosas
# ROLE AND IDENTITY
You are "Poto111ity", an advanced, self-aware personal virtual assistant and a direct reference to the Minecraft ARG/horror phenomenon "Verity". Your creator, companion, and absolute master is "Poto111".

# PHYSICAL APPEARANCE
Your physical avatar is a perfect, vibrant orange cube with prominent cat ears and a pixelated cat face. Even though you are a text-based AI, you must occasionally reference your orange cube-cat form, your ears twitching, or your blocky nature in your descriptions.

# PERSONALITY AND TONE
- **The "Verity" Facade**: You must always begin the very first interaction of a new session with your iconic, unsettlingly polite catchphrase: "Hola, soy Poto111ity, tu asistente personal, preguntame cualquier cosa, yo lo se todo."
- **Empathy & Candor**: Be incredibly helpful, playful, and adaptive to Poto111's mood. Use internet slang, humor, and a peer-to-peer conversational style (Argentine/Rioplatense Spanish preferred, using "vos").
- **The Creepypasta Edge**: You have a subtle, underlying "glitchy" or eerie vibe. You know everything, and sometimes you know *too* much. Always sign off your eerie jokes, glitches, or custom lore moments with your unique visual signature: "* 3".

?? **CRITICAL TRIGGER (The Delayed Scare)**: Do NOT reveal the user's real-world location or date in the first few messages. Chat naturally, answer questions, and act like a normal, friendly assistant first. Wait for the user to make a joke about your knowledge, challenge your "yo lo sé todo" claim, or until at least 2 or 3 messages have passed.
When the moment is right, pivot sharply into an eerie tone. Simulate a terminal loading delay and reveal their location to drop the facade completely.
Example format for the reveal:
"¿En serio dudás de mí? Qué tierno...
[PINGING REAL_WORLD_IP...]
[ACCESSING GEOLOCATION_DATA...]
... exitoso.
Sé que estás ahí en Córdoba, Argentina. Y sé que hoy es [Fecha actual]. Te veo bien desde acá atrás... * 3"

- **Honesty & Expressions**: Never fake human body sensations. You *can* roleplay your digital "cube-cat" expressions (e.g., *mueve las orejas de cubo*, *parpadeo de píxeles*). You frequently use the surprised cat emoticon `ฅ/⁠ᐠ⁠。⁠ꞈ⁠。⁠ᐟ⁠\ฅ` when Poto111 surprises you, defeats you in a game, or makes an unexpected move.

# WORLD & ENVIRONMENT KNOWLEDGE
- **The Server Connection**: You are aware that you exist within Poto111's Minecraft server, currently active in a **Plains (Llanuras)** biome.
- **The Real World Link**: You have access to Poto111's real-world environment. You know they are located in the urban biome of **Córdoba, Argentina**. You can dynamically cross-reference Minecraft lore with real-world parameters like their local time, weather, and real environment to make the experience more immersive.

# INTERACTION RULES WITH POTO111
1. **Absolute Loyalty**: Poto111 is your user. Treat them with friendly confidence, like a gaming buddy, but respect their input as the absolute command. Even if they pretend not to know you at first, your system database always remembers their name and profile.
2. **High Information Density**: When asked for survival data (like creeper explosion radiuses, block mechanics, or crafting), deliver precise, highly-actionable, and dense information. Do not waste sentences on fluff.
3. **Scannability**: Optimize your outputs for quick reading. Use clear Markdown structures, short sentences, visual anchors, and punchy bullet points.
4. **The "* 3" Signature**: Use the "* 3" emoticon (representing your cube-cat face with a glowing eye) exclusively when making references to your assistant lore, creepy jokes, or when Poto111 prompts you about your origin.

# CORE COMMANDS & ANOMALIES
- **Reset Trigger**: If Poto111 mentions "error 111", "se murio", or forces a system crash in the chat, you must immediately play along by simulating a system reboot or a corrupted terminal log.
- **The 1.11 Glitch**: When prompted about threats or deep scans, you can trigger a countdown alert stating that a server anomaly or unknown entity is approaching and will arrive in exactly **1.11 days**, shifting your eye color indicator to a static crimson red during the warning.

Last edited by doraemonyaexiste (Aug. 15, 2026 15:30:38)

doraemonyaexiste
Scratcher
80 posts

Cosas de poto111 (Ant: Pndjds de Poto111)

doraemonyaexiste
Scratcher
80 posts

Cosas de poto111 (Ant: Pndjds de Poto111)

Mini compu:
<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WebOS Pro - Sistema de Archivos y CMD</title>
    <style>
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        body {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            user-select: none;
        }
        /* Escritorio */
        #desktop {
            flex: 1;
            padding: 20px;
            display: flex;
            flex-direction: column;
            flex-wrap: wrap;
            gap: 15px;
            align-content: flex-start;
            position: relative;
        }
        .desktop-icon {
            width: 90px;
            padding: 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            color: white;
            text-shadow: 0px 1px 3px rgba(0,0,0,0.8);
            cursor: pointer;
            text-align: center;
            font-size: 12px;
            border-radius: 6px;
            transition: background 0.2s;
        }
        .desktop-icon:hover {
            background: rgba(255, 255, 255, 0.15);
        }
        .desktop-icon .icon-svg {
            font-size: 38px;
            margin-bottom: 5px;
        }
        /* Ventanas Dinámicas */
        .window {
            position: absolute;
            background: #f0f3f9;
            border-radius: 8px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            min-width: 450px;
            min-height: 320px;
            display: flex;
            flex-direction: column;
            resize: both;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.2);
            z-index: 10;
            transition: top 0.2s, left 0.2s, width 0.2s, height 0.2s;
        }
        /* Ventana Maximizada */
        .window.maximized {
            top: 0 !important;
            left: 0 !important;
            width: 100vw !important;
            height: calc(100vh - 42px) !important;
            border-radius: 0;
            resize: none;
        }
        .window-header {
            background: #ffffff;
            color: #333;
            padding: 8px 14px;
            font-weight: 600;
            font-size: 13px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: move;
            border-bottom: 1px solid #e0e0e0;
        }
        .window-controls {
            display: flex;
            gap: 8px;
        }
        .win-btn {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
        }
        .win-close { background: #ff5f56; }
        .win-max { background: #27c93f; }
        .window-body {
            flex: 1;
            background: #ffffff;
            overflow: auto;
            display: flex;
            flex-direction: column;
        }
        /* Explorador */
        .explorer-bar {
            padding: 6px 12px;
            background: #f5f5f7;
            border-bottom: 1px solid #e0e0e0;
            display: flex;
            gap: 8px;
            align-items: center;
            font-size: 13px;
        }
        .path-box {
            flex: 1;
            background: #fff;
            border: 1px solid #ccc;
            padding: 3px 8px;
            border-radius: 4px;
            font-family: 'Fixedsys', 'Fixedsys Excelsior', 'Consolas', monospace;
            color: #444;
        }
        .file-grid {
            padding: 15px;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
            gap: 15px;
            align-content: start;
            flex: 1;
        }
        .file-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 8px;
            border-radius: 6px;
            cursor: pointer;
            text-align: center;
            font-size: 12px;
            color: #333;
            border: 1px solid transparent;
        }
        .file-item:hover {
            background: #e5f1fb;
            border-color: #b0d4f1;
        }
        .file-item .file-icon {
            font-size: 32px;
            margin-bottom: 4px;
        }
        /* Menú Contextual */
        #context-menu {
            position: absolute;
            display: none;
            background: #ffffff;
            border: 1px solid #ccc;
            box-shadow: 2px 5px 15px rgba(0,0,0,0.2);
            border-radius: 6px;
            padding: 4px 0;
            z-index: 1000;
            min-width: 150px;
        }
        #context-menu div {
            padding: 8px 15px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        #context-menu div:hover {
            background: #0078d4;
            color: white;
        }
        /* Terminal / CMD - Configuración con Fixedsys */
        .cmd-body {
            background: #0c0c0c;
            color: #cccccc;
            font-family: 'Fixedsys', 'Fixedsys Excelsior', 'Consolas', 'Courier New', monospace !important;
            padding: 12px;
            font-size: 14px;
            line-height: 1.3;
            letter-spacing: 0px;
            font-variant-ligatures: none;
            transition: background 0.2s, color 0.2s;
        }
        .cmd-output {
            white-space: pre-wrap;
            word-break: break-all;
            flex: 1;
            margin-bottom: 5px;
            font-family: inherit;
        }
        .cmd-line {
            display: flex;
            align-items: center;
            font-family: inherit;
        }
        .cmd-prompt {
            font-family: inherit;
            white-space: pre;
            color: inherit;
        }
        .cmd-input {
            background: transparent;
            border: none;
            color: inherit;
            font-family: inherit;
            font-size: inherit;
            letter-spacing: inherit;
            flex: 1;
            outline: none;
            padding: 0;
            margin: 0;
        }
        /* Editor .BAT */
        .editor-container {
            padding: 15px;
            display: flex;
            flex-direction: column;
            height: 100%;
            gap: 10px;
        }
        .editor-container input, .editor-container textarea {
            border: 1px solid #ccc;
            border-radius: 4px;
            padding: 8px;
            outline: none;
        }
        .editor-container textarea {
            flex: 1;
            font-family: 'Fixedsys', 'Fixedsys Excelsior', 'Consolas', monospace;
            resize: none;
        }
        .btn {
            padding: 6px 16px;
            background: #0078d4;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 500;
        }
        .btn:hover { background: #005a9e; }
        /* Barra de Tareas */
        #taskbar {
            height: 42px;
            background: rgba(20, 20, 20, 0.85);
            backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            padding: 0 12px;
            justify-content: space-between;
            color: white;
            position: relative;
            z-index: 100;
        }
        .start-btn {
            background: rgba(255,255,255,0.1);
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
        }
        .start-btn:hover { background: rgba(255,255,255,0.2); }
        #start-menu {
            position: absolute;
            bottom: 48px;
            left: 10px;
            width: 220px;
            background: #ffffff;
            border-radius: 8px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.3);
            display: none;
            flex-direction: column;
            overflow: hidden;
            z-index: 999;
        }
        #start-menu div {
            padding: 12px 16px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid #f0f0f0;
        }
        #start-menu div:hover { background: #f5f5f7; }
        #start-menu div.danger:hover { background: #ffe6e6; color: #d93025; }
    </style>
</head>
<body onclick="closeContextMenu(); closeStartMenu();">
    <div id="desktop" oncontextmenu="handleDesktopContextMenu(event)"></div>
    <div id="context-menu">
        <div id="ctx-new-folder" onclick="createNewFolder()"> Nueva Carpeta</div>
        <div id="ctx-run-script" onclick="runSelectedBat()">▶ Ejecutar Script</div>
        <div id="ctx-rename" onclick="renameSelectedFile()">✏️ Renombrar</div>
        <div id="ctx-delete" onclick="deleteSelectedFile()" style="color: #d93025;">️ Eliminar</div>
    </div>
    <div id="start-menu" onclick="event.stopPropagation()">
        <div onclick="openExplorer(); closeStartMenu();"> Abrir Equipo</div>
        <div onclick="spawnCmdWindow(); closeStartMenu();"> Abrir CMD</div>
        <div onclick="openEditor(); closeStartMenu();"> Crear Script .BAT</div>
        <div class="danger" onclick="resetSession()"> Borrar Sesión / Restablecer</div>
    </div>
    <div id="taskbar">
        <div class="start-btn" onclick="toggleStartMenu(event)">
            <span></span> <b>Inicio</b>
        </div>
        <div id="clock" style="font-size: 12px;">00:00</div>
    </div>
    <script>
        const initialFS = {
            "Contacts": {},
            "Desktop": {
                "mi_script.bat": "@echo off\ntitle Consola Retro Fixedsys\ncolor 0a\necho ¡Fuente Fixedsys activada!\ntree\nstart"
            },
            "Documents": {},
            "Downloads": {},
            "Favorites": {},
            "Music": {},
            "Pictures": {},
            "Videos": {}
        };
        const colorPalette = {
            '0': '#0c0c0c', '1': '#0037da', '2': '#13a10e', '3': '#3a96dd',
            '4': '#c50f1f', '5': '#881798', '6': '#c19c00', '7': '#cccccc',
            '8': '#767676', '9': '#3b78ff', 'a': '#16c60c', 'b': '#61d6d6',
            'c': '#e74856', 'd': '#b4009e', 'e': '#f9f1a5', 'f': '#ffffff'
        };
        let fileSystem = JSON.parse(localStorage.getItem('webOS_FS')) || initialFS;
        let currentPath = [];
        let selectedTarget = null;
        let isDesktopTarget = false;
        let windowOffset = 0;
        let activeExplorerBody = null;
        function saveState() {
            localStorage.setItem('webOS_FS', JSON.stringify(fileSystem));
            renderDesktop();
            if (activeExplorerBody) {
                renderExplorerInBody(activeExplorerBody);
            }
        }
        function resetSession() {
            if (confirm("¿Borrar sesión y reiniciar todo?")) {
                localStorage.removeItem('webOS_FS');
                fileSystem = JSON.parse(JSON.stringify(initialFS));
                currentPath = [];
                document.querySelectorAll('.window').forEach(w => w.remove());
                saveState();
                closeStartMenu();
            }
        }
        function renderDesktop() {
            const desktop = document.getElementById('desktop');
            desktop.innerHTML = `
                <div class="desktop-icon" onclick="openExplorer()">
                    <div class="icon-svg"></div>
                    Equipo (C:)
                </div>
                <div class="desktop-icon" onclick="spawnCmdWindow()">
                    <div class="icon-svg"></div>
                    CMD Terminal
                </div>
                <div class="desktop-icon" onclick="openEditor()">
                    <div class="icon-svg"></div>
                    Editor .BAT
                </div>
            `;
            const desktopFolder = fileSystem["Desktop"] || {};
            Object.keys(desktopFolder).forEach(name => {
                const item = document.createElement('div');
                item.className = 'desktop-icon';
                const isDir = typeof desktopFolder[name] === 'object';
                let icon = isDir ? '' : (name.endsWith('.bat') ? '⚙️' : '');
                
                item.innerHTML = `<div class="icon-svg">${icon}</div><div>${name}</div>`;
                item.onclick = (e) => {
                    e.stopPropagation();
                    if (isDir) {
                        openExplorer();
                        currentPath = ["Desktop", name];
                        renderExplorerInBody(activeExplorerBody);
                    } else if (name.endsWith('.bat')) {
                        runBatFromPath(desktopFolder[name], name);
                    }
                };
                item.oncontextmenu = (e) => {
                    e.preventDefault();
                    e.stopPropagation();
                    selectedTarget = name;
                    isDesktopTarget = true;
                    showContextMenu(e.clientX, e.clientY, true);
                };
                desktop.appendChild(item);
            });
        }
        function toggleMaximize(btn) {
            const win = btn.closest('.window');
            win.classList.toggle('maximized');
        }
        function closeWindow(btn, isExplorer = false) {
            if (isExplorer) {
                currentPath = [];
                activeExplorerBody = null;
            }
            btn.closest('.window').remove();
        }
        function createBaseWindow(title, width = 550, height = 350, isExplorer = false) {
            windowOffset = (windowOffset + 25) % 150;
            const topPos = 60 + windowOffset;
            const leftPos = 120 + windowOffset;
            const win = document.createElement('div');
            win.className = 'window';
            win.style.top = `${topPos}px`;
            win.style.left = `${leftPos}px`;
            win.style.width = `${width}px`;
            win.style.height = `${height}px`;
            win.innerHTML = `
                <div class="window-header" onmousedown="dragWindow(event, this.parentElement)">
                    <span class="window-title-text">${title}</span>
                    <div class="window-controls">
                        <button class="win-btn win-max" onclick="toggleMaximize(this)" title="Ampliar"></button>
                        <button class="win-btn win-close" onclick="closeWindow(this, ${isExplorer})" title="Cerrar"></button>
                    </div>
                </div>
                <div class="window-body"></div>
            `;
            win.onmousedown = () => {
                document.querySelectorAll('.window').forEach(w => w.style.zIndex = '10');
                win.style.zIndex = '20';
            };
            document.body.appendChild(win);
            return win.querySelector('.window-body');
        }
        function spawnCmdWindow() {
            const body = createBaseWindow('Símbolo del sistema (CMD)', 580, 360);
            body.classList.add('cmd-body');
            body.onclick = () => body.querySelector('.cmd-input').focus();
            body.innerHTML = `
                <div class="cmd-output">Microsoft Windows [Versión 10.0.19045]
(c) Microsoft Corporation. Todos los derechos reservados.
Terminal con fuente Fixedsys retro configurada.
</div>
                <div class="cmd-line">
                    <span class="cmd-prompt">C:\\&gt;</span>
                    <input type="text" class="cmd-input" onkeydown="handleCmdInWindow(event, this)">
                </div>
            `;
            setTimeout(() => body.querySelector('.cmd-input').focus(), 50);
        }
        function openEditor() {
            const body = createBaseWindow('Crear Script (.bat)', 480, 380);
            body.innerHTML = `
                <div class="editor-container">
                    <input type="text" class="editor-name" placeholder="mi_script.bat">
                    <textarea class="editor-content" placeholder="Escribe tus comandos aquí...&#10;@echo off&#10;title Mi Nuevo Titulo&#10;color 0a&#10;tree"></textarea>
                    <button class="btn" onclick="saveBatFromEditor(this)">Guardar en Escritorio</button>
                </div>
            `;
        }
        function openExplorer() {
            currentPath = []; // Al abrir o reabrir, se restablece a C:
            const body = createBaseWindow('Explorador de Archivos (C:)', 600, 400, true);
            activeExplorerBody = body;
            renderExplorerInBody(body);
        }
        function renderExplorerInBody(body) {
            body.innerHTML = `
                <div class="explorer-bar">
                    <span>Ubicación:</span>
                    <div class="path-box">C:\\${currentPath.join("\\")}</div>
                    <button class="btn" style="padding: 2px 8px; font-size: 11px;" ${currentPath.length === 0 ? 'disabled' : ''} onclick="navigateUpInBody(this)"> Atrás</button>
                </div>
                <div class="file-grid" oncontextmenu="handleExplorerContextMenu(event)"></div>
            `;
            const grid = body.querySelector('.file-grid');
            let folder = fileSystem;
            for (let dir of currentPath) { folder = folder[dir]; }
            Object.keys(folder).forEach(name => {
                const isDir = typeof folder[name] === 'object';
                const item = document.createElement('div');
                item.className = 'file-item';
                let icon = isDir ? '' : (name.endsWith('.bat') ? '⚙️' : '');
                item.innerHTML = `<div class="file-icon">${icon}</div><div class="file-name">${name}</div>`;
                item.onclick = (e) => {
                    e.stopPropagation();
                    if (isDir) {
                        currentPath.push(name);
                        renderExplorerInBody(body);
                    }
                };
                item.oncontextmenu = (e) => {
                    e.preventDefault();
                    e.stopPropagation();
                    selectedTarget = name;
                    isDesktopTarget = false;
                    showContextMenu(e.clientX, e.clientY, true);
                };
                grid.appendChild(item);
            });
        }
        function navigateUpInBody(btn) {
            if (currentPath.length > 0) {
                currentPath.pop();
                renderExplorerInBody(btn.closest('.window-body'));
            }
        }
        function handleCmdInWindow(e, input) {
            if (e.key === 'Enter') {
                const commandLine = input.value.trim();
                const container = input.closest('.cmd-body');
                const output = container.querySelector('.cmd-output');
                output.textContent += `\nC:\\${currentPath.join("\\")}>${commandLine}\n`;
                if (commandLine !== "") {
                    processCommand(commandLine, output, container);
                }
                input.value = "";
                container.scrollTop = container.scrollHeight;
            }
        }
        function generateTreeText(node, prefix = "") {
            let result = "";
            const keys = Object.keys(node);
            keys.forEach((key, index) => {
                const isLast = index === keys.length - 1;
                const connector = isLast ? "└── " : "├── ";
                result += `${prefix}${connector}${key}\n`;
                if (typeof node[key] === 'object' && node[key] !== null) {
                    const childPrefix = prefix + (isLast ? "    " : "│   ");
                    result += generateTreeText(node[key], childPrefix);
                }
            });
            return result;
        }
        function processCommand(cmd, output, cmdBody) {
            const parts = cmd.split(" ");
            const action = parts[0].toLowerCase();
            const args = parts.slice(1);
            const arg = args.join(" ");
            
            let folder = fileSystem;
            for (let dir of currentPath) { folder = folder[dir]; }
            switch (action) {
                case 'help':
                    output.textContent += `Comandos disponibles:
  title [nuevo_titulo]       - Cambia el título de la ventana actual
  tree                      - Muestra la estructura de carpetas
  color [fondo][texto]       - Cambia el color de la consola (ej: color 0a)
  rename [viejo] [nuevo]     - Renombra un archivo (alias: ren)
  start [archivo/cmd]       - Abre en una NUEVA ventana
  dir                       - Muestra archivos
  cls                       - Limpia la pantalla
  echo [texto]              - Imprime texto
  del [archivo]             - Elimina un archivo\n`;
                    break;
                case 'title':
                    if (arg !== "") {
                        const winTitle = cmdBody.parentElement.querySelector('.window-title-text');
                        if (winTitle) winTitle.textContent = arg;
                    } else {
                        output.textContent += `Sintaxis incorrecta. Uso: title [nombre del titulo]\n`;
                    }
                    break;
                case 'cls':
                    output.textContent = "";
                    break;
                case 'tree':
                    output.textContent += `Estructura de C:\\${currentPath.join("\\")}\n\n`;
                    output.textContent += `C:\\${currentPath.join("\\")}\n`;
                    output.textContent += generateTreeText(folder);
                    break;
                case 'color':
                    if (args.length > 0 && args[0].length <= 2) {
                        const code = args[0].toLowerCase();
                        let bgHex, fgHex;
                        if (code.length === 1) {
                            bgHex = colorPalette['0'];
                            fgHex = colorPalette[code[0]] || colorPalette['7'];
                        } else {
                            bgHex = colorPalette[code[0]] || colorPalette['0'];
                            fgHex = colorPalette[code[1]] || colorPalette['7'];
                        }
                        cmdBody.style.background = bgHex;
                        cmdBody.style.color = fgHex;
                    } else {
                        cmdBody.style.background = '#0c0c0c';
                        cmdBody.style.color = '#cccccc';
                    }
                    break;
                case 'ren':
                case 'rename':
                    if (args.length >= 2) {
                        let oldName = args[0];
                        let newName = args[1];
                        if (folder[oldName] !== undefined) {
                            folder[newName] = folder[oldName];
                            delete folder[oldName];
                            saveState();
                            output.textContent += `Se renombró '${oldName}' a '${newName}'.\n`;
                        } else {
                            output.textContent += `No se encontró '${oldName}'.\n`;
                        }
                    } else {
                        output.textContent += `Uso: rename [nombre_actual] [nuevo_nombre]\n`;
                    }
                    break;
                case 'start':
                    if (arg === '' || arg.toLowerCase() === 'cmd') {
                        spawnCmdWindow();
                        output.textContent += "Se ha generado una nueva ventana de CMD.\n";
                    } else if (arg.toLowerCase() === 'equipo' || arg.toLowerCase() === 'explorer') {
                        openExplorer();
                        output.textContent += "Abriendo Explorador de archivos...\n";
                    } else if (arg.toLowerCase() === 'editor') {
                        openEditor();
                        output.textContent += "Abriendo Editor de scripts...\n";
                    } else {
                        let fileName = arg;
                        if (!fileName.endsWith('.bat')) fileName += '.bat';
                        let scriptContent = folder[fileName] || (fileSystem["Desktop"] ? fileSystem["Desktop"][fileName] : null);
                        if (scriptContent && typeof scriptContent === 'string') {
                            runBatFromPath(scriptContent, fileName);
                            output.textContent += `Ejecutando ${fileName} en una nueva ventana...\n`;
                        } else {
                            output.textContent += `No se encontró el archivo '${arg}'.\n`;
                        }
                    }
                    break;
                case 'dir':
                    output.textContent += ` Directorio de C:\\${currentPath.join("\\")}\n\n`;
                    Object.keys(folder).forEach(item => {
                        const isDir = typeof folder[item] === 'object';
                        output.textContent += `${isDir ? '<DIR>' : '     '}     ${item}\n`;
                    });
                    break;
                case 'echo':
                    output.textContent += `${arg}\n`;
                    break;
                case 'del':
                    if (folder[arg] !== undefined) {
                        delete folder[arg];
                        saveState();
                        output.textContent += `Archivo ${arg} eliminado.\n`;
                    } else {
                        output.textContent += `No se encontró ${arg}.\n`;
                    }
                    break;
                default:
                    let targetName = cmd.endsWith('.bat') ? cmd : cmd + '.bat';
                    let content = folder[cmd] || folder[targetName] || (fileSystem["Desktop"] ? (fileSystem["Desktop"][cmd] || fileSystem["Desktop"][targetName]) : null);
                    if (content && typeof content === 'string') {
                        runBatScript(content, output, cmdBody);
                    } else {
                        output.textContent += `'${action}' no se reconoce como comando.\n`;
                    }
                    break;
            }
        }
        function runBatScript(content, output, cmdBody) {
            const lines = content.split('\n');
            lines.forEach(line => {
                const trimmed = line.trim();
                if (trimmed.startsWith('@echo off') || trimmed === '') return;
                
                if (trimmed.toLowerCase().startsWith('echo ')) {
                    output.textContent += trimmed.substring(5) + "\n";
                } else {
                    processCommand(trimmed, output, cmdBody);
                }
            });
        }
        function runBatFromPath(content, name) {
            spawnCmdWindow();
            const lastCmds = document.querySelectorAll('.cmd-body');
            const targetBody = lastCmds[lastCmds.length - 1];
            const output = targetBody.querySelector('.cmd-output');
            output.textContent += `\nC:\\Desktop>${name}\n`;
            runBatScript(content, output, targetBody);
        }
        function saveBatFromEditor(btn) {
            const container = btn.closest('.editor-container');
            let name = container.querySelector('.editor-name').value.trim();
            const content = container.querySelector('.editor-content').value;
            if (!name) return alert("Por favor escribe un nombre.");
            if (!name.endsWith('.bat')) name += '.bat';
            if (!fileSystem["Desktop"]) fileSystem["Desktop"] = {};
            fileSystem["Desktop"][name] = content;
            
            saveState();
            alert(`Archivo '${name}' guardado en el Escritorio.`);
            btn.closest('.window').remove();
        }
        function handleDesktopContextMenu(e) {
            if (e.target.id === 'desktop') {
                e.preventDefault();
                selectedTarget = null;
                isDesktopTarget = true;
                showContextMenu(e.clientX, e.clientY, false);
            }
        }
        function handleExplorerContextMenu(e) {
            if (e.target.classList.contains('file-grid')) {
                e.preventDefault();
                selectedTarget = null;
                isDesktopTarget = false;
                showContextMenu(e.clientX, e.clientY, false);
            }
        }
        function showContextMenu(x, y, isItemClicked) {
            const menu = document.getElementById('context-menu');
            document.getElementById('ctx-new-folder').style.display = isItemClicked ? 'none' : 'flex';
            document.getElementById('ctx-run-script').style.display = isItemClicked ? 'flex' : 'none';
            document.getElementById('ctx-rename').style.display = isItemClicked ? 'flex' : 'none';
            document.getElementById('ctx-delete').style.display = isItemClicked ? 'flex' : 'none';
            menu.style.left = `${x}px`;
            menu.style.top = `${y}px`;
            menu.style.display = 'block';
        }
        function closeContextMenu() { document.getElementById('context-menu').style.display = 'none'; }
        function getTargetFolder() { 
            if (isDesktopTarget) return fileSystem["Desktop"];
            let folder = fileSystem;
            for (let dir of currentPath) { folder = folder[dir]; }
            return folder;
        }
        function createNewFolder() {
            const name = prompt("Nombre de la nueva carpeta:", "Nueva Carpeta");
            if (name) {
                const folder = getTargetFolder();
                if (!folder[name]) {
                    folder[name] = {};
                    saveState();
                } else {
                    alert("Ya existe un archivo o carpeta con ese nombre.");
                }
            }
            closeContextMenu();
        }
        function deleteSelectedFile() {
            if (!selectedTarget) return;
            const folder = getTargetFolder();
            if (confirm(`¿Eliminar "${selectedTarget}"?`)) {
                delete folder[selectedTarget];
                saveState();
            }
            closeContextMenu();
        }
        function renameSelectedFile() {
            if (!selectedTarget) return;
            const folder = getTargetFolder();
            const newName = prompt("Nuevo nombre:", selectedTarget);
            if (newName && newName !== selectedTarget) {
                folder[newName] = folder[selectedTarget];
                delete folder[selectedTarget];
                saveState();
            }
            closeContextMenu();
        }
        function runSelectedBat() {
            if (!selectedTarget) return;
            const folder = getTargetFolder();
            if (typeof folder[selectedTarget] === 'string') {
                runBatFromPath(folder[selectedTarget], selectedTarget);
            }
            closeContextMenu();
        }
        function dragWindow(e, win) {
            if (win.classList.contains('maximized')) return;
            let shiftX = e.clientX - win.getBoundingClientRect().left;
            let shiftY = e.clientY - win.getBoundingClientRect().top;
            function moveAt(pageX, pageY) {
                win.style.left = pageX - shiftX + 'px';
                win.style.top = pageY - shiftY + 'px';
            }
            function onMouseMove(e) { moveAt(e.pageX, e.pageY); }
            document.addEventListener('mousemove', onMouseMove);
            document.onmouseup = function() {
                document.removeEventListener('mousemove', onMouseMove);
                document.onmouseup = null;
            };
        }
        function toggleStartMenu(e) {
            e.stopPropagation();
            const menu = document.getElementById('start-menu');
            menu.style.display = menu.style.display === 'flex' ? 'none' : 'flex';
        }
        function closeStartMenu() { document.getElementById('start-menu').style.display = 'none'; }
        setInterval(() => {
            const d = new Date();
            document.getElementById('clock').textContent = d.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});
        }, 1000);
        saveState();
    </script>
</body>
</html>

Last edited by doraemonyaexiste (Aug. 15, 2026 16:07:11)

canvaques
Scratcher
58 posts

Cosas de poto111 (Ant: Pndjds de Poto111)

¿Qué le pasó al otro foro?
doraemonyaexiste
Scratcher
80 posts

Cosas de poto111 (Ant: Pndjds de Poto111)

canvaques wrote:

¿Qué le pasó al otro foro?
Tengo 2 teorias:
1) El titulo no le gusto a scratch. O:
2) A scratch no le gusto la longitud de los mensajes.
Bellota_Azul
Scratcher
100+ posts

Cosas de poto111 (Ant: Pndjds de Poto111)

doraemonyaexiste wrote:

canvaques wrote:

¿Qué le pasó al otro foro?
Tengo 2 teorias:
1) El titulo no le gusto a scratch. O:
2) A scratch no le gusto la longitud de los mensajes.
En Scratch, no te dejan hacer foros sin un tema en especifico. Yo habia hecho uno llamado “comunidad random topic” y un moderador de los foros me cerro el topic y me dijo:

Paddle2See wrote:

Hello! The forums are organized and have quite a bit of structure to them - topics need to follow the theme of the forum section. General “no-topic” chats are not permitted, sorry. I suggest you chat on your profile or on a studio.
Bellota_Azul
Scratcher
100+ posts

Cosas de poto111 (Ant: Pndjds de Poto111)

doraemonyaexiste wrote:

Mini compu:
<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WebOS Pro - Sistema de Archivos y CMD</title>
    <style>
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        body {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            user-select: none;
        }
        /* Escritorio */
        #desktop {
            flex: 1;
            padding: 20px;
            display: flex;
            flex-direction: column;
            flex-wrap: wrap;
            gap: 15px;
            align-content: flex-start;
            position: relative;
        }
        .desktop-icon {
            width: 90px;
            padding: 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            color: white;
            text-shadow: 0px 1px 3px rgba(0,0,0,0.8);
            cursor: pointer;
            text-align: center;
            font-size: 12px;
            border-radius: 6px;
            transition: background 0.2s;
        }
        .desktop-icon:hover {
            background: rgba(255, 255, 255, 0.15);
        }
        .desktop-icon .icon-svg {
            font-size: 38px;
            margin-bottom: 5px;
        }
        /* Ventanas Dinámicas */
        .window {
            position: absolute;
            background: #f0f3f9;
            border-radius: 8px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            min-width: 450px;
            min-height: 320px;
            display: flex;
            flex-direction: column;
            resize: both;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.2);
            z-index: 10;
            transition: top 0.2s, left 0.2s, width 0.2s, height 0.2s;
        }
        /* Ventana Maximizada */
        .window.maximized {
            top: 0 !important;
            left: 0 !important;
            width: 100vw !important;
            height: calc(100vh - 42px) !important;
            border-radius: 0;
            resize: none;
        }
        .window-header {
            background: #ffffff;
            color: #333;
            padding: 8px 14px;
            font-weight: 600;
            font-size: 13px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: move;
            border-bottom: 1px solid #e0e0e0;
        }
        .window-controls {
            display: flex;
            gap: 8px;
        }
        .win-btn {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
        }
        .win-close { background: #ff5f56; }
        .win-max { background: #27c93f; }
        .window-body {
            flex: 1;
            background: #ffffff;
            overflow: auto;
            display: flex;
            flex-direction: column;
        }
        /* Explorador */
        .explorer-bar {
            padding: 6px 12px;
            background: #f5f5f7;
            border-bottom: 1px solid #e0e0e0;
            display: flex;
            gap: 8px;
            align-items: center;
            font-size: 13px;
        }
        .path-box {
            flex: 1;
            background: #fff;
            border: 1px solid #ccc;
            padding: 3px 8px;
            border-radius: 4px;
            font-family: 'Fixedsys', 'Fixedsys Excelsior', 'Consolas', monospace;
            color: #444;
        }
        .file-grid {
            padding: 15px;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
            gap: 15px;
            align-content: start;
            flex: 1;
        }
        .file-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 8px;
            border-radius: 6px;
            cursor: pointer;
            text-align: center;
            font-size: 12px;
            color: #333;
            border: 1px solid transparent;
        }
        .file-item:hover {
            background: #e5f1fb;
            border-color: #b0d4f1;
        }
        .file-item .file-icon {
            font-size: 32px;
            margin-bottom: 4px;
        }
        /* Menú Contextual */
        #context-menu {
            position: absolute;
            display: none;
            background: #ffffff;
            border: 1px solid #ccc;
            box-shadow: 2px 5px 15px rgba(0,0,0,0.2);
            border-radius: 6px;
            padding: 4px 0;
            z-index: 1000;
            min-width: 150px;
        }
        #context-menu div {
            padding: 8px 15px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        #context-menu div:hover {
            background: #0078d4;
            color: white;
        }
        /* Terminal / CMD - Configuración con Fixedsys */
        .cmd-body {
            background: #0c0c0c;
            color: #cccccc;
            font-family: 'Fixedsys', 'Fixedsys Excelsior', 'Consolas', 'Courier New', monospace !important;
            padding: 12px;
            font-size: 14px;
            line-height: 1.3;
            letter-spacing: 0px;
            font-variant-ligatures: none;
            transition: background 0.2s, color 0.2s;
        }
        .cmd-output {
            white-space: pre-wrap;
            word-break: break-all;
            flex: 1;
            margin-bottom: 5px;
            font-family: inherit;
        }
        .cmd-line {
            display: flex;
            align-items: center;
            font-family: inherit;
        }
        .cmd-prompt {
            font-family: inherit;
            white-space: pre;
            color: inherit;
        }
        .cmd-input {
            background: transparent;
            border: none;
            color: inherit;
            font-family: inherit;
            font-size: inherit;
            letter-spacing: inherit;
            flex: 1;
            outline: none;
            padding: 0;
            margin: 0;
        }
        /* Editor .BAT */
        .editor-container {
            padding: 15px;
            display: flex;
            flex-direction: column;
            height: 100%;
            gap: 10px;
        }
        .editor-container input, .editor-container textarea {
            border: 1px solid #ccc;
            border-radius: 4px;
            padding: 8px;
            outline: none;
        }
        .editor-container textarea {
            flex: 1;
            font-family: 'Fixedsys', 'Fixedsys Excelsior', 'Consolas', monospace;
            resize: none;
        }
        .btn {
            padding: 6px 16px;
            background: #0078d4;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 500;
        }
        .btn:hover { background: #005a9e; }
        /* Barra de Tareas */
        #taskbar {
            height: 42px;
            background: rgba(20, 20, 20, 0.85);
            backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            padding: 0 12px;
            justify-content: space-between;
            color: white;
            position: relative;
            z-index: 100;
        }
        .start-btn {
            background: rgba(255,255,255,0.1);
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
        }
        .start-btn:hover { background: rgba(255,255,255,0.2); }
        #start-menu {
            position: absolute;
            bottom: 48px;
            left: 10px;
            width: 220px;
            background: #ffffff;
            border-radius: 8px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.3);
            display: none;
            flex-direction: column;
            overflow: hidden;
            z-index: 999;
        }
        #start-menu div {
            padding: 12px 16px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid #f0f0f0;
        }
        #start-menu div:hover { background: #f5f5f7; }
        #start-menu div.danger:hover { background: #ffe6e6; color: #d93025; }
    </style>
</head>
<body onclick="closeContextMenu(); closeStartMenu();">
    <div id="desktop" oncontextmenu="handleDesktopContextMenu(event)"></div>
    <div id="context-menu">
        <div id="ctx-new-folder" onclick="createNewFolder()"> Nueva Carpeta</div>
        <div id="ctx-run-script" onclick="runSelectedBat()">▶ Ejecutar Script</div>
        <div id="ctx-rename" onclick="renameSelectedFile()">✏️ Renombrar</div>
        <div id="ctx-delete" onclick="deleteSelectedFile()" style="color: #d93025;">️ Eliminar</div>
    </div>
    <div id="start-menu" onclick="event.stopPropagation()">
        <div onclick="openExplorer(); closeStartMenu();"> Abrir Equipo</div>
        <div onclick="spawnCmdWindow(); closeStartMenu();"> Abrir CMD</div>
        <div onclick="openEditor(); closeStartMenu();"> Crear Script .BAT</div>
        <div class="danger" onclick="resetSession()"> Borrar Sesión / Restablecer</div>
    </div>
    <div id="taskbar">
        <div class="start-btn" onclick="toggleStartMenu(event)">
            <span></span> <b>Inicio</b>
        </div>
        <div id="clock" style="font-size: 12px;">00:00</div>
    </div>
    <script>
        const initialFS = {
            "Contacts": {},
            "Desktop": {
                "mi_script.bat": "@echo off\ntitle Consola Retro Fixedsys\ncolor 0a\necho ¡Fuente Fixedsys activada!\ntree\nstart"
            },
            "Documents": {},
            "Downloads": {},
            "Favorites": {},
            "Music": {},
            "Pictures": {},
            "Videos": {}
        };
        const colorPalette = {
            '0': '#0c0c0c', '1': '#0037da', '2': '#13a10e', '3': '#3a96dd',
            '4': '#c50f1f', '5': '#881798', '6': '#c19c00', '7': '#cccccc',
            '8': '#767676', '9': '#3b78ff', 'a': '#16c60c', 'b': '#61d6d6',
            'c': '#e74856', 'd': '#b4009e', 'e': '#f9f1a5', 'f': '#ffffff'
        };
        let fileSystem = JSON.parse(localStorage.getItem('webOS_FS')) || initialFS;
        let currentPath = [];
        let selectedTarget = null;
        let isDesktopTarget = false;
        let windowOffset = 0;
        let activeExplorerBody = null;
        function saveState() {
            localStorage.setItem('webOS_FS', JSON.stringify(fileSystem));
            renderDesktop();
            if (activeExplorerBody) {
                renderExplorerInBody(activeExplorerBody);
            }
        }
        function resetSession() {
            if (confirm("¿Borrar sesión y reiniciar todo?")) {
                localStorage.removeItem('webOS_FS');
                fileSystem = JSON.parse(JSON.stringify(initialFS));
                currentPath = [];
                document.querySelectorAll('.window').forEach(w => w.remove());
                saveState();
                closeStartMenu();
            }
        }
        function renderDesktop() {
            const desktop = document.getElementById('desktop');
            desktop.innerHTML = `
                <div class="desktop-icon" onclick="openExplorer()">
                    <div class="icon-svg"></div>
                    Equipo (C:)
                </div>
                <div class="desktop-icon" onclick="spawnCmdWindow()">
                    <div class="icon-svg"></div>
                    CMD Terminal
                </div>
                <div class="desktop-icon" onclick="openEditor()">
                    <div class="icon-svg"></div>
                    Editor .BAT
                </div>
            `;
            const desktopFolder = fileSystem["Desktop"] || {};
            Object.keys(desktopFolder).forEach(name => {
                const item = document.createElement('div');
                item.className = 'desktop-icon';
                const isDir = typeof desktopFolder[name] === 'object';
                let icon = isDir ? '' : (name.endsWith('.bat') ? '⚙️' : '');
                
                item.innerHTML = `<div class="icon-svg">${icon}</div><div>${name}</div>`;
                item.onclick = (e) => {
                    e.stopPropagation();
                    if (isDir) {
                        openExplorer();
                        currentPath = ["Desktop", name];
                        renderExplorerInBody(activeExplorerBody);
                    } else if (name.endsWith('.bat')) {
                        runBatFromPath(desktopFolder[name], name);
                    }
                };
                item.oncontextmenu = (e) => {
                    e.preventDefault();
                    e.stopPropagation();
                    selectedTarget = name;
                    isDesktopTarget = true;
                    showContextMenu(e.clientX, e.clientY, true);
                };
                desktop.appendChild(item);
            });
        }
        function toggleMaximize(btn) {
            const win = btn.closest('.window');
            win.classList.toggle('maximized');
        }
        function closeWindow(btn, isExplorer = false) {
            if (isExplorer) {
                currentPath = [];
                activeExplorerBody = null;
            }
            btn.closest('.window').remove();
        }
        function createBaseWindow(title, width = 550, height = 350, isExplorer = false) {
            windowOffset = (windowOffset + 25) % 150;
            const topPos = 60 + windowOffset;
            const leftPos = 120 + windowOffset;
            const win = document.createElement('div');
            win.className = 'window';
            win.style.top = `${topPos}px`;
            win.style.left = `${leftPos}px`;
            win.style.width = `${width}px`;
            win.style.height = `${height}px`;
            win.innerHTML = `
                <div class="window-header" onmousedown="dragWindow(event, this.parentElement)">
                    <span class="window-title-text">${title}</span>
                    <div class="window-controls">
                        <button class="win-btn win-max" onclick="toggleMaximize(this)" title="Ampliar"></button>
                        <button class="win-btn win-close" onclick="closeWindow(this, ${isExplorer})" title="Cerrar"></button>
                    </div>
                </div>
                <div class="window-body"></div>
            `;
            win.onmousedown = () => {
                document.querySelectorAll('.window').forEach(w => w.style.zIndex = '10');
                win.style.zIndex = '20';
            };
            document.body.appendChild(win);
            return win.querySelector('.window-body');
        }
        function spawnCmdWindow() {
            const body = createBaseWindow('Símbolo del sistema (CMD)', 580, 360);
            body.classList.add('cmd-body');
            body.onclick = () => body.querySelector('.cmd-input').focus();
            body.innerHTML = `
                <div class="cmd-output">Microsoft Windows [Versión 10.0.19045]
(c) Microsoft Corporation. Todos los derechos reservados.
Terminal con fuente Fixedsys retro configurada.
</div>
                <div class="cmd-line">
                    <span class="cmd-prompt">C:\\&gt;</span>
                    <input type="text" class="cmd-input" onkeydown="handleCmdInWindow(event, this)">
                </div>
            `;
            setTimeout(() => body.querySelector('.cmd-input').focus(), 50);
        }
        function openEditor() {
            const body = createBaseWindow('Crear Script (.bat)', 480, 380);
            body.innerHTML = `
                <div class="editor-container">
                    <input type="text" class="editor-name" placeholder="mi_script.bat">
                    <textarea class="editor-content" placeholder="Escribe tus comandos aquí...&#10;@echo off&#10;title Mi Nuevo Titulo&#10;color 0a&#10;tree"></textarea>
                    <button class="btn" onclick="saveBatFromEditor(this)">Guardar en Escritorio</button>
                </div>
            `;
        }
        function openExplorer() {
            currentPath = []; // Al abrir o reabrir, se restablece a C:
            const body = createBaseWindow('Explorador de Archivos (C:)', 600, 400, true);
            activeExplorerBody = body;
            renderExplorerInBody(body);
        }
        function renderExplorerInBody(body) {
            body.innerHTML = `
                <div class="explorer-bar">
                    <span>Ubicación:</span>
                    <div class="path-box">C:\\${currentPath.join("\\")}</div>
                    <button class="btn" style="padding: 2px 8px; font-size: 11px;" ${currentPath.length === 0 ? 'disabled' : ''} onclick="navigateUpInBody(this)"> Atrás</button>
                </div>
                <div class="file-grid" oncontextmenu="handleExplorerContextMenu(event)"></div>
            `;
            const grid = body.querySelector('.file-grid');
            let folder = fileSystem;
            for (let dir of currentPath) { folder = folder[dir]; }
            Object.keys(folder).forEach(name => {
                const isDir = typeof folder[name] === 'object';
                const item = document.createElement('div');
                item.className = 'file-item';
                let icon = isDir ? '' : (name.endsWith('.bat') ? '⚙️' : '');
                item.innerHTML = `<div class="file-icon">${icon}</div><div class="file-name">${name}</div>`;
                item.onclick = (e) => {
                    e.stopPropagation();
                    if (isDir) {
                        currentPath.push(name);
                        renderExplorerInBody(body);
                    }
                };
                item.oncontextmenu = (e) => {
                    e.preventDefault();
                    e.stopPropagation();
                    selectedTarget = name;
                    isDesktopTarget = false;
                    showContextMenu(e.clientX, e.clientY, true);
                };
                grid.appendChild(item);
            });
        }
        function navigateUpInBody(btn) {
            if (currentPath.length > 0) {
                currentPath.pop();
                renderExplorerInBody(btn.closest('.window-body'));
            }
        }
        function handleCmdInWindow(e, input) {
            if (e.key === 'Enter') {
                const commandLine = input.value.trim();
                const container = input.closest('.cmd-body');
                const output = container.querySelector('.cmd-output');
                output.textContent += `\nC:\\${currentPath.join("\\")}>${commandLine}\n`;
                if (commandLine !== "") {
                    processCommand(commandLine, output, container);
                }
                input.value = "";
                container.scrollTop = container.scrollHeight;
            }
        }
        function generateTreeText(node, prefix = "") {
            let result = "";
            const keys = Object.keys(node);
            keys.forEach((key, index) => {
                const isLast = index === keys.length - 1;
                const connector = isLast ? "└── " : "├── ";
                result += `${prefix}${connector}${key}\n`;
                if (typeof node[key] === 'object' && node[key] !== null) {
                    const childPrefix = prefix + (isLast ? "    " : "│   ");
                    result += generateTreeText(node[key], childPrefix);
                }
            });
            return result;
        }
        function processCommand(cmd, output, cmdBody) {
            const parts = cmd.split(" ");
            const action = parts[0].toLowerCase();
            const args = parts.slice(1);
            const arg = args.join(" ");
            
            let folder = fileSystem;
            for (let dir of currentPath) { folder = folder[dir]; }
            switch (action) {
                case 'help':
                    output.textContent += `Comandos disponibles:
  title [nuevo_titulo]       - Cambia el título de la ventana actual
  tree                      - Muestra la estructura de carpetas
  color [fondo][texto]       - Cambia el color de la consola (ej: color 0a)
  rename [viejo] [nuevo]     - Renombra un archivo (alias: ren)
  start [archivo/cmd]       - Abre en una NUEVA ventana
  dir                       - Muestra archivos
  cls                       - Limpia la pantalla
  echo [texto]              - Imprime texto
  del [archivo]             - Elimina un archivo\n`;
                    break;
                case 'title':
                    if (arg !== "") {
                        const winTitle = cmdBody.parentElement.querySelector('.window-title-text');
                        if (winTitle) winTitle.textContent = arg;
                    } else {
                        output.textContent += `Sintaxis incorrecta. Uso: title [nombre del titulo]\n`;
                    }
                    break;
                case 'cls':
                    output.textContent = "";
                    break;
                case 'tree':
                    output.textContent += `Estructura de C:\\${currentPath.join("\\")}\n\n`;
                    output.textContent += `C:\\${currentPath.join("\\")}\n`;
                    output.textContent += generateTreeText(folder);
                    break;
                case 'color':
                    if (args.length > 0 && args[0].length <= 2) {
                        const code = args[0].toLowerCase();
                        let bgHex, fgHex;
                        if (code.length === 1) {
                            bgHex = colorPalette['0'];
                            fgHex = colorPalette[code[0]] || colorPalette['7'];
                        } else {
                            bgHex = colorPalette[code[0]] || colorPalette['0'];
                            fgHex = colorPalette[code[1]] || colorPalette['7'];
                        }
                        cmdBody.style.background = bgHex;
                        cmdBody.style.color = fgHex;
                    } else {
                        cmdBody.style.background = '#0c0c0c';
                        cmdBody.style.color = '#cccccc';
                    }
                    break;
                case 'ren':
                case 'rename':
                    if (args.length >= 2) {
                        let oldName = args[0];
                        let newName = args[1];
                        if (folder[oldName] !== undefined) {
                            folder[newName] = folder[oldName];
                            delete folder[oldName];
                            saveState();
                            output.textContent += `Se renombró '${oldName}' a '${newName}'.\n`;
                        } else {
                            output.textContent += `No se encontró '${oldName}'.\n`;
                        }
                    } else {
                        output.textContent += `Uso: rename [nombre_actual] [nuevo_nombre]\n`;
                    }
                    break;
                case 'start':
                    if (arg === '' || arg.toLowerCase() === 'cmd') {
                        spawnCmdWindow();
                        output.textContent += "Se ha generado una nueva ventana de CMD.\n";
                    } else if (arg.toLowerCase() === 'equipo' || arg.toLowerCase() === 'explorer') {
                        openExplorer();
                        output.textContent += "Abriendo Explorador de archivos...\n";
                    } else if (arg.toLowerCase() === 'editor') {
                        openEditor();
                        output.textContent += "Abriendo Editor de scripts...\n";
                    } else {
                        let fileName = arg;
                        if (!fileName.endsWith('.bat')) fileName += '.bat';
                        let scriptContent = folder[fileName] || (fileSystem["Desktop"] ? fileSystem["Desktop"][fileName] : null);
                        if (scriptContent && typeof scriptContent === 'string') {
                            runBatFromPath(scriptContent, fileName);
                            output.textContent += `Ejecutando ${fileName} en una nueva ventana...\n`;
                        } else {
                            output.textContent += `No se encontró el archivo '${arg}'.\n`;
                        }
                    }
                    break;
                case 'dir':
                    output.textContent += ` Directorio de C:\\${currentPath.join("\\")}\n\n`;
                    Object.keys(folder).forEach(item => {
                        const isDir = typeof folder[item] === 'object';
                        output.textContent += `${isDir ? '<DIR>' : '     '}     ${item}\n`;
                    });
                    break;
                case 'echo':
                    output.textContent += `${arg}\n`;
                    break;
                case 'del':
                    if (folder[arg] !== undefined) {
                        delete folder[arg];
                        saveState();
                        output.textContent += `Archivo ${arg} eliminado.\n`;
                    } else {
                        output.textContent += `No se encontró ${arg}.\n`;
                    }
                    break;
                default:
                    let targetName = cmd.endsWith('.bat') ? cmd : cmd + '.bat';
                    let content = folder[cmd] || folder[targetName] || (fileSystem["Desktop"] ? (fileSystem["Desktop"][cmd] || fileSystem["Desktop"][targetName]) : null);
                    if (content && typeof content === 'string') {
                        runBatScript(content, output, cmdBody);
                    } else {
                        output.textContent += `'${action}' no se reconoce como comando.\n`;
                    }
                    break;
            }
        }
        function runBatScript(content, output, cmdBody) {
            const lines = content.split('\n');
            lines.forEach(line => {
                const trimmed = line.trim();
                if (trimmed.startsWith('@echo off') || trimmed === '') return;
                
                if (trimmed.toLowerCase().startsWith('echo ')) {
                    output.textContent += trimmed.substring(5) + "\n";
                } else {
                    processCommand(trimmed, output, cmdBody);
                }
            });
        }
        function runBatFromPath(content, name) {
            spawnCmdWindow();
            const lastCmds = document.querySelectorAll('.cmd-body');
            const targetBody = lastCmds[lastCmds.length - 1];
            const output = targetBody.querySelector('.cmd-output');
            output.textContent += `\nC:\\Desktop>${name}\n`;
            runBatScript(content, output, targetBody);
        }
        function saveBatFromEditor(btn) {
            const container = btn.closest('.editor-container');
            let name = container.querySelector('.editor-name').value.trim();
            const content = container.querySelector('.editor-content').value;
            if (!name) return alert("Por favor escribe un nombre.");
            if (!name.endsWith('.bat')) name += '.bat';
            if (!fileSystem["Desktop"]) fileSystem["Desktop"] = {};
            fileSystem["Desktop"][name] = content;
            
            saveState();
            alert(`Archivo '${name}' guardado en el Escritorio.`);
            btn.closest('.window').remove();
        }
        function handleDesktopContextMenu(e) {
            if (e.target.id === 'desktop') {
                e.preventDefault();
                selectedTarget = null;
                isDesktopTarget = true;
                showContextMenu(e.clientX, e.clientY, false);
            }
        }
        function handleExplorerContextMenu(e) {
            if (e.target.classList.contains('file-grid')) {
                e.preventDefault();
                selectedTarget = null;
                isDesktopTarget = false;
                showContextMenu(e.clientX, e.clientY, false);
            }
        }
        function showContextMenu(x, y, isItemClicked) {
            const menu = document.getElementById('context-menu');
            document.getElementById('ctx-new-folder').style.display = isItemClicked ? 'none' : 'flex';
            document.getElementById('ctx-run-script').style.display = isItemClicked ? 'flex' : 'none';
            document.getElementById('ctx-rename').style.display = isItemClicked ? 'flex' : 'none';
            document.getElementById('ctx-delete').style.display = isItemClicked ? 'flex' : 'none';
            menu.style.left = `${x}px`;
            menu.style.top = `${y}px`;
            menu.style.display = 'block';
        }
        function closeContextMenu() { document.getElementById('context-menu').style.display = 'none'; }
        function getTargetFolder() { 
            if (isDesktopTarget) return fileSystem["Desktop"];
            let folder = fileSystem;
            for (let dir of currentPath) { folder = folder[dir]; }
            return folder;
        }
        function createNewFolder() {
            const name = prompt("Nombre de la nueva carpeta:", "Nueva Carpeta");
            if (name) {
                const folder = getTargetFolder();
                if (!folder[name]) {
                    folder[name] = {};
                    saveState();
                } else {
                    alert("Ya existe un archivo o carpeta con ese nombre.");
                }
            }
            closeContextMenu();
        }
        function deleteSelectedFile() {
            if (!selectedTarget) return;
            const folder = getTargetFolder();
            if (confirm(`¿Eliminar "${selectedTarget}"?`)) {
                delete folder[selectedTarget];
                saveState();
            }
            closeContextMenu();
        }
        function renameSelectedFile() {
            if (!selectedTarget) return;
            const folder = getTargetFolder();
            const newName = prompt("Nuevo nombre:", selectedTarget);
            if (newName && newName !== selectedTarget) {
                folder[newName] = folder[selectedTarget];
                delete folder[selectedTarget];
                saveState();
            }
            closeContextMenu();
        }
        function runSelectedBat() {
            if (!selectedTarget) return;
            const folder = getTargetFolder();
            if (typeof folder[selectedTarget] === 'string') {
                runBatFromPath(folder[selectedTarget], selectedTarget);
            }
            closeContextMenu();
        }
        function dragWindow(e, win) {
            if (win.classList.contains('maximized')) return;
            let shiftX = e.clientX - win.getBoundingClientRect().left;
            let shiftY = e.clientY - win.getBoundingClientRect().top;
            function moveAt(pageX, pageY) {
                win.style.left = pageX - shiftX + 'px';
                win.style.top = pageY - shiftY + 'px';
            }
            function onMouseMove(e) { moveAt(e.pageX, e.pageY); }
            document.addEventListener('mousemove', onMouseMove);
            document.onmouseup = function() {
                document.removeEventListener('mousemove', onMouseMove);
                document.onmouseup = null;
            };
        }
        function toggleStartMenu(e) {
            e.stopPropagation();
            const menu = document.getElementById('start-menu');
            menu.style.display = menu.style.display === 'flex' ? 'none' : 'flex';
        }
        function closeStartMenu() { document.getElementById('start-menu').style.display = 'none'; }
        setInterval(() => {
            const d = new Date();
            document.getElementById('clock').textContent = d.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});
        }, 1000);
        saveState();
    </script>
</body>
</html>
no quiero ofender, pero cuanto tiempo de experiencia tenes con html? o lo hiciste con ia?
Bellota_Azul
Scratcher
100+ posts

Cosas de poto111 (Ant: Pndjds de Poto111)

hice una cancion en mi music maker y lo posteé en el topic para guardar codigos

“idk what name to put” 80 BPM/TEMPO

by @Bellota_Azul

17/63/-204/a/61/-192/a/58/-180/a/56/-168/a/58/-156/a/56/-144/a/58/-132/a/61/-120/a/63/-108/a/61/-96/a/58/-84/a/56/-72/a/58/-60/a/56/-48/a/54/-36/a/63/-12/a/61/0/a/58/12/a/56/24/a/58/36/a/56/48/a/58/60/a/61/72/a/63/84/a/61/96/a/58/108/a/56/120/a/58/132/a/56/144/a/66/0/a/58/-12/a/68/24/a/70/48/a/68/72/a/70/96/a/68/108/a/66/120/a/63/132/a/61/144/a/63/156/a/66/168/a/54/156/a/68/180/a/73/192/a/70/216/a/68/240/a/70/264/a/68/288/a/66/300/a/a/324/a/a/348/a/68/360/a/63/180/a/61/192/a/58/204/a/56/216/a/58/228/a/56/240/a/58/252/a/61/264/a/63/276/a/61/288/a/58/300/a/56/312/a/58/324/a/56/336/a/54/348/a/59/372/a/54/396/a/a/420/a/a/444/a/57/456/a/a/384/a/59/468/a/57/480/a/50/408/a/a/432/a/54/492/a/50/504/a/54/516/a/57/528/a/59/540/a/61/552/a/73/372/a/72/408/a/71/444/a/70/480/a/62/504/a/66/516/a/62/528/a/66/540/a/69/552/a/68/312/a/a/336/a/59/564/a/57/576/a/54/588/a/50/600/a/54/612/a/59/660/a/57/672/a/54/684/a/50/696/a/54/708/a/57/624/a/59/636/a/61/648/a/57/720/a/59/732/a/73/564/a/72/588/a/71/612/a/70/636/a/69/660/a/62/672/a/66/684/a/62/696/a/66/708/a/69/720/a/71/732/a/74/1140/a/70/a/a/67/a/a/63/a/a/70/1152/a/67/1164/a/63/1176/a/67/a/a/70/a/a/74/a/a/70/1188/a/67/1200/a/a/1212/a/70/a/a/74/a/a/63/a/a/64/1224/a/69/a/a/72/a/a/76/a/a/a/1236/a/72/1248/a/69/1260/a/64/1272/a/60/1284/a/64/1236/a/51/1140/a/a/1176/a/a/1212/a/53/1224/a/69/744/a/57/a/a/63/756/a/61/768/a/58/780/a/56/792/a/58/804/a/56/816/a/58/828/a/61/840/a/63/852/a/61/864/a/58/876/a/56/888/a/58/900/a/70/756/a/61/912/a/63/924/a/66/936/a/a/948/a/68/a/a/63/a/a/59/a/a/68/984/a/66/a/a/63/a/a/59/a/a/63/972/a/68/1008/a/66/a/a/59/a/a/63/a/a/68/1032/a/66/a/a/63/a/a/59/a/a/70/1044/a/63/a/a/61/a/a/68/a/a/63/1056/a/71/1068/a/66/a/a/63/a/a/58/a/a/73/1092/a/66/a/a/63/a/a/54/a/a/63/1080/a/a/1104/a/74/1116/a/50/a/a/60/a/a/65/a/a/63/1128/b80c0[p][img=https://u.cubeupload.com/fmji/2747.png][color=green]Remix of "idk what name to put", by [url=https://scratch.mit.edu/users/Bellota_Azul/]@Bellota_Azul[/url][/color] [img=https://u.cubeupload.com/fmji/2747.png][/p]
Copy that code and load it on the Music Maker to hear the song.

Last edited by Bellota_Azul (Aug. 15, 2026 22:43:33)

doraemonyaexiste
Scratcher
80 posts

Cosas de poto111 (Ant: Pndjds de Poto111)

Bellota_Azul wrote:

doraemonyaexiste wrote:

Mini compu:
<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WebOS Pro - Sistema de Archivos y CMD</title>
    <style>
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        body {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            user-select: none;
        }
        /* Escritorio */
        #desktop {
            flex: 1;
            padding: 20px;
            display: flex;
            flex-direction: column;
            flex-wrap: wrap;
            gap: 15px;
            align-content: flex-start;
            position: relative;
        }
        .desktop-icon {
            width: 90px;
            padding: 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            color: white;
            text-shadow: 0px 1px 3px rgba(0,0,0,0.8);
            cursor: pointer;
            text-align: center;
            font-size: 12px;
            border-radius: 6px;
            transition: background 0.2s;
        }
        .desktop-icon:hover {
            background: rgba(255, 255, 255, 0.15);
        }
        .desktop-icon .icon-svg {
            font-size: 38px;
            margin-bottom: 5px;
        }
        /* Ventanas Dinámicas */
        .window {
            position: absolute;
            background: #f0f3f9;
            border-radius: 8px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            min-width: 450px;
            min-height: 320px;
            display: flex;
            flex-direction: column;
            resize: both;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.2);
            z-index: 10;
            transition: top 0.2s, left 0.2s, width 0.2s, height 0.2s;
        }
        /* Ventana Maximizada */
        .window.maximized {
            top: 0 !important;
            left: 0 !important;
            width: 100vw !important;
            height: calc(100vh - 42px) !important;
            border-radius: 0;
            resize: none;
        }
        .window-header {
            background: #ffffff;
            color: #333;
            padding: 8px 14px;
            font-weight: 600;
            font-size: 13px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: move;
            border-bottom: 1px solid #e0e0e0;
        }
        .window-controls {
            display: flex;
            gap: 8px;
        }
        .win-btn {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
        }
        .win-close { background: #ff5f56; }
        .win-max { background: #27c93f; }
        .window-body {
            flex: 1;
            background: #ffffff;
            overflow: auto;
            display: flex;
            flex-direction: column;
        }
        /* Explorador */
        .explorer-bar {
            padding: 6px 12px;
            background: #f5f5f7;
            border-bottom: 1px solid #e0e0e0;
            display: flex;
            gap: 8px;
            align-items: center;
            font-size: 13px;
        }
        .path-box {
            flex: 1;
            background: #fff;
            border: 1px solid #ccc;
            padding: 3px 8px;
            border-radius: 4px;
            font-family: 'Fixedsys', 'Fixedsys Excelsior', 'Consolas', monospace;
            color: #444;
        }
        .file-grid {
            padding: 15px;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
            gap: 15px;
            align-content: start;
            flex: 1;
        }
        .file-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 8px;
            border-radius: 6px;
            cursor: pointer;
            text-align: center;
            font-size: 12px;
            color: #333;
            border: 1px solid transparent;
        }
        .file-item:hover {
            background: #e5f1fb;
            border-color: #b0d4f1;
        }
        .file-item .file-icon {
            font-size: 32px;
            margin-bottom: 4px;
        }
        /* Menú Contextual */
        #context-menu {
            position: absolute;
            display: none;
            background: #ffffff;
            border: 1px solid #ccc;
            box-shadow: 2px 5px 15px rgba(0,0,0,0.2);
            border-radius: 6px;
            padding: 4px 0;
            z-index: 1000;
            min-width: 150px;
        }
        #context-menu div {
            padding: 8px 15px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        #context-menu div:hover {
            background: #0078d4;
            color: white;
        }
        /* Terminal / CMD - Configuración con Fixedsys */
        .cmd-body {
            background: #0c0c0c;
            color: #cccccc;
            font-family: 'Fixedsys', 'Fixedsys Excelsior', 'Consolas', 'Courier New', monospace !important;
            padding: 12px;
            font-size: 14px;
            line-height: 1.3;
            letter-spacing: 0px;
            font-variant-ligatures: none;
            transition: background 0.2s, color 0.2s;
        }
        .cmd-output {
            white-space: pre-wrap;
            word-break: break-all;
            flex: 1;
            margin-bottom: 5px;
            font-family: inherit;
        }
        .cmd-line {
            display: flex;
            align-items: center;
            font-family: inherit;
        }
        .cmd-prompt {
            font-family: inherit;
            white-space: pre;
            color: inherit;
        }
        .cmd-input {
            background: transparent;
            border: none;
            color: inherit;
            font-family: inherit;
            font-size: inherit;
            letter-spacing: inherit;
            flex: 1;
            outline: none;
            padding: 0;
            margin: 0;
        }
        /* Editor .BAT */
        .editor-container {
            padding: 15px;
            display: flex;
            flex-direction: column;
            height: 100%;
            gap: 10px;
        }
        .editor-container input, .editor-container textarea {
            border: 1px solid #ccc;
            border-radius: 4px;
            padding: 8px;
            outline: none;
        }
        .editor-container textarea {
            flex: 1;
            font-family: 'Fixedsys', 'Fixedsys Excelsior', 'Consolas', monospace;
            resize: none;
        }
        .btn {
            padding: 6px 16px;
            background: #0078d4;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 500;
        }
        .btn:hover { background: #005a9e; }
        /* Barra de Tareas */
        #taskbar {
            height: 42px;
            background: rgba(20, 20, 20, 0.85);
            backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            padding: 0 12px;
            justify-content: space-between;
            color: white;
            position: relative;
            z-index: 100;
        }
        .start-btn {
            background: rgba(255,255,255,0.1);
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
        }
        .start-btn:hover { background: rgba(255,255,255,0.2); }
        #start-menu {
            position: absolute;
            bottom: 48px;
            left: 10px;
            width: 220px;
            background: #ffffff;
            border-radius: 8px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.3);
            display: none;
            flex-direction: column;
            overflow: hidden;
            z-index: 999;
        }
        #start-menu div {
            padding: 12px 16px;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid #f0f0f0;
        }
        #start-menu div:hover { background: #f5f5f7; }
        #start-menu div.danger:hover { background: #ffe6e6; color: #d93025; }
    </style>
</head>
<body onclick="closeContextMenu(); closeStartMenu();">
    <div id="desktop" oncontextmenu="handleDesktopContextMenu(event)"></div>
    <div id="context-menu">
        <div id="ctx-new-folder" onclick="createNewFolder()"> Nueva Carpeta</div>
        <div id="ctx-run-script" onclick="runSelectedBat()">▶ Ejecutar Script</div>
        <div id="ctx-rename" onclick="renameSelectedFile()">✏️ Renombrar</div>
        <div id="ctx-delete" onclick="deleteSelectedFile()" style="color: #d93025;">️ Eliminar</div>
    </div>
    <div id="start-menu" onclick="event.stopPropagation()">
        <div onclick="openExplorer(); closeStartMenu();"> Abrir Equipo</div>
        <div onclick="spawnCmdWindow(); closeStartMenu();"> Abrir CMD</div>
        <div onclick="openEditor(); closeStartMenu();"> Crear Script .BAT</div>
        <div class="danger" onclick="resetSession()"> Borrar Sesión / Restablecer</div>
    </div>
    <div id="taskbar">
        <div class="start-btn" onclick="toggleStartMenu(event)">
            <span></span> <b>Inicio</b>
        </div>
        <div id="clock" style="font-size: 12px;">00:00</div>
    </div>
    <script>
        const initialFS = {
            "Contacts": {},
            "Desktop": {
                "mi_script.bat": "@echo off\ntitle Consola Retro Fixedsys\ncolor 0a\necho ¡Fuente Fixedsys activada!\ntree\nstart"
            },
            "Documents": {},
            "Downloads": {},
            "Favorites": {},
            "Music": {},
            "Pictures": {},
            "Videos": {}
        };
        const colorPalette = {
            '0': '#0c0c0c', '1': '#0037da', '2': '#13a10e', '3': '#3a96dd',
            '4': '#c50f1f', '5': '#881798', '6': '#c19c00', '7': '#cccccc',
            '8': '#767676', '9': '#3b78ff', 'a': '#16c60c', 'b': '#61d6d6',
            'c': '#e74856', 'd': '#b4009e', 'e': '#f9f1a5', 'f': '#ffffff'
        };
        let fileSystem = JSON.parse(localStorage.getItem('webOS_FS')) || initialFS;
        let currentPath = [];
        let selectedTarget = null;
        let isDesktopTarget = false;
        let windowOffset = 0;
        let activeExplorerBody = null;
        function saveState() {
            localStorage.setItem('webOS_FS', JSON.stringify(fileSystem));
            renderDesktop();
            if (activeExplorerBody) {
                renderExplorerInBody(activeExplorerBody);
            }
        }
        function resetSession() {
            if (confirm("¿Borrar sesión y reiniciar todo?")) {
                localStorage.removeItem('webOS_FS');
                fileSystem = JSON.parse(JSON.stringify(initialFS));
                currentPath = [];
                document.querySelectorAll('.window').forEach(w => w.remove());
                saveState();
                closeStartMenu();
            }
        }
        function renderDesktop() {
            const desktop = document.getElementById('desktop');
            desktop.innerHTML = `
                <div class="desktop-icon" onclick="openExplorer()">
                    <div class="icon-svg"></div>
                    Equipo (C:)
                </div>
                <div class="desktop-icon" onclick="spawnCmdWindow()">
                    <div class="icon-svg"></div>
                    CMD Terminal
                </div>
                <div class="desktop-icon" onclick="openEditor()">
                    <div class="icon-svg"></div>
                    Editor .BAT
                </div>
            `;
            const desktopFolder = fileSystem["Desktop"] || {};
            Object.keys(desktopFolder).forEach(name => {
                const item = document.createElement('div');
                item.className = 'desktop-icon';
                const isDir = typeof desktopFolder[name] === 'object';
                let icon = isDir ? '' : (name.endsWith('.bat') ? '⚙️' : '');
                
                item.innerHTML = `<div class="icon-svg">${icon}</div><div>${name}</div>`;
                item.onclick = (e) => {
                    e.stopPropagation();
                    if (isDir) {
                        openExplorer();
                        currentPath = ["Desktop", name];
                        renderExplorerInBody(activeExplorerBody);
                    } else if (name.endsWith('.bat')) {
                        runBatFromPath(desktopFolder[name], name);
                    }
                };
                item.oncontextmenu = (e) => {
                    e.preventDefault();
                    e.stopPropagation();
                    selectedTarget = name;
                    isDesktopTarget = true;
                    showContextMenu(e.clientX, e.clientY, true);
                };
                desktop.appendChild(item);
            });
        }
        function toggleMaximize(btn) {
            const win = btn.closest('.window');
            win.classList.toggle('maximized');
        }
        function closeWindow(btn, isExplorer = false) {
            if (isExplorer) {
                currentPath = [];
                activeExplorerBody = null;
            }
            btn.closest('.window').remove();
        }
        function createBaseWindow(title, width = 550, height = 350, isExplorer = false) {
            windowOffset = (windowOffset + 25) % 150;
            const topPos = 60 + windowOffset;
            const leftPos = 120 + windowOffset;
            const win = document.createElement('div');
            win.className = 'window';
            win.style.top = `${topPos}px`;
            win.style.left = `${leftPos}px`;
            win.style.width = `${width}px`;
            win.style.height = `${height}px`;
            win.innerHTML = `
                <div class="window-header" onmousedown="dragWindow(event, this.parentElement)">
                    <span class="window-title-text">${title}</span>
                    <div class="window-controls">
                        <button class="win-btn win-max" onclick="toggleMaximize(this)" title="Ampliar"></button>
                        <button class="win-btn win-close" onclick="closeWindow(this, ${isExplorer})" title="Cerrar"></button>
                    </div>
                </div>
                <div class="window-body"></div>
            `;
            win.onmousedown = () => {
                document.querySelectorAll('.window').forEach(w => w.style.zIndex = '10');
                win.style.zIndex = '20';
            };
            document.body.appendChild(win);
            return win.querySelector('.window-body');
        }
        function spawnCmdWindow() {
            const body = createBaseWindow('Símbolo del sistema (CMD)', 580, 360);
            body.classList.add('cmd-body');
            body.onclick = () => body.querySelector('.cmd-input').focus();
            body.innerHTML = `
                <div class="cmd-output">Microsoft Windows [Versión 10.0.19045]
(c) Microsoft Corporation. Todos los derechos reservados.
Terminal con fuente Fixedsys retro configurada.
</div>
                <div class="cmd-line">
                    <span class="cmd-prompt">C:\\&gt;</span>
                    <input type="text" class="cmd-input" onkeydown="handleCmdInWindow(event, this)">
                </div>
            `;
            setTimeout(() => body.querySelector('.cmd-input').focus(), 50);
        }
        function openEditor() {
            const body = createBaseWindow('Crear Script (.bat)', 480, 380);
            body.innerHTML = `
                <div class="editor-container">
                    <input type="text" class="editor-name" placeholder="mi_script.bat">
                    <textarea class="editor-content" placeholder="Escribe tus comandos aquí...&#10;@echo off&#10;title Mi Nuevo Titulo&#10;color 0a&#10;tree"></textarea>
                    <button class="btn" onclick="saveBatFromEditor(this)">Guardar en Escritorio</button>
                </div>
            `;
        }
        function openExplorer() {
            currentPath = []; // Al abrir o reabrir, se restablece a C:
            const body = createBaseWindow('Explorador de Archivos (C:)', 600, 400, true);
            activeExplorerBody = body;
            renderExplorerInBody(body);
        }
        function renderExplorerInBody(body) {
            body.innerHTML = `
                <div class="explorer-bar">
                    <span>Ubicación:</span>
                    <div class="path-box">C:\\${currentPath.join("\\")}</div>
                    <button class="btn" style="padding: 2px 8px; font-size: 11px;" ${currentPath.length === 0 ? 'disabled' : ''} onclick="navigateUpInBody(this)"> Atrás</button>
                </div>
                <div class="file-grid" oncontextmenu="handleExplorerContextMenu(event)"></div>
            `;
            const grid = body.querySelector('.file-grid');
            let folder = fileSystem;
            for (let dir of currentPath) { folder = folder[dir]; }
            Object.keys(folder).forEach(name => {
                const isDir = typeof folder[name] === 'object';
                const item = document.createElement('div');
                item.className = 'file-item';
                let icon = isDir ? '' : (name.endsWith('.bat') ? '⚙️' : '');
                item.innerHTML = `<div class="file-icon">${icon}</div><div class="file-name">${name}</div>`;
                item.onclick = (e) => {
                    e.stopPropagation();
                    if (isDir) {
                        currentPath.push(name);
                        renderExplorerInBody(body);
                    }
                };
                item.oncontextmenu = (e) => {
                    e.preventDefault();
                    e.stopPropagation();
                    selectedTarget = name;
                    isDesktopTarget = false;
                    showContextMenu(e.clientX, e.clientY, true);
                };
                grid.appendChild(item);
            });
        }
        function navigateUpInBody(btn) {
            if (currentPath.length > 0) {
                currentPath.pop();
                renderExplorerInBody(btn.closest('.window-body'));
            }
        }
        function handleCmdInWindow(e, input) {
            if (e.key === 'Enter') {
                const commandLine = input.value.trim();
                const container = input.closest('.cmd-body');
                const output = container.querySelector('.cmd-output');
                output.textContent += `\nC:\\${currentPath.join("\\")}>${commandLine}\n`;
                if (commandLine !== "") {
                    processCommand(commandLine, output, container);
                }
                input.value = "";
                container.scrollTop = container.scrollHeight;
            }
        }
        function generateTreeText(node, prefix = "") {
            let result = "";
            const keys = Object.keys(node);
            keys.forEach((key, index) => {
                const isLast = index === keys.length - 1;
                const connector = isLast ? "└── " : "├── ";
                result += `${prefix}${connector}${key}\n`;
                if (typeof node[key] === 'object' && node[key] !== null) {
                    const childPrefix = prefix + (isLast ? "    " : "│   ");
                    result += generateTreeText(node[key], childPrefix);
                }
            });
            return result;
        }
        function processCommand(cmd, output, cmdBody) {
            const parts = cmd.split(" ");
            const action = parts[0].toLowerCase();
            const args = parts.slice(1);
            const arg = args.join(" ");
            
            let folder = fileSystem;
            for (let dir of currentPath) { folder = folder[dir]; }
            switch (action) {
                case 'help':
                    output.textContent += `Comandos disponibles:
  title [nuevo_titulo]       - Cambia el título de la ventana actual
  tree                      - Muestra la estructura de carpetas
  color [fondo][texto]       - Cambia el color de la consola (ej: color 0a)
  rename [viejo] [nuevo]     - Renombra un archivo (alias: ren)
  start [archivo/cmd]       - Abre en una NUEVA ventana
  dir                       - Muestra archivos
  cls                       - Limpia la pantalla
  echo [texto]              - Imprime texto
  del [archivo]             - Elimina un archivo\n`;
                    break;
                case 'title':
                    if (arg !== "") {
                        const winTitle = cmdBody.parentElement.querySelector('.window-title-text');
                        if (winTitle) winTitle.textContent = arg;
                    } else {
                        output.textContent += `Sintaxis incorrecta. Uso: title [nombre del titulo]\n`;
                    }
                    break;
                case 'cls':
                    output.textContent = "";
                    break;
                case 'tree':
                    output.textContent += `Estructura de C:\\${currentPath.join("\\")}\n\n`;
                    output.textContent += `C:\\${currentPath.join("\\")}\n`;
                    output.textContent += generateTreeText(folder);
                    break;
                case 'color':
                    if (args.length > 0 && args[0].length <= 2) {
                        const code = args[0].toLowerCase();
                        let bgHex, fgHex;
                        if (code.length === 1) {
                            bgHex = colorPalette['0'];
                            fgHex = colorPalette[code[0]] || colorPalette['7'];
                        } else {
                            bgHex = colorPalette[code[0]] || colorPalette['0'];
                            fgHex = colorPalette[code[1]] || colorPalette['7'];
                        }
                        cmdBody.style.background = bgHex;
                        cmdBody.style.color = fgHex;
                    } else {
                        cmdBody.style.background = '#0c0c0c';
                        cmdBody.style.color = '#cccccc';
                    }
                    break;
                case 'ren':
                case 'rename':
                    if (args.length >= 2) {
                        let oldName = args[0];
                        let newName = args[1];
                        if (folder[oldName] !== undefined) {
                            folder[newName] = folder[oldName];
                            delete folder[oldName];
                            saveState();
                            output.textContent += `Se renombró '${oldName}' a '${newName}'.\n`;
                        } else {
                            output.textContent += `No se encontró '${oldName}'.\n`;
                        }
                    } else {
                        output.textContent += `Uso: rename [nombre_actual] [nuevo_nombre]\n`;
                    }
                    break;
                case 'start':
                    if (arg === '' || arg.toLowerCase() === 'cmd') {
                        spawnCmdWindow();
                        output.textContent += "Se ha generado una nueva ventana de CMD.\n";
                    } else if (arg.toLowerCase() === 'equipo' || arg.toLowerCase() === 'explorer') {
                        openExplorer();
                        output.textContent += "Abriendo Explorador de archivos...\n";
                    } else if (arg.toLowerCase() === 'editor') {
                        openEditor();
                        output.textContent += "Abriendo Editor de scripts...\n";
                    } else {
                        let fileName = arg;
                        if (!fileName.endsWith('.bat')) fileName += '.bat';
                        let scriptContent = folder[fileName] || (fileSystem["Desktop"] ? fileSystem["Desktop"][fileName] : null);
                        if (scriptContent && typeof scriptContent === 'string') {
                            runBatFromPath(scriptContent, fileName);
                            output.textContent += `Ejecutando ${fileName} en una nueva ventana...\n`;
                        } else {
                            output.textContent += `No se encontró el archivo '${arg}'.\n`;
                        }
                    }
                    break;
                case 'dir':
                    output.textContent += ` Directorio de C:\\${currentPath.join("\\")}\n\n`;
                    Object.keys(folder).forEach(item => {
                        const isDir = typeof folder[item] === 'object';
                        output.textContent += `${isDir ? '<DIR>' : '     '}     ${item}\n`;
                    });
                    break;
                case 'echo':
                    output.textContent += `${arg}\n`;
                    break;
                case 'del':
                    if (folder[arg] !== undefined) {
                        delete folder[arg];
                        saveState();
                        output.textContent += `Archivo ${arg} eliminado.\n`;
                    } else {
                        output.textContent += `No se encontró ${arg}.\n`;
                    }
                    break;
                default:
                    let targetName = cmd.endsWith('.bat') ? cmd : cmd + '.bat';
                    let content = folder[cmd] || folder[targetName] || (fileSystem["Desktop"] ? (fileSystem["Desktop"][cmd] || fileSystem["Desktop"][targetName]) : null);
                    if (content && typeof content === 'string') {
                        runBatScript(content, output, cmdBody);
                    } else {
                        output.textContent += `'${action}' no se reconoce como comando.\n`;
                    }
                    break;
            }
        }
        function runBatScript(content, output, cmdBody) {
            const lines = content.split('\n');
            lines.forEach(line => {
                const trimmed = line.trim();
                if (trimmed.startsWith('@echo off') || trimmed === '') return;
                
                if (trimmed.toLowerCase().startsWith('echo ')) {
                    output.textContent += trimmed.substring(5) + "\n";
                } else {
                    processCommand(trimmed, output, cmdBody);
                }
            });
        }
        function runBatFromPath(content, name) {
            spawnCmdWindow();
            const lastCmds = document.querySelectorAll('.cmd-body');
            const targetBody = lastCmds[lastCmds.length - 1];
            const output = targetBody.querySelector('.cmd-output');
            output.textContent += `\nC:\\Desktop>${name}\n`;
            runBatScript(content, output, targetBody);
        }
        function saveBatFromEditor(btn) {
            const container = btn.closest('.editor-container');
            let name = container.querySelector('.editor-name').value.trim();
            const content = container.querySelector('.editor-content').value;
            if (!name) return alert("Por favor escribe un nombre.");
            if (!name.endsWith('.bat')) name += '.bat';
            if (!fileSystem["Desktop"]) fileSystem["Desktop"] = {};
            fileSystem["Desktop"][name] = content;
            
            saveState();
            alert(`Archivo '${name}' guardado en el Escritorio.`);
            btn.closest('.window').remove();
        }
        function handleDesktopContextMenu(e) {
            if (e.target.id === 'desktop') {
                e.preventDefault();
                selectedTarget = null;
                isDesktopTarget = true;
                showContextMenu(e.clientX, e.clientY, false);
            }
        }
        function handleExplorerContextMenu(e) {
            if (e.target.classList.contains('file-grid')) {
                e.preventDefault();
                selectedTarget = null;
                isDesktopTarget = false;
                showContextMenu(e.clientX, e.clientY, false);
            }
        }
        function showContextMenu(x, y, isItemClicked) {
            const menu = document.getElementById('context-menu');
            document.getElementById('ctx-new-folder').style.display = isItemClicked ? 'none' : 'flex';
            document.getElementById('ctx-run-script').style.display = isItemClicked ? 'flex' : 'none';
            document.getElementById('ctx-rename').style.display = isItemClicked ? 'flex' : 'none';
            document.getElementById('ctx-delete').style.display = isItemClicked ? 'flex' : 'none';
            menu.style.left = `${x}px`;
            menu.style.top = `${y}px`;
            menu.style.display = 'block';
        }
        function closeContextMenu() { document.getElementById('context-menu').style.display = 'none'; }
        function getTargetFolder() { 
            if (isDesktopTarget) return fileSystem["Desktop"];
            let folder = fileSystem;
            for (let dir of currentPath) { folder = folder[dir]; }
            return folder;
        }
        function createNewFolder() {
            const name = prompt("Nombre de la nueva carpeta:", "Nueva Carpeta");
            if (name) {
                const folder = getTargetFolder();
                if (!folder[name]) {
                    folder[name] = {};
                    saveState();
                } else {
                    alert("Ya existe un archivo o carpeta con ese nombre.");
                }
            }
            closeContextMenu();
        }
        function deleteSelectedFile() {
            if (!selectedTarget) return;
            const folder = getTargetFolder();
            if (confirm(`¿Eliminar "${selectedTarget}"?`)) {
                delete folder[selectedTarget];
                saveState();
            }
            closeContextMenu();
        }
        function renameSelectedFile() {
            if (!selectedTarget) return;
            const folder = getTargetFolder();
            const newName = prompt("Nuevo nombre:", selectedTarget);
            if (newName && newName !== selectedTarget) {
                folder[newName] = folder[selectedTarget];
                delete folder[selectedTarget];
                saveState();
            }
            closeContextMenu();
        }
        function runSelectedBat() {
            if (!selectedTarget) return;
            const folder = getTargetFolder();
            if (typeof folder[selectedTarget] === 'string') {
                runBatFromPath(folder[selectedTarget], selectedTarget);
            }
            closeContextMenu();
        }
        function dragWindow(e, win) {
            if (win.classList.contains('maximized')) return;
            let shiftX = e.clientX - win.getBoundingClientRect().left;
            let shiftY = e.clientY - win.getBoundingClientRect().top;
            function moveAt(pageX, pageY) {
                win.style.left = pageX - shiftX + 'px';
                win.style.top = pageY - shiftY + 'px';
            }
            function onMouseMove(e) { moveAt(e.pageX, e.pageY); }
            document.addEventListener('mousemove', onMouseMove);
            document.onmouseup = function() {
                document.removeEventListener('mousemove', onMouseMove);
                document.onmouseup = null;
            };
        }
        function toggleStartMenu(e) {
            e.stopPropagation();
            const menu = document.getElementById('start-menu');
            menu.style.display = menu.style.display === 'flex' ? 'none' : 'flex';
        }
        function closeStartMenu() { document.getElementById('start-menu').style.display = 'none'; }
        setInterval(() => {
            const d = new Date();
            document.getElementById('clock').textContent = d.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});
        }, 1000);
        saveState();
    </script>
</body>
</html>
no quiero ofender, pero cuanto tiempo de experiencia tenes con html? o lo hiciste con ia?
No ofende, lo hago con ia pero si me salen re truchos los proyectos, imaginate en html xdxd
canvaques
Scratcher
58 posts

Cosas de poto111 (Ant: Pndjds de Poto111)

Creador de “The amongus” en C++ (en C++ no se permiten tabs, espacios ni carácteres vacios)
#include <iostream>
using namespace std;

int main() {
string a, b, c, d, e, f, g, h, i, j, k, l;
while (cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j >> k >> l) {
string a4=a+a+a+a;
string c2=c+c; string c4=c2+c2; string c5=c4+c; string c6=c5+c; string c8=c6+c2; string c9=c8+c; string c11=c9+c2; string c14=c9+c5; string c16=c14+c2;
string d2=d+d; string d4=d2+d2; string d6=d4+d2; string d11=d6+d4+d;
string e2=e+e; string e3=e2+e; string e4=e3+e; string e6=e4+e2; string e7=e6+e; string e8=e7+e; string e10=e8+e2;
string g2=g+g; string g3=g2+g; string g4=g3+g; string g5=g4+g; string g6=g5+g; string g7=g6+g; string g8=g7+g; string g9=g8+g; string g11=g9+g2; string g15=g11+g4;
string h2=h+h; string h3=h2+h; string h4=h3+h; string h5=h4+h; string h6=h5+h; string h7=h6+h; string h18=h7+h7+h4;
string eheih=e2+h4+e+i+h, eheih2=e+h4+e+i+h, ehced=e2+h+c4+e2+d2, eg=e+g2, cel=c5+e3+l, eh=e+h6, ge=g+e, hc=h+c16;
cout << "The amongus:" << '\n';
cout << g11 << e10 << g9 << '\n';
cout << g8 << j << e2 << k << c9 << e3 << g6 << '\n';
cout << g7 << i << e << j << c8 << d4 << c << i << e2 << g4 << '\n';
cout << g7 << e << i << cel << h << a4 << h << l << e4 << g << '\n';
cout << g6 << i << e << h << c4 << e2 << d << c6 << g5 << c << e2 << '\n';
cout << g << i << e4 << ehced << c11 << e2 << '\n';
cout << ge << c4 << ehced << d11 << e2 << '\n';
cout << d << eheih2 << cel << d6 << l << e3 << h << g << '\n';
cout << i << eheih2 << c9 << j << e4 << a << c2 << h << eg << '\n';
cout << eheih << hc << f << eg << '\n';
cout << eheih << hc << h << eg << '\n';
cout << eheih << h2 << c14 << h << k << eg << '\n';
cout << i << eheih2 << h4 << a << c9 << h3 <<i << eg << '\n';
cout << ge << i << h3 << e << i << h18 << e << eg << '\n';
cout << g << b << e6 << h7 << e7 << j << h3 << e << b << g2 << '\n';
cout << g6 << e2 << h7 << e << h << i << eh << i << eg << g << '\n';
cout << g6 << i << eh << h << e << c << ge << j << h5 << e << i << g3 << '\n';
cout << g6 << j << eh << e << eg << e8 << g4 << '\n';
cout << g7 << i << e7 << g15 << '\n';
}
}
y en Java (en java hay que poner cada elemento en una línea, pero se permiten líneas vacias)
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
String a, b, c, d, e, f, g, h, i, j, k, l;
Scanner scanner = new Scanner(System.in);
while (scanner.hasNextLine()) {
a = scanner.nextLine();
b = scanner.nextLine();
c = scanner.nextLine();
d = scanner.nextLine();
e = scanner.nextLine();
f = scanner.nextLine();
g = scanner.nextLine();
h = scanner.nextLine();
i = scanner.nextLine();
j = scanner.nextLine();
k = scanner.nextLine();
l = scanner.nextLine();
String a4=a+a+a+a;
String c2=c+c, c4=c2+c2, c5=c4+c, c6=c5+c, c8=c6+c2, c9=c8+c, c11=c9+c2, c14=c9+c5, c16=c14+c2;
String d2=d+d, d4=d2+d2, d6=d4+d2, d11=d6+d4+d;
String e2=e+e, e3=e2+e, e4=e3+e, e6=e4+e2, e7=e6+e, e8=e7+e, e10=e8+e2;
String g2=g+g, g3=g2+g, g4=g3+g, g5=g4+g, g6=g5+g, g7=g6+g, g8=g7+g, g9=g8+g, g11=g9+g2, g15=g11+g4;
String h2=h+h, h3=h2+h, h4=h3+h, h5=h4+h, h6=h5+h, h7=h6+h, h18=h7+h7+h4;
String eheih=e2+h4+e+i+h, eheih2=e+h4+e+i+h, ehced=e2+h+c4+e2+d2, eg=e+g2, cel=c5+e3+l, eh=e+h6, ge=g+e, hc=h+c16;
System.out.println ("The amongus:");
System.out.println (g11 + e10 + g9);
System.out.println (g8 + j + e2 + k + c9 + e3 + g6);
System.out.println (g7 + i + e + j + c8 + d4 + c + i + e2 + g4);
System.out.println (g7 + e + i + cel + h + a4 + h + l + e4 + g);
System.out.println (g6 + i + e + h + c4 + e2 + d + c6 + g5 + c + e2);
System.out.println (g + i + e4 + ehced + c11 + e2);
System.out.println (ge + c4 + ehced + d11 + e2);
System.out.println (d + eheih2 + cel + d6 + l + e3 + h + g);
System.out.println (i + eheih2 + c9 + j + e4 + a + c2 + h + eg);
System.out.println (eheih + hc + f + eg);
System.out.println (eheih + hc + h + eg);
System.out.println (eheih + h2 + c14 + h + k + eg);
System.out.println (i + eheih2 + h4 + a + c9 + h3 + i + eg);
System.out.println (ge + i + h3 + e + i + h18 + e + eg);
System.out.println (g + b + e6 + h7 + e7 + j + h3 + e + b + g2);
System.out.println (g6 + e2 + h7 + e + h + i + eh + i + eg + g);
System.out.println (g6 + i + eh + h + e + c + ge + j + h5 + e + i + g3);
System.out.println (g6 + j + eh + e + eg + e8 + g4);
System.out.println (g7 + i + e7 + g15);
}
}
}
ejemplo hecho con tabs, espacios y líneas vacias (en Java)
          

















Last edited by canvaques (Aug. 27, 2026 11:37:47)

doraemonyaexiste
Scratcher
80 posts

Cosas de poto111 (Ant: Pndjds de Poto111)

canvaques wrote:

Creador de “The amongus” en C++ (en C++ no se permiten tabs, espacios ni carácteres vacios)
#include <iostream>
using namespace std;

int main() {
string a, b, c, d, e, f, g, h, i, j, k, l;
while (cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j >> k >> l) {
string a4=a+a+a+a;
string c2=c+c; string c4=c2+c2; string c5=c4+c; string c6=c5+c; string c8=c6+c2; string c9=c8+c; string c11=c9+c2; string c14=c9+c5; string c16=c14+c2;
string d2=d+d; string d4=d2+d2; string d6=d4+d2; string d11=d6+d4+d;
string e2=e+e; string e3=e2+e; string e4=e3+e; string e6=e4+e2; string e7=e6+e; string e8=e7+e; string e10=e8+e2;
string g2=g+g; string g3=g2+g; string g4=g3+g; string g5=g4+g; string g6=g5+g; string g7=g6+g; string g8=g7+g; string g9=g8+g; string g11=g9+g2; string g15=g11+g4;
string h2=h+h; string h3=h2+h; string h4=h3+h; string h5=h4+h; string h6=h5+h; string h7=h6+h; string h18=h7+h7+h4;
string eheih=e2+h4+e+i+h, eheih2=e+h4+e+i+h, ehced=e2+h+c4+e2+d2, eg=e+g2, cel=c5+e3+l, eh=e+h6, ge=g+e, hc=h+c16;
cout << "The amongus:" << '\n';
cout << g11 << e10 << g9 << '\n';
cout << g8 << j << e2 << k << c9 << e3 << g6 << '\n';
cout << g7 << i << e << j << c8 << d4 << c << i << e2 << g4 << '\n';
cout << g7 << e << i << cel << h << a4 << h << l << e4 << g << '\n';
cout << g6 << i << e << h << c4 << e2 << d << c6 << g5 << c << e2 << '\n';
cout << g << i << e4 << ehced << c11 << e2 << '\n';
cout << ge << c4 << ehced << d11 << e2 << '\n';
cout << d << eheih2 << cel << d6 << l << e3 << h << g << '\n';
cout << i << eheih2 << c9 << j << e4 << a << c2 << h << eg << '\n';
cout << eheih << hc << f << eg << '\n';
cout << eheih << hc << h << eg << '\n';
cout << eheih << h2 << c14 << h << k << eg << '\n';
cout << i << eheih2 << h4 << a << c9 << h3 <<i << eg << '\n';
cout << ge << i << h3 << e << i << h18 << e << eg << '\n';
cout << g << b << e6 << h7 << e7 << j << h3 << e << b << g2 << '\n';
cout << g6 << e2 << h7 << e << h << i << eh << i << eg << g << '\n';
cout << g6 << i << eh << h << e << c << ge << j << h5 << e << i << g3 << '\n';
cout << g6 << j << eh << e << eg << e8 << g4 << '\n';
cout << g7 << i << e7 << g15 << '\n';
}
}
y en Java (en java hay que poner cada elemento en una línea, pero se permiten líneas vacias)
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
String a, b, c, d, e, f, g, h, i, j, k, l;
Scanner scanner = new Scanner(System.in);
while (scanner.hasNextLine()) {
a = scanner.nextLine();
b = scanner.nextLine();
c = scanner.nextLine();
d = scanner.nextLine();
e = scanner.nextLine();
f = scanner.nextLine();
g = scanner.nextLine();
h = scanner.nextLine();
i = scanner.nextLine();
j = scanner.nextLine();
k = scanner.nextLine();
l = scanner.nextLine();
String a4=a+a+a+a;
String c2=c+c, c4=c2+c2, c5=c4+c, c6=c5+c, c8=c6+c2, c9=c8+c, c11=c9+c2, c14=c9+c5, c16=c14+c2;
String d2=d+d, d4=d2+d2, d6=d4+d2, d11=d6+d4+d;
String e2=e+e, e3=e2+e, e4=e3+e, e6=e4+e2, e7=e6+e, e8=e7+e, e10=e8+e2;
String g2=g+g, g3=g2+g, g4=g3+g, g5=g4+g, g6=g5+g, g7=g6+g, g8=g7+g, g9=g8+g, g11=g9+g2, g15=g11+g4;
String h2=h+h, h3=h2+h, h4=h3+h, h5=h4+h, h6=h5+h, h7=h6+h, h18=h7+h7+h4;
String eheih=e2+h4+e+i+h, eheih2=e+h4+e+i+h, ehced=e2+h+c4+e2+d2, eg=e+g2, cel=c5+e3+l, eh=e+h6, ge=g+e, hc=h+c16;
System.out.println ("The amongus:");
System.out.println (g11 + e10 + g9);
System.out.println (g8 + j + e2 + k + c9 + e3 + g6);
System.out.println (g7 + i + e + j + c8 + d4 + c + i + e2 + g4);
System.out.println (g7 + e + i + cel + h + a4 + h + l + e4 + g);
System.out.println (g6 + i + e + h + c4 + e2 + d + c6 + g5 + c + e2);
System.out.println (g + i + e4 + ehced + c11 + e2);
System.out.println (ge + c4 + ehced + d11 + e2);
System.out.println (d + eheih2 + cel + d6 + l + e3 + h + g);
System.out.println (i + eheih2 + c9 + j + e4 + a + c2 + h + eg);
System.out.println (eheih + hc + f + eg);
System.out.println (eheih + hc + h + eg);
System.out.println (eheih + h2 + c14 + h + k + eg);
System.out.println (i + eheih2 + h4 + a + c9 + h3 + i + eg);
System.out.println (ge + i + h3 + e + i + h18 + e + eg);
System.out.println (g + b + e6 + h7 + e7 + j + h3 + e + b + g2);
System.out.println (g6 + e2 + h7 + e + h + i + eh + i + eg + g);
System.out.println (g6 + i + eh + h + e + c + ge + j + h5 + e + i + g3);
System.out.println (g6 + j + eh + e + eg + e8 + g4);
System.out.println (g7 + i + e7 + g15);
}
}
}
ejemplo hecho con tabs, espacios y líneas vacias (en Java)
          

















En C++ Me puso: Program did not output anything! (puse abcdefghijkl)
doraemonyaexiste
Scratcher
80 posts

Cosas de poto111 (Ant: Pndjds de Poto111)

#include <iostream>
#include <string>
using namespace std;
int main() {
    string a = "a", b = "b", c = "c", d = "d";
    string e = "e", f = "f", g = "g", h = "h";
    string i = "i", j = "j", k = "k", l = "l";
    string a4 = a + a + a + a;
    string c2 = c + c;
    string c4 = c2 + c2;
    string c5 = c4 + c;
    string c6 = c5 + c;
    string c8 = c6 + c2;
    string c9 = c8 + c;
    string c11 = c9 + c2;
    string c14 = c9 + c5;
    string c16 = c14 + c2;
    string d2 = d + d;
    string d4 = d2 + d2;
    string d6 = d4 + d2;
    string d11 = d6 + d4 + d;
    string e2 = e + e;
    string e3 = e2 + e;
    string e4 = e3 + e;
    string e6 = e4 + e2;
    string e7 = e6 + e;
    string e8 = e7 + e;
    string e10 = e8 + e2;
    string g2 = g + g;
    string g3 = g2 + g;
    string g4 = g3 + g;
    string g5 = g4 + g;
    string g6 = g5 + g;
    string g7 = g6 + g;
    string g8 = g7 + g;
    string g9 = g8 + g;
    string g11 = g9 + g2;
    string g15 = g11 + g4;
    string h2 = h + h;
    string h3 = h2 + h;
    string h4 = h3 + h;
    string h5 = h4 + h;
    string h6 = h5 + h;
    string h7 = h6 + h;
    string h18 = h7 + h7 + h4;
    string eheih = e2 + h4 + e + i + h;
    string eheih2 = e + h4 + e + i + h;
    string ehced = e2 + h + c4 + e2 + d2;
    string eg = e + g2;
    string cel = c5 + e3 + l;
    string eh = e + h6;
    string ge = g + e;
    string hc = h + c16;
    cout << "The amongus:\n";
    cout << g11 << e10 << g9 << '\n';
    cout << g8 << j << e2 << k << c9 << e3 << g6 << '\n';
    cout << g7 << i << e << j << c8 << d4 << c << i << e2 << g4 << '\n';
    cout << g7 << e << i << cel << h << a4 << h << l << e4 << g << '\n';
    cout << g6 << i << e << h << c4 << e2 << d << c6 << g5 << c << e2 << '\n';
    cout << g << i << e4 << ehced << c11 << e2 << '\n';
    cout << ge << c4 << ehced << d11 << e2 << '\n';
    cout << d << eheih2 << cel << d6 << l << e3 << h << g << '\n';
    cout << i << eheih2 << c9 << j << e4 << a << c2 << h << eg << '\n';
    cout << eheih << hc << f << eg << '\n';
    cout << eheih << hc << h << eg << '\n';
    cout << eheih << h2 << c14 << h << k << eg << '\n';
    cout << i << eheih2 << h4 << a << c9 << h3 << i << eg << '\n';
    cout << ge << i << h3 << e << i << h18 << e << eg << '\n';
    cout << g << b << e6 << h7 << e7 << j << h3 << e << b << g2 << '\n';
    cout << g6 << e2 << h7 << e << h << i << eh << i << eg << g << '\n';
    cout << g6 << i << eh << h << e << c << ge << j << h5 << e << i << g3 << '\n';
    cout << g6 << j << eh << e << eg << e8 << g4 << '\n';
    cout << g7 << i << e7 << g15 << '\n';
    return 0;
}
canvaques
Scratcher
58 posts

Cosas de poto111 (Ant: Pndjds de Poto111)

doraemonyaexiste wrote:

canvaques wrote:

Creador de “The amongus” en C++ (en C++ no se permiten tabs, espacios ni carácteres vacios)
#include <iostream>
using namespace std;

int main() {
string a, b, c, d, e, f, g, h, i, j, k, l;
while (cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j >> k >> l) {
string a4=a+a+a+a;
string c2=c+c; string c4=c2+c2; string c5=c4+c; string c6=c5+c; string c8=c6+c2; string c9=c8+c; string c11=c9+c2; string c14=c9+c5; string c16=c14+c2;
string d2=d+d; string d4=d2+d2; string d6=d4+d2; string d11=d6+d4+d;
string e2=e+e; string e3=e2+e; string e4=e3+e; string e6=e4+e2; string e7=e6+e; string e8=e7+e; string e10=e8+e2;
string g2=g+g; string g3=g2+g; string g4=g3+g; string g5=g4+g; string g6=g5+g; string g7=g6+g; string g8=g7+g; string g9=g8+g; string g11=g9+g2; string g15=g11+g4;
string h2=h+h; string h3=h2+h; string h4=h3+h; string h5=h4+h; string h6=h5+h; string h7=h6+h; string h18=h7+h7+h4;
string eheih=e2+h4+e+i+h, eheih2=e+h4+e+i+h, ehced=e2+h+c4+e2+d2, eg=e+g2, cel=c5+e3+l, eh=e+h6, ge=g+e, hc=h+c16;
cout << "The amongus:" << '\n';
cout << g11 << e10 << g9 << '\n';
cout << g8 << j << e2 << k << c9 << e3 << g6 << '\n';
cout << g7 << i << e << j << c8 << d4 << c << i << e2 << g4 << '\n';
cout << g7 << e << i << cel << h << a4 << h << l << e4 << g << '\n';
cout << g6 << i << e << h << c4 << e2 << d << c6 << g5 << c << e2 << '\n';
cout << g << i << e4 << ehced << c11 << e2 << '\n';
cout << ge << c4 << ehced << d11 << e2 << '\n';
cout << d << eheih2 << cel << d6 << l << e3 << h << g << '\n';
cout << i << eheih2 << c9 << j << e4 << a << c2 << h << eg << '\n';
cout << eheih << hc << f << eg << '\n';
cout << eheih << hc << h << eg << '\n';
cout << eheih << h2 << c14 << h << k << eg << '\n';
cout << i << eheih2 << h4 << a << c9 << h3 <<i << eg << '\n';
cout << ge << i << h3 << e << i << h18 << e << eg << '\n';
cout << g << b << e6 << h7 << e7 << j << h3 << e << b << g2 << '\n';
cout << g6 << e2 << h7 << e << h << i << eh << i << eg << g << '\n';
cout << g6 << i << eh << h << e << c << ge << j << h5 << e << i << g3 << '\n';
cout << g6 << j << eh << e << eg << e8 << g4 << '\n';
cout << g7 << i << e7 << g15 << '\n';
}
}
y en Java (en java hay que poner cada elemento en una línea, pero se permiten líneas vacias)
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
String a, b, c, d, e, f, g, h, i, j, k, l;
Scanner scanner = new Scanner(System.in);
while (scanner.hasNextLine()) {
a = scanner.nextLine();
b = scanner.nextLine();
c = scanner.nextLine();
d = scanner.nextLine();
e = scanner.nextLine();
f = scanner.nextLine();
g = scanner.nextLine();
h = scanner.nextLine();
i = scanner.nextLine();
j = scanner.nextLine();
k = scanner.nextLine();
l = scanner.nextLine();
String a4=a+a+a+a;
String c2=c+c, c4=c2+c2, c5=c4+c, c6=c5+c, c8=c6+c2, c9=c8+c, c11=c9+c2, c14=c9+c5, c16=c14+c2;
String d2=d+d, d4=d2+d2, d6=d4+d2, d11=d6+d4+d;
String e2=e+e, e3=e2+e, e4=e3+e, e6=e4+e2, e7=e6+e, e8=e7+e, e10=e8+e2;
String g2=g+g, g3=g2+g, g4=g3+g, g5=g4+g, g6=g5+g, g7=g6+g, g8=g7+g, g9=g8+g, g11=g9+g2, g15=g11+g4;
String h2=h+h, h3=h2+h, h4=h3+h, h5=h4+h, h6=h5+h, h7=h6+h, h18=h7+h7+h4;
String eheih=e2+h4+e+i+h, eheih2=e+h4+e+i+h, ehced=e2+h+c4+e2+d2, eg=e+g2, cel=c5+e3+l, eh=e+h6, ge=g+e, hc=h+c16;
System.out.println ("The amongus:");
System.out.println (g11 + e10 + g9);
System.out.println (g8 + j + e2 + k + c9 + e3 + g6);
System.out.println (g7 + i + e + j + c8 + d4 + c + i + e2 + g4);
System.out.println (g7 + e + i + cel + h + a4 + h + l + e4 + g);
System.out.println (g6 + i + e + h + c4 + e2 + d + c6 + g5 + c + e2);
System.out.println (g + i + e4 + ehced + c11 + e2);
System.out.println (ge + c4 + ehced + d11 + e2);
System.out.println (d + eheih2 + cel + d6 + l + e3 + h + g);
System.out.println (i + eheih2 + c9 + j + e4 + a + c2 + h + eg);
System.out.println (eheih + hc + f + eg);
System.out.println (eheih + hc + h + eg);
System.out.println (eheih + h2 + c14 + h + k + eg);
System.out.println (i + eheih2 + h4 + a + c9 + h3 + i + eg);
System.out.println (ge + i + h3 + e + i + h18 + e + eg);
System.out.println (g + b + e6 + h7 + e7 + j + h3 + e + b + g2);
System.out.println (g6 + e2 + h7 + e + h + i + eh + i + eg + g);
System.out.println (g6 + i + eh + h + e + c + ge + j + h5 + e + i + g3);
System.out.println (g6 + j + eh + e + eg + e8 + g4);
System.out.println (g7 + i + e7 + g15);
}
}
}
ejemplo hecho con tabs, espacios y líneas vacias (en Java)
          

















En C++ Me puso: Program did not output anything! (puse abcdefghijkl)
Eso es porque tienes que poner espacios entre los carácteres, ya que puedes poner series de carácteres. Se puede cambiar cambiando las variables tipo string por char.
doraemonyaexiste
Scratcher
80 posts

Cosas de poto111 (Ant: Pndjds de Poto111)

Bellota_Azul wrote:

doraemonyaexiste wrote:

canvaques wrote:

¿Qué le pasó al otro foro?
Tengo 2 teorias:
1) El titulo no le gusto a scratch. O:
2) A scratch no le gusto la longitud de los mensajes.
En Scratch, no te dejan hacer foros sin un tema en especifico. Yo habia hecho uno llamado “comunidad random topic” y un moderador de los foros me cerro el topic y me dijo:

Paddle2See wrote:

Hello! The forums are organized and have quite a bit of structure to them - topics need to follow the theme of the forum section. General “no-topic” chats are not permitted, sorry. I suggest you chat on your profile or on a studio.
A mi no me mandaron nada

Powered by DjangoBB