# Find/Search Image - Switch mode (dark, normal) is not automatic

**URL:** <https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692>\
**Category:** Bugs or Unexpected Behavior\
**Tags:** keyboard\
**Created:** [December 1, 2024, 4:03pm UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692 "2024-12-01T16:03:38Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![xppx99](https://community.folivora.ai/user_avatar/community.folivora.ai/xppx99/32/32907_2.png) [@xppx99](https://community.folivora.ai/u/xppx99)\
**Post date:** [December 1, 2024, 4:03pm UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/1 "2024-12-01T16:03:38Z")

</div>

Hello,

For some applications, I have some keyboard shortcuts that user the "Find/Search Image on Screen & Move Mouse", to save time.

In my Mac, I have the automatic dark mode theme activated when evening comes.

So the problem is that, when the theme changes, for example light version to dark, the shortcuts no longer work, although I have selected the option "Use Different Image If Dark Mode is Active", with the respective image uploaded.

Please see the example of my Obsidian shortcuts:

 ![Screenshot 2024-12-01 at 15.49.46](https://community.folivora.ai/uploads/default/original/3X/e/4/e4c0749ca2fa09809df4bd6759abad545929aff4.jpeg)

The issue is solved by opening the BTT window. It seems to me that the setting is "activated" when I open the BTT windows - when I activate the BTT window, the shortcuts start to work.

* * *

- Type of Mac: MacBook Air M2
- macOS version: Sequoia
- BetterTouchTool version: 4.917 (2024120103)

---

<div class="post-metadata">

**Author:** ![Frank1](https://community.folivora.ai/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@Frank1](https://community.folivora.ai/u/Frank1)\
**Post date:** [December 1, 2024, 5:55pm UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/2 "2024-12-01T17:55:06Z")

</div>

Unfortunately, it is not uncommon for an action to be triggered only after the BTT window has been opened and closed. I experience this when opening websites. I have gotten used to it. 🙂 And of course this statement does not help in any way with troubleshooting.

I'm not sure, but in your case this workaround might help: If the “if image not found” option is enabled, BTT can continue with a named trigger, which can be the next image search. So it doesn't matter which mode is set (dark or not). If the first image is not found, the second one is searched for.

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [December 1, 2024, 6:07pm UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/3 "2024-12-01T18:07:49Z")

</div>

you are right, there seems to be an issue/change with sequoia that prevents BTT's current approach from determining dark mode if BTT doesn't have any open windows. I'll fix that and upload an updated version in 20min.

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [December 1, 2024, 6:36pm UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/4 "2024-12-01T18:36:41Z")

</div>

Should be resolved in v4.918

---

<div class="post-metadata">

**Author:** ![xppx99](https://community.folivora.ai/user_avatar/community.folivora.ai/xppx99/32/32907_2.png) [@xppx99](https://community.folivora.ai/u/xppx99)\
**Post date:** [December 1, 2024, 7:45pm UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/5 "2024-12-01T19:45:56Z")

</div>

Man, it is Sunday, I was not expecting a solution in 2h 😃 😃

Thanks!

---

<div class="post-metadata">

**Author:** ![xppx99](https://community.folivora.ai/user_avatar/community.folivora.ai/xppx99/32/32907_2.png) [@xppx99](https://community.folivora.ai/u/xppx99)\
**Post date:** [December 1, 2024, 7:47pm UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/6 "2024-12-01T19:47:27Z")

</div>

Thanks for the suggestion! It's a smart way to solve the issue, although I would assume, not so efficient.

Anyway, Andreas already did solve it 🙂

Regards

---

<div class="post-metadata">

**Author:** ![K-blanc](https://community.folivora.ai/user_avatar/community.folivora.ai/k-blanc/32/31469_2.png) [@K-blanc](https://community.folivora.ai/u/K-blanc)\
**Post date:** [December 1, 2024, 9:33pm UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/7 "2024-12-01T21:33:51Z")

</div>

Great! Was having the same issue. I got a related question ¿How to return error if image was not found? So when called from a "Try" statement in applescript it would catch the error and do something else. (I'm already using a Named Trigger after founding the image to perform an action)

Thanks!

K.

```auto
	try
			tell application "BetterTouchTool" to execute_assigned_actions_for_trigger "CC5DEA7S-BEF9-4138-7897-E55F1BCB1111" --Find and click Image
		on error
			display dialog "Move cursor over button manually"
		end try

```

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [December 1, 2024, 9:39pm UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/8 "2024-12-01T21:39:58Z")

</div>

There is currently no return value for these. However you can use the similar "If Image Is Visible On Screen" action:

 ![image](https://community.folivora.ai/uploads/default/original/3X/a/0/a0644bd03a969e3476fbd885fc959dbd48efdb0b.jpeg)

---

<div class="post-metadata">

**Author:** ![K-blanc](https://community.folivora.ai/user_avatar/community.folivora.ai/k-blanc/32/31469_2.png) [@K-blanc](https://community.folivora.ai/u/K-blanc)\
**Post date:** [December 1, 2024, 9:50pm UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/9 "2024-12-01T21:50:00Z")

</div>

I was thinking what would be the best way to "simulate" an error? (to the eyes of AS "Try" statement). Otherwise maybe creating Named Trigger to return a specific variable to applescript? What do you think? (To keep the workflow of applescript try-error)

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [December 1, 2024, 9:53pm UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/10 "2024-12-01T21:53:54Z")

</div>

this is currently not possible, BTT's apple script infrastructure can not really return errors (at least none that can be caught)

---

<div class="post-metadata">

**Author:** ![xppx99](https://community.folivora.ai/user_avatar/community.folivora.ai/xppx99/32/32907_2.png) [@xppx99](https://community.folivora.ai/u/xppx99)\
**Post date:** [December 2, 2024, 9:14am UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/11 "2024-12-02T09:14:34Z")

</div>

Hello Andreas,

It's still not working, with Version: 4.918 (2024120104).  
I can reproduce the issue by forcing the theme (Light or Dark) manually (duh.. I could test this yesterday after installing the new version)

Can I activate some debugging log to help you find the issue?

Thanks

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [December 2, 2024, 9:18am UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/12 "2024-12-02T09:18:45Z")

</div>

There are no logs for this unfortunately.

Are you sure it works in general? Maybe it just doesn't find the dark mode image with high enough certainty? (I tried 4.920 on three Macs, two on macOS 15, one on macOS 14)

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [December 2, 2024, 9:22am UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/13 "2024-12-02T09:22:11Z")

</div>

Ah wait, maybe there was an issue with the uploaded build and the fix didn't actually make it to the uploaded alpha. I'll upload a new build now where I make sure it's building from scratch.

---

<div class="post-metadata">

**Author:** ![xppx99](https://community.folivora.ai/user_avatar/community.folivora.ai/xppx99/32/32907_2.png) [@xppx99](https://community.folivora.ai/u/xppx99)\
**Post date:** [December 2, 2024, 11:45am UTC](https://community.folivora.ai/t/find-search-image-switch-mode-dark-normal-is-not-automatic/40692/14 "2024-12-02T11:45:25Z")

</div>

It's fixed now! Thanks!
