Skip to content

Image target is not saved in profiles or usable from the CLI #98

Closed

Description

@TMHSDigital

Why it matters

Image mode (cbe30bb, Unreleased) cannot be saved, shared or launched from a shortcut. Loading an "Image" profile silently clicks whatever image was captured most recently, which is surprising and potentially unsafe.

Evidence

  • autoclicker/utils/profiles.py:20-40: PROFILE_KEYS has target_mode but not image_path, image_region or image_margin. apply_form_values (gui/features/profiles.py) never restores them.
  • describe_profile (utils/profiles.py:~57-64) has no image branch, so an image profile is summarized as "(x, y)".
  • autoclicker/cli.py:71-76: targets are --at, --cursor, --sequence; there is no --image.
  • README profile-keys table (~line 308) lists keys only up to auto_stop_minutes, already missing sequence/action/condition keys.

Suggested approach

  • Add the image keys to PROFILE_KEYS and apply_form_values; refresh the image label on load; add an "image" summary.
  • Restrict image_path on load/import to files under app_data_dir()/images (reject UNC and arbitrary paths). Shared profiles should not be able to make the app open files from network shares.
  • Export: either embed the PNG (base64) in the export format with a version bump, or omit and warn.
  • Add --image to the CLI (uses the saved capture or a profile's capture).
  • Update the README profile keys and CLI tables.

Done when

  • An image profile round-trips save, load and export/import with tests, including a rejected out-of-folder image_path.
  • --image --headless works and is documented.

Activity

  1. added
    bug
    enhancement
    priority: medium
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenhancementpriority: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions