1
Solved

Task doesn't continue after Take Screenshot action

I've got Take Screenshot action, Continue Task After Error option is checked, but task stops after error.

Task: Test Take Screenshot

A1: Take Screenshot [
File: test
Insert In Gallery: On
Continue Task After Error:On ]

A2: Variable Set [
Name: %myerr
To: %err
Max Rounding Digits: 3
Structure Output (JSON, etc): On ]
If [ %err > 0 ]

A3: Flash [
Text: %myerr
Continue Task Immediately: On
Dismiss On Click: On ]


Log:
20220219 20.48.11 E Start ID0:0.0 TaskService
20220219 20.48.25 T Running ID261 Test Take Screenshot
20220219 20.48.25 A OK ID261.1 Test Take Screenshot.Take Screenshot
20220219 20.48.27 T ExitErr ID261 Test Take Screenshot
20220219 20.48.30 E Stop ID0:0.0 TaskService

Android 11, without root.

1 reply

Hi. If you run it manually inside the task what error does it show? Thanks

A

After I tap "Cancel" (on purpose) I get:

17.41.02/E start proxy ProxyTransparent, wait, time limit 20s
17.41.02/E add wait type Proxy Group time 20
17.41.02/E add wait type Proxy Group done
17.41.02/E set proxy: true (startProxy)
17.41.02/Bridge Stored value: 3e2ac5bf-59b8-4615-8cd8-685adb027341
17.41.02/E add wait task
17.41.04/E Error: 1

Use this to remove that prompt :)

https://github.com/joaomgcd/Tasker-Permissions/releases/tag/v0.2.0

A

I know I can do that. But it's not for me. And I need somehow respond if someone won't give a permission.
I tried with:

Ask Permissions [

    Required Permissions: android.permission.PROJECT_MEDIA ]

But it prompt Missing permission, even though I already granted.

Hmmm, can you clarify why it's not for you exactly? What are you trying to do?

A

I make a task for other guy. I need to know if taking screenshot action was successful or not. Because now is possible to disagree to take screenshot and task stops with error, what I don't like. There is no way to respond in proper way (i.e. pop notification).

Can you enable the option to continue task on error and then check the %errmsg variable to see if there's an error?

A

I did it, but nothing changed. %err is empty, same %errmsg. Task stops immediately.

Ok, I figured out the issue! It's a long-standing bug that was present even before I started developing Tasker about 4 years ago! 😁 

I think I fixed it! 

Can you please try this version? https://drive.google.com/file/d/19w0kkEle9oinGusDHMe-1f1u6_xuuifD/view?usp=sharing

If you want you can also check any previous releases here: https://drive.google.com/drive/folders/1GW55YKFiuOZhJVswnt_BQUCJoGm36ugF?usp=sharing

A

Now it works! Thanks!

Great! :) Thanks for testing!

Topic is closed for comments