Advanced Scene Switcher

Advanced Scene Switcher 1.29.3

JPD

New Member
Hello again.
Unfortunately, I'm still stuck with the following problem:
The stored values in my variable 'ACW___Dummy_Speicher02' are:
0
12
0
14
What conditions/actions do I have to use to execute the following?
The value (0) of the first line should be written to the variable 'ACW_Pre_Cam11'.
The value (12) of the second line should be written to the variable 'ACW_Pre_Cam12'.
The value (0) of the third line should be written to the variable 'ACW_Pre_Cam13'.
And the value (14) of the fourth line should be written to the variable 'ACW_Pre_Cam14'.

Unfortunately, Destroy666's great help isn't helping me, as I don't understand how to read the entire value from a variable and write only a specific part to another variable.
Link


I got a little further with the example from the wiki.
Link
I've adapted what's written there to my case.
Instead of using a variable, I'm working with a source.
Understood, and it's not a problem.​
I don't care where the values are stored.​
The OBS source is fine.​
A variable would be great. Then you'd have everything in one place.​
But an external txt file would also be perfectly fine.​
The further actions shorten the content of the source.
I don't quite understand the RegEx. But it works.​
In the end, the value of my variable 'ACW___Dummy_Speicher02' looks like this:
0\n12\n0\n14
This is where my understanding ends.
How do I write the individual parts (0 & 12 & 0 & 14) of the value into the variable 'ACW_Pre_Cam11'...?

If someone here can explain this in German, that would help me a bit. Otherwise, the translation program is running hot!
 

Warmuptill

Active Member
What conditions/actions do I have to use to execute the following?
The value (0) of the first line should be written to the variable 'ACW_Pre_Cam11'.
The value (12) of the second line should be written to the variable 'ACW_Pre_Cam12'.
The value (0) of the third line should be written to the variable 'ACW_Pre_Cam13'.
And the value (14) of the fourth line should be written to the variable 'ACW_Pre_Cam14'.
You will have to perform the following actions.
  • First assign the value of ACW___Dummy_Speicher02 to each of your ACW_Pre_CamX variables like so:
    1745618479535.png
  • Next up for each of those variables extract the corresponding line using regular expressions like so:
    1745618525477.png

    The following settings have to be used for the regluar expression:
    1745618614113.png

Here it is in action:
Example.gif


If you want to import the example macro you can use this code:

Code:
AAArPHic7Zpbb9s2FID/ikD0YcsiT5KFNvXLkLouZiBNvTjNHtYsoKUjiYtEChTlOQvy33eomym7CbYEGGZUBQpIh+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KR0zBEJfxNxWz8ExxyWsBlm5OkPBTZeZmtQO6NdX85TNUZjo0Rz9lRjfFRJFWgfydjXe56LP4oBP+lBHmnF3VUiAxGHBB64ah2VGvsPn/Ps1my/zfFvIFiA8UGig0UO2iKjQeKDRQbKDZQ7KAp5g8UGyg2UGyg2EFT7CXvxf4trE7+S1j9Pjp69QSq3ANFlT+gakDVt4mql7z8OmRUHepfVQOqBlR9o6h6yRuuQ0bVeEDVgKoBVYeEqpe8xjpkVPkDqgZUDajqlewae9Z9aNZ84FU1um1fJdNqa0PQfdL59XfausF03TitYocQ0TJVHUU0IvnXX009z/L5McfPtvT/gWX3vRy2rISmwF39iTvy3o7GtuvZ8cr3V37wZkwe/gYobIfg

I hope that helped and I understood the request correctly! :)
 

Tallicia

Member
How can I setup OCR only to return a character subset such as the 12 elements in the array " .:0123456789" ?

Docs from above link show it is functionally there by setting the whitelist

1745648302907.png
 

JPD

New Member
You will have to perform the following actions.
  • First assign the value of ACW___Dummy_Speicher02 to each of your ACW_Pre_CamX variables like so:View attachment 113080
  • Next up for each of those variables extract the corresponding line using regular expressions like so:
    View attachment 113081
    The following settings have to be used for the regluar expression:
    View attachment 113082

Here it is in action:
View attachment 113083

If you want to import the example macro you can use this code:

