EN / JA
Getting Started Beginner Updated: 2026-04-10

Greeting Script

The simplest script using Pybes config fields. Enter your name in a text field and get a personalized greeting. Perfect for understanding how config fields work.

A minimal sample for first-time users of Pybes config fields. The script takes a single text input and displays a personalized greeting message.

What this script can do

  • Receive input from a text field
  • Build strings with f-string formatting
  • Display results via print()
Download hello-world.pybes

Import the .pybes file into Pybes and the script — along with its config fields — loads automatically.

Config fields

These are the config fields this script uses. Enter values through the Pybes GUI at runtime.

name Text Required

Your Name

Enter the name to use in the greeting

Default: 太郎

Code walkthrough

# Pybes設定フィールドから値を取得
name = fields["name"]

# あいさつメッセージを組み立てて表示
message = f"こんにちは、{name}さん!"
print(message)
print("Pybesへようこそ。")
L1–2

In Pybes, values from config fields are stored in the `fields` dictionary. `fields["name"]` retrieves the name entered in the text field.

L4–6

Uses an f-string to build a message containing the entered name. `print()` displays the result on screen.

How it works

What is the fields dictionary?

Pybes passes config field values to your script as a Python dictionary called `fields`. Use `fields["name"]` to retrieve the value the user entered.

Why use f-strings?

Available in Python 3.6+, f-strings let you embed variables directly with `f"Hello, {name}!"` syntax — more concise and readable than `+` concatenation or `.format()`.

Customization

Change the message

Just edit the string inside `f"Hello, {name}!"` to customize. For example: `f"{name}, welcome back!"`.

Accept multiple inputs

Add more config fields in the Pybes app and access them via `fields["key_name"]`. Combine with date or number fields for richer scripts.

Troubleshooting

I get KeyError: 'name'

The field key in your Pybes app may not be `name`. Check the config field key in Pybes — it is case-sensitive and must match exactly.

Nothing is displayed

Check the Pybes execution log tab. `print()` output appears in the log tab, not as a popup.

FAQ

Why "greeting"? Is there a more practical starter script?

This script exists to explain — in the shortest possible form — how Pybes passes config field values into your code. Understanding this pattern first makes every other script's code much easier to read.

Can I reuse this code as a starting point for my own scripts?

Please do. The flow of `fields["key"]` → process → `print()` is the standard shape of every Pybes script. Add more config fields or swap the logic to build your own.

See more common questions →
Download hello-world.pybes

Import the .pybes file into Pybes and the script — along with its config fields — loads automatically.