# \[Script\] CASPER Smart Connect Fill – Copy City & Country from connected segments

**URL:** https://www.waze.com/discuss/t/script-casper-smart-connect-fill-copy-city-country-from-connected-segments/395141
**Category:** Addons, Extensions, And Scripts
**Tags:** script
**Created:** [December 5, 2025, 1:11pm UTC](https://www.waze.com/discuss/t/script-casper-smart-connect-fill-copy-city-country-from-connected-segments/395141 "2025-12-05T13:11:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![casper7-21](https://www.waze.com/discuss/user_avatar/www.waze.com/casper7-21/32/118475_2.png) [@casper7-21](https://www.waze.com/discuss/u/casper7-21)
#### Post date: [December 5, 2025, 1:11pm UTC](https://www.waze.com/discuss/t/script-casper-smart-connect-fill-copy-city-country-from-connected-segments/395141/1 "2025-12-05T13:11:21Z")

</div>

Hi everyone,

I’d like to share a small WME script I made for editors:

# CASPER Smart Connect Fill

**Copy City & Country from connected segments for new / just-connected segments**

GreasyFork: [https://greasyfork.org/en/scripts/557991-casper-smart-connect-fill](https://greasyfork.org/en/scripts/557991-casper-smart-connect-fill)  
Author: Ari – simplified & adapted by Casper (Iraq editor)  
Website: [https://casperdevs.com/](https://casperdevs.com/)

* * *

## What the script does

When you draw new segments or connect “fresh” segments to the network, you often have to manually set the **City** and **Country** to match the surrounding roads.

This script:

- Watches your **selected segments** in WME.
- If the segment is **new / unsaved / nameless** , it looks at the **connected segments**.
- It copies only:
  - **City**
  - **Country** (and state, if applicable)

- It **does NOT** touch:
  - Street name
  - Road type
  - Speed limits
  - Lock level

- It only fills **empty / unset** address fields, so it should be safe to use on likely-new segments.

In short: it helps keep City & Country consistent on new segments without overwriting existing data.

* * *

## UI / Settings

The script adds a tab in the right sidebar:

> **CASPER Smart Connect Fill**

Options:

- ✅ **Enable on new / just-connected segments**
- ✅ **Copy City**
- ✅ **Copy State + Country**

There is also a button:

- **Reset processed cache** – clears the internal list of already processed segments.

The script is localized using the WME SDK i18n file, but the tab title is always shown as **“CASPER Smart Connect Fill”**.

* * *

## How to install

1. Install a userscript manager (Tampermonkey is recommended) in your browser.
2. Open the GreasyFork page:  
`https://greasyfork.org/en/scripts/557991-casper-smart-connect-fill`
3. Click **“Install this script”**.
4. Open **Waze Map Editor** , reload if needed.
5. Look for the **CASPER Smart Connect Fill** tab in the sidebar and enable it.

Test it by:

- Drawing a new segment, connecting it to an existing road with proper City & Country.
- Selecting the new segment: City & Country should be filled automatically, while the street name stays empty.

* * *

## Credits & feedback

Original logic based on **“WME Smart Connect Fill”** by **Ari**.  
This fork is simplified for editors who only want **City + Country** to be copied.

If you have any feedback, bugs, or requests, feel free to reply here or contact me on Waze (username: **casper7-21** ) or via my website:  
**[https://casperdevs.com/](https://casperdevs.com/)**

---

<div class="post-metadata">

### Author: ![nzahn1](https://www.waze.com/discuss/user_avatar/www.waze.com/nzahn1/32/107693_2.png) [@nzahn1](https://www.waze.com/discuss/u/nzahn1)
#### Post date: [December 5, 2025, 2:25pm UTC](https://www.waze.com/discuss/t/script-casper-smart-connect-fill-copy-city-country-from-connected-segments/395141/2 "2025-12-05T14:25:17Z")

</div>

Looks like a promising new script! I can’t wait to try it out.

I’ve moved your post over to the #Map Editors Community > Addons, Extensions, And Scripts category, which is the repository for script documentation & feedback.

---

<div class="post-metadata">

### Author: ![casper7-21](https://www.waze.com/discuss/user_avatar/www.waze.com/casper7-21/32/118475_2.png) [@casper7-21](https://www.waze.com/discuss/u/casper7-21)
#### Post date: [December 5, 2025, 3:17pm UTC](https://www.waze.com/discuss/t/script-casper-smart-connect-fill-copy-city-country-from-connected-segments/395141/3 "2025-12-05T15:17:29Z")

</div>

Thank you

---

<div class="post-metadata">

### Author: ![Josevaldos950](https://www.waze.com/discuss/user_avatar/www.waze.com/josevaldos950/32/127254_2.png) [@Josevaldos950](https://www.waze.com/discuss/u/Josevaldos950)
#### Post date: [December 6, 2025, 12:39pm UTC](https://www.waze.com/discuss/t/script-casper-smart-connect-fill-copy-city-country-from-connected-segments/395141/4 "2025-12-06T12:39:35Z")

</div>

I installed and tested the script, and it’s working as described. Congratulations on your contribution.

---

<div class="post-metadata">

### Author: ![casper7-21](https://www.waze.com/discuss/user_avatar/www.waze.com/casper7-21/32/118475_2.png) [@casper7-21](https://www.waze.com/discuss/u/casper7-21)
#### Post date: [December 6, 2025, 6:16pm UTC](https://www.waze.com/discuss/t/script-casper-smart-connect-fill-copy-city-country-from-connected-segments/395141/5 "2025-12-06T18:16:49Z")

</div>

Thank you ❤