Code:
AAArPHic7Zpbb9s2FID/ikD0YcsiT5KFNvXLkLouZiBNvTjNHtYsoKUjiYtEChTlOQvy33eomym7CbYEGGZUBQpIh+emc/kcCLonGQ2kKMjkt3vCaQZkQmYbmuUpkGMSS1HmZBLRtIBjktOygCVdwztI6JoJSSZOIzV0JE1TSDtBkEBwOxU8ZIoJXsz5otNQskQFwacJ5TG098Uty2cbCD7xpaJSdY4KJfLToHYSnQv1XvBtWJ1YIqSaMhmUTM3WNC2p1jU1piX6yLpcpjqzOVcgUXub75NK90R7BuPCGXlvd/4dE3WX66MHDMuZqsq0BllU+bgoDUVwuwSlGI8L7UtCzAqM0WWR0OKi5O9KpbRJXRiULXSt96RYJ1UWZ3RllD1hcZLifzWPtsW/lOW2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0TJVHUU0IvnXX009z/L5McfPtvT/gWX3vRy2rISmwF39iTvy3o7GtuvZ8cr3V37wZkwe/gYobIfg

I hope that helped and I understood the request correctly! :)
YES! YES! YES!
That's it!
I now understand this process and the syntax based on the example.
Thank you very much
 

Destroy666

Member
How can I setup OCR only to return a character subset such as the 12 elements in the array " .:0123456789" ?

Docs from above link show it is functionally there by setting the whitelist

View attachment 113088
No such feature is available. I think a good thing to add would be an ability to pass custom Tesseract params/args to cover more than by implementing individual settings like that.
 

JPD

New Member
Hello.
It's a new day!
A new problem.
Variable 1 contains a random value from 11, 12, 13, or 14.
Variable 2 contains multiple rows of values:
11
0
13
14

Is the following possible?
If the random value of variable 1 is present in the values of variable 2, execute the next action/macro.
If the random value of variable 1 is NOT present in the values of variable 2, execute another action/macro (new random value).
For example:
Variable 1: 12
Variable 2:
11
0
13
14
No match (generate a new random value or execute another macro)

Variable 1: 14
Variable 2:
11
0
13
14
Match, perform action/macro blah blah

Greets from Germany
 

Warmuptill

Active Member
Is the following possible?
If the random value of variable 1 is present in the values of variable 2, execute the next action/macro.
If the random value of variable 1 is NOT present in the values of variable 2, execute another action/macro (new random value).
That should be doable using a condition like this:
1745684695584.png

The regex is configured like this:
1745684713634.png

(I have adapted the name of "Variable 1" to "Random Value" and "Variable 2" to "Value List" to avoid misunderstandings)

New random values can be generated like this:
1745684684539.png


So the complete macro might be:
1745685042874.png


Hope that helps!

How can I setup OCR only to return a character subset such as the 12 elements in the array " .:0123456789" ?

Docs from above link show it is functionally there by setting the whitelist

View attachment 113088
As mentioned already by @Destroy666 this is currently not supported, but I will try to look into it and add that as an option.
 

JPD

New Member
<
That should be doable using a condition like this:
View attachment 113092
The regex is configured like this:
View attachment 113093
(I have adapted the name of "Variable 1" to "Random Value" and "Variable 2" to "Value List" to avoid misunderstandings)

New random values can be generated like this:
View attachment 113091

So the complete macro might be:
View attachment 113096

Hope that helps!


As mentioned already by @Destroy666 this is currently not supported, but I will try to look into it and add that as an option.
The result looks so simple.
But if you don't understand what all the characters do, you won't get very far.
Thank you so much again!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 

Tallicia

Member
No such feature is available. I think a good thing to add would be an ability to pass custom Tesseract params/args to cover more than by implementing individual settings like that.
I concur, the appropriate implementation would to be able to generalize CLI options. I was hoping the integration already existed such that there was a config file that could be updated/created and used as such. fingers crossed.

@Warmuptill Thanks again for all your excellent efforts and responses! <3
 

Tallicia

Member
@Warmuptill FYI - In my case, an ideal KISS approach would be if I could get access to the metadata of time since a variable has changed. - And be able to format the time ( in my case MMM:ss.sss )

For context. right now I am trying to OCR the timer from when a "Start" occurs. I have this in essence already when the json I am using currently switches a value to true. I see in the interface there is a time since change which is almost exactly what is needed. It just needs to be able to be accessed and formatted. The #.# of minutes since last change is not in the needed format.

I'm trying to display the timer in conjunction with other events in a log and in chat/messages for those who need to be able to hear events with impaired vision in review.

If we could access the metadata on a variable like time since value changed, and then be able to format it, that would simplify workarounds and things considerably.

Thank you again and I hope you are having a great weekend and month and don't see this until you are done having a great time doing whatever you enjoy most!
 

kanewesley

New Member
The condition was met, and the operation under the established condition was executed, but the OCR information was not transmitted or updated.

Hello Warmuptill, my previous feedback/replies might have been overlooked above. Please scroll up to check. Thank you for your selfless dedication! We sincerely appreciate your continuous efforts to improve and refine the project!
 

Warmuptill

Active Member
Hello Warmuptill, my previous feedback/replies might have been overlooked above. Please scroll up to check. Thank you for your selfless dedication! We sincerely appreciate your continuous efforts to improve and refine the project!
Sorry, I did indeed miss your reply!

I think I was able to track down the problem.
A new build with a fix will be available here in a few minutes:

Let me know if you find any other issues! :)

@Warmuptill FYI - In my case, an ideal KISS approach would be if I could get access to the metadata of time since a variable has changed. - And be able to format the time ( in my case MMM:ss.sss )

For context. right now I am trying to OCR the timer from when a "Start" occurs. I have this in essence already when the json I am using currently switches a value to true. I see in the interface there is a time since change which is almost exactly what is needed. It just needs to be able to be accessed and formatted. The #.# of minutes since last change is not in the needed format.

I'm trying to display the timer in conjunction with other events in a log and in chat/messages for those who need to be able to hear events with impaired vision in review.

If we could access the metadata on a variable like time since value changed, and then be able to format it, that would simplify workarounds and things considerably.

Thank you again and I hope you are having a great weekend and month and don't see this until you are done having a great time doing whatever you enjoy most!
I will add it to the todo list :)

I know it is not exactly what you are asking for, but I thought I would mention it in case it helps somehow:

What you can already do is setup a helper macro which populates date related variables as shown in this wiki page:

Then you could use those variables to construct a timestamp when the value of a variable changed:
1745781270620.png
 

Tallicia

Member
Sorry, I did indeed miss your reply!

I think I was able to track down the problem.
A new build with a fix will be available here in a few minutes:

Let me know if you find any other issues! :)


I will add it to the todo list :)

I know it is not exactly what you are asking for, but I thought I would mention it in case it helps somehow:

What you can already do is setup a helper macro which populates date related variables as shown in this wiki page:

Then you could use those variables to construct a timestamp when the value of a variable changed:
View attachment 113124
Thank you for this alternative suggestion, I'll see if I can take it far enough to meet the need. The one thing I am looking for is the elapsed timing since the change, and this looks like it is the point in time that the change occurred. I haven't found a way to get the current date time to then be able to calculate the delta/timing, but I'll look through docs and code to see if that is exposed. Both of which if I can't find them would be ideal, both "system"/core variables like current date time and ability to calculate time deltas and format them.

Thanks again, hope all is going great and you had a wonderful weekend! :)
 

kanewesley

New Member
Sorry, I did indeed miss your reply!

I think I was able to track down the problem.
A new build with a fix will be available here in a few minutes:

Let me know if you find any other issues! :)


I will add it to the todo list :)

I know it is not exactly what you are asking for, but I thought I would mention it in case it helps somehow:

What you can already do is setup a helper macro which populates date related variables as shown in this wiki page:

Then you could use those variables to construct a timestamp when the value of a variable changed:
View attachment 113124

Hello Warmuptill,

Thank you very much for the update. However, my test results remain unchanged—I still cannot get the updated outcome. Let me explain the situation in more detail using one of my macros with OCR conditions as an example.

  1. Macro Setup:
    • I have a macro that includes an OCR condition targeting the runtime of a game. It performs OCR every 0.9 seconds to retrieve the game time via the macro property and writes it to a variable.
    • OCR时间的条件.jpg

    • OCR game time
    • OCR的目标为游戏的时间.png
  2. Post-Update Action:
    • As per your update, I checked the option (shown in the screenshot) for all OCR-containing macros to skip sequential condition checks.
    • 宏设置中已经勾选了这个选项.png
  3. Observed Issue:
    • The variable for the game time (retrieved via macro property) is not updating. This is evident from the timestamp of the last update.
    • OCR宏属性没有得到更新结果.jpg
  4. Condition Verification:
    • The condition itself is being met—I enabled the "flash green when condition is met/operation runs" feature and observed the correct green flashes.
    • OCR按时间运行正确.jpg
  5. Additional Test:
    • I added a TEST01 variable that increments by 1 each time the macro runs. This part works correctly, confirming timely execution and updates.
    • TEST01增加1检测确定运行操作.jpg

    • TEST01 result
    • TEST01的结果正确增加且按时更新.png
  6. Manual Trigger Test:
    • If I manually run the macro twice, the OCR result updates only for that triggered instance, but subsequent automated runs remain stuck without updates.
    • 手动点击两次运行宏,结果得到更新.png
  7. Workaround Discovery:
    • When I uncheck the "skip sequential condition check" option for this macro, the OCR result updates properly and on time. Interestingly, other macros with OCR (which still have the option checked) do not interfere with this macro’s OCR execution—even those requiring longer processing time.
    • OCR结果会得到更新。.jpg
    • OCR game time result
    • OCR的结果会更新,这只是其中一个OCR,其他勾选了的不更新。.jpg
Attachments:
I’ve included some screenshots for reference. Since my system and variables are primarily in Chinese, please let me know if anything is unclear—I’m happy to clarify.

Once again, thank you so much for your efforts. I truly appreciate your support!
 

Warmuptill

Active Member
Hello Warmuptill,

Thank you very much for the update. However, my test results remain unchanged—I still cannot get the updated outcome. Let me explain the situation in more detail using one of my macros with OCR conditions as an example.

  1. Macro Setup:
    • I have a macro that includes an OCR condition targeting the runtime of a game. It performs OCR every 0.9 seconds to retrieve the game time via the macro property and writes it to a variable.
    • View attachment 113139
    • OCR game time
    • View attachment 113142
  2. Post-Update Action:
    • As per your update, I checked the option (shown in the screenshot) for all OCR-containing macros to skip sequential condition checks.
    • View attachment 113147
  3. Observed Issue:
    • The variable for the game time (retrieved via macro property) is not updating. This is evident from the timestamp of the last update.
    • View attachment 113140
  4. Condition Verification:
    • The condition itself is being met—I enabled the "flash green when condition is met/operation runs" feature and observed the correct green flashes.
    • View attachment 113141
  5. Additional Test:
  6. Manual Trigger Test:
    • If I manually run the macro twice, the OCR result updates only for that triggered instance, but subsequent automated runs remain stuck without updates.
    • View attachment 113149
  7. Workaround Discovery:
    • When I uncheck the "skip sequential condition check" option for this macro, the OCR result updates properly and on time. Interestingly, other macros with OCR (which still have the option checked) do not interfere with this macro’s OCR execution—even those requiring longer processing time.
    • View attachment 113146
    • OCR game time result
    • View attachment 113145
Attachments:
I’ve included some screenshots for reference. Since my system and variables are primarily in Chinese, please let me know if anything is unclear—I’m happy to clarify.

Once again, thank you so much for your efforts. I truly appreciate your support!
Thanks for clarifying in such detail what exactly the problem is!

The macro property not being assigned to the variable is exactly what I intended to fix with the most recent test build.
But I might have missed some corner case and will have another look.

Would you mind sharing yet another OBS log file with the most recent build?
 

kanewesley

New Member
Thanks for clarifying in such detail what exactly the problem is!

The macro property not being assigned to the variable is exactly what I intended to fix with the most recent test build.
But I might have missed some corner case and will have another look.

Would you mind sharing yet another OBS log file with the most recent build?

Yes, of course! Here is the log file.
 

Attachments

  • 2025-04-28 16-45-10.txt
    97.1 KB · Views: 5

Warmuptill

Active Member
Last edited:

Tallicia

Member
Hello Warmuptill,

Thank you very much for the update. However, my test results remain unchanged—I still cannot get the updated outcome. Let me explain the situation in more detail using one of my macros with OCR conditions as an example.

  1. Macro Setup:
    • I have a macro that includes an OCR condition targeting the runtime of a game. It performs OCR every 0.9 seconds to retrieve the game time via the macro property and writes it to a variable.
    • View attachment 113139
    • OCR game time
    • View attachment 113142
  2. Post-Update Action:
    • As per your update, I checked the option (shown in the screenshot) for all OCR-containing macros to skip sequential condition checks.
    • View attachment 113147
  3. Observed Issue:
    • The variable for the game time (retrieved via macro property) is not updating. This is evident from the timestamp of the last update.
    • View attachment 113140
  4. Condition Verification:
    • The condition itself is being met—I enabled the "flash green when condition is met/operation runs" feature and observed the correct green flashes.
    • View attachment 113141
  5. Additional Test:
  6. Manual Trigger Test:
    • If I manually run the macro twice, the OCR result updates only for that triggered instance, but subsequent automated runs remain stuck without updates.
    • View attachment 113149
  7. Workaround Discovery:
    • When I uncheck the "skip sequential condition check" option for this macro, the OCR result updates properly and on time. Interestingly, other macros with OCR (which still have the option checked) do not interfere with this macro’s OCR execution—even those requiring longer processing time.
    • View attachment 113146
    • OCR game time result
    • View attachment 113145
Attachments:
I’ve included some screenshots for reference. Since my system and variables are primarily in Chinese, please let me know if anything is unclear—I’m happy to clarify.

Once again, thank you so much for your efforts. I truly appreciate your support!
@kanewesley Thank you so much for this detailed overview. I think I have been dealing with this thinking I was doing something wrong because I am new to using this.
@Warmuptill Thank you for the updated build, I'll try it out in a bit as well.
 
Top