[Help] Save MMS On Received - Tasker Tips & Tricks

I have this setup and its working but not how I want.*
Code:
Save (66)
A1: List Files [ Dir:/data/data/com.android.providers.telephony/app_parts/ Match: Include Hidden Files:eek:n Use Root:eek:n Variable:%Pics ]
A2: Variable Set [ Name:%ContactName To:%SMSRN Do Maths:eek:ff Append:eek:ff ]
A3: For [ Variable:%Pics Items:%Pics() ]
A4: Copy File [ From:%Pics To:DCIM/Contact Pics/%SMSRN_%SMSRT.mp4 Use Root:eek:n ] If [ %Pics ~ *.mp4* & %SMSRT ~ %SMSRT ]
A5: Copy File [ From:%Pics To:DCIM/Contact Pics/%SMSRN_%SMSRT.jpg Use Root:eek:n ] If [ %Pics ~ *.jpg* & %SMSRT ~ %SMSRT ]
A6: Delete File [ File:%Pics Shred Level:0 Use Root:eek:n ]
A7: End For
What I have is not in this but when this runs it then deletes the file. Which in turns makes it so it's removed from message thread. How can I make this only copy new files and retain the old ones?
Sent from my Nexus 6P using Tapatalk

Save (66)
A1: List Files [ Dir:/data/data/com.android.providers.telephony/app_parts/ Match: Include Hidden Filesn Use Rootn Variable:%Pics ]
A2: Variable Set [ Name:%ContactName To:%SMSRN Do Mathsff Appendff ]
A3: Variable Set [ Name:%LastDate To:%FileDate Do Mathsff Appendff ]
A4: For [ Variable:%Pics Items:%Pics() ]
A5: Test File [ Type:Modified Data:%Pics Store Result In:%FileDate Use Rootn ]
A6: Copy File [ From:%Pics ToCIM/Contact Pics/%SMSRN_%SMSRT.mp4 Use Rootn ] If [ %Pics ~ *.mp4* & %FileDate > %LastDate ]
A7: Copy File [ From:%Pics ToCIM/Contact Pics/%SMSRN_%SMSRT.jpg Use Rootn ] If [ %Pics ~ *.jpg* & %FileDate > %LastDate ]
A8: End For
This seems to work I'd anyone else wants to use it
Sent from my Nexus 6P using Tapatalk

Hey so this code is good but not great. Anyone know how to write it better? Its really resource heavy.
Save (66)
A1: List Files [ Dir:/data/data/com.android.providers.telephony/app_parts/ Match: Include Hidden Filesn Use Rootn Variable:%Pics ]
A2: Variable Set [ Name:%ContactName To:%SMSRN Do Mathsff Appendff ]
A3: Variable Set [ Name:%LastDate To:%FileDate Do Mathsff Appendff ]
A4: For [ Variable:%Pics Items:%Pics() ]
A5: Test File [ Type:Modified Data:%Pics Store Result In:%FileDate Use Rootn ]
A6: Copy File [ From:%Pics ToCIM/Contact Pics/%SMSRN_%SMSRT.mp4 Use Rootn ] If [ %Pics ~ *.mp4* & %FileDate > %LastDate ]
A7: Copy File [ From:%Pics ToCIM/Contact Pics/%SMSRN_%SMSRT.jpg Use Rootn ] If [ %Pics ~ *.jpg* & %FileDate > %LastDate ]
A8: [X] Delete File [ File:%Pics Shred Level:0 Use Rootn ]
A9: End For
Sent from my Nexus 6P using Tapatalk

Related

[Q] walloid random wallpaper

How can i get a wallpaper daily from walloid automatically using tasker???
Code:
Wallppr (154)
A1: List Files [ Dir:backgrnds Match: Include Hidden Files:eek:ff Use Root:eek:ff Variable:%files ]
A2: Variable Set [ Name:%max To:%files(#) Do Maths:eek:ff Append:eek:ff ]
A3: Variable Randomize [ Name:%index Min:1 Max:%max ]
A4: Variable Set [ Name:%Wallppr To:%files(%index) Do Maths:eek:ff Append:eek:ff ]
A5: Variable Split [ Name:%Wallppr Splitter:/ Delete Base:eek:ff ]
A6: Flash [ Text:%Wallppr5/%Wallppr6 Long:eek:n ]
A7: Set Wallpaper [ Image:%Wallppr5/%Wallppr6 Scale:eek:n Crop:eek:ff ]
Just for fun, here are a few others:
NoiseChng3 (373)
A1: If [ %GuestNet ~ True ]
A2: Variable Set [ Name:%RingDir To:rINGS_nOTIFS/work Do Maths:eek:ff Append:eek:ff ]
A3: Else
A4: Variable Set [ Name:%RingDir To:rINGS_nOTIFS/off Do Maths:eek:ff Append:eek:ff ]
A5: End If
A6: List Files [ Dir:%RingDir Match: Include Hidden Files:eek:n Use Root:eek:n Variable:%files ]
A7: Variable Set [ Name:%max To:%files(#) Do Maths:eek:ff Append:eek:ff ]
A8: Variable Randomize [ Name:%index Min:1 Max:%max ]
A9: Variable Set [ Name:%Index To:%index Do Maths:eek:n Append:eek:ff ]
A10: Variable Set [ Name:%Notif To:%files(%index) Do Maths:eek:ff Append:eek:ff ]
A11: Variable Split [ Name:%Notif Splitter:/ Delete Base:eek:ff ]
A12: Variable Split [ Name:%Notif7 Splitter:. Delete Base:eek:ff ]
A13: Flash [ Text:%Notif71 Long:eek:ff ]
A14: If [ %Noise ~ Phone ]
A15: Default Ringtone [ Type:Ringer Sound:%Notif71 ]
A16: Variable Set [ Name:%Ringername To:%Notif71 Do Maths:eek:ff Append:eek:ff ]
A17: Zooper Widget Pro Variable [ Configuration:#TRing# = %Ringername Timeout (Seconds):0 ]
A18: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A19: Perform Task [ Name:RingerQuery1 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:n ]
A20: Else
A21: Default Ringtone [ Type:Notification Sound:%Notif71 ]
A22: Variable Set [ Name:%Notifname To:%Notif71 Do Maths:eek:ff Append:eek:ff ]
A23: Zooper Widget Pro Variable [ Configuration:#TNotif# = %Notifname Timeout (Seconds):0 ]
A24: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A25: Perform Task [ Name:NotifQuery1 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:n ]
A26: End If
NotifQuery1 (375)
A1: If [ %Index eq %Index1 | %Index eq %Index2 | %Index eq %Index3 | %Index eq %Index4 | %Index eq %Index5 | %Notif71 ~ *unknown ringtone* ]
A2: Write File [ File:Notif.txt Text:Notif: %DATE %TIME
Dedupe: %Index
%Index1
%Index2
%Index3
%Index4
%Index5 Append:eek:n Add Newline:eek:n ]
A3: Flash [ Text:Damn it! I'll try again... Long:eek:n ]
A4: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
A5: Else
A6: Write File [ File:Notif.txt Text:Notif: %DATE %TIME: %Index
%Index1
%Index2
%Index3
%Index4
%Index5 Append:eek:n Add Newline:eek:n ]
RingerQuery1 (376)
A1: If [ %Index eq %Index1 | %Index eq %Index2 | %Index eq %Index3 | %Index eq %Index4 | %Index ~ %Index5 | %Notif71 ~ *unknown ringtone" ]
A2: Write File [ File:Notif.txt Text:Phone: %DATE %TIME
Dedupe: %Index
%Index1
%Index2
%Index3
%Index4
%Index5 Append:eek:n Add Newline:eek:n ]
A3: Flash [ Text:Damn it! I'll try again... Long:eek:n ]
A4: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
A5: Else
A6: Write File [ File:Notif.txt Text:Phone: %DATE %TIME: %Index
%Index1
%Index2
%Index3
%Index4
%Index5 Append:eek:n Add Newline:eek:n ]
---------- Post added at 01:10 PM ---------- Previous post was at 01:05 PM ----------
Code:
Cal (320)
A1: Perform Task [ Name:NotifLauncher Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
A2: Variable Clear [ Name:%Noise Pattern Matching:eek:ff ]
A3: Variable Set [ Name:%Index5 To:%Index4 Do Maths:eek:n Append:eek:ff ]
A4: Variable Set [ Name:%Index4 To:%Index3 Do Maths:eek:n Append:eek:ff ]
A5: Variable Set [ Name:%Index3 To:%Index2 Do Maths:eek:n Append:eek:ff ]
A6: Variable Set [ Name:%Index2 To:%Index1 Do Maths:eek:n Append:eek:ff ]
A7: Variable Set [ Name:%Index1 To:%Index Do Maths:eek:ff Append:eek:ff ]
A8: Flash [ Text:Right! Let's see what we come up with... Long:eek:ff ]
A9: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
Phone (318)
A1: Variable Set [ Name:%Noise To:Phone Do Maths:eek:ff Append:eek:ff ]
A2: Destroy Scene [ Name:%PopUp Continue Task After Error:eek:n ]
A3: Variable Set [ Name:%Index5 To:%Index4 Do Maths:eek:n Append:eek:ff ]
A4: Variable Set [ Name:%Index4 To:%Index3 Do Maths:eek:n Append:eek:ff ]
A5: Variable Set [ Name:%Index3 To:%Index2 Do Maths:eek:n Append:eek:ff ]
A6: Variable Set [ Name:%Index2 To:%Index1 Do Maths:eek:n Append:eek:ff ]
A7: Variable Set [ Name:%Index1 To:%Index Do Maths:eek:ff Append:eek:ff ]
A8: Flash [ Text:Right! Let's see what we come up with... Long:eek:ff ]
A9: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
Txt (319)
A1: Variable Clear [ Name:%Noise Pattern Matching:eek:ff ]
A2: Variable Set [ Name:%Index5 To:%Index4 Do Maths:eek:n Append:eek:ff ]
A3: Variable Set [ Name:%Index4 To:%Index3 Do Maths:eek:n Append:eek:ff ]
A4: Variable Set [ Name:%Index3 To:%Index2 Do Maths:eek:n Append:eek:ff ]
A5: Variable Set [ Name:%Index2 To:%Index1 Do Maths:eek:n Append:eek:ff ]
A6: Variable Set [ Name:%Index1 To:%Index Do Maths:eek:ff Append:eek:ff ]
A7: Flash [ Text:Right! Let's see what we come up with... Long:eek:ff ]
A8: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
Profiles:
Code:
Profile: Calengoo1 (199)
Event: AutoNotification Intercept [ Configuration:Event Behaviour: true
Notification Type: Only Created Notifications
Notification App: CalenGoo
Package Name: com.calengoo.android ]
Enter: Cal (320)
A1: Perform Task [ Name:NotifLauncher Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
A2: Variable Clear [ Name:%Noise Pattern Matching:eek:ff ]
A3: Variable Set [ Name:%Index5 To:%Index4 Do Maths:eek:n Append:eek:ff ]
A4: Variable Set [ Name:%Index4 To:%Index3 Do Maths:eek:n Append:eek:ff ]
A5: Variable Set [ Name:%Index3 To:%Index2 Do Maths:eek:n Append:eek:ff ]
A6: Variable Set [ Name:%Index2 To:%Index1 Do Maths:eek:n Append:eek:ff ]
A7: Variable Set [ Name:%Index1 To:%Index Do Maths:eek:ff Append:eek:ff ]
A8: Flash [ Text:Right! Let's see what we come up with... Long:eek:ff ]
A9: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
Profile: FunNotifTxt (24)
Event: Received Text [ Type:Any Sender:* Content:* ]
Enter: Txt (319)
A1: Variable Clear [ Name:%Noise Pattern Matching:eek:ff ]
A2: Variable Set [ Name:%Index5 To:%Index4 Do Maths:eek:n Append:eek:ff ]
A3: Variable Set [ Name:%Index4 To:%Index3 Do Maths:eek:n Append:eek:ff ]
A4: Variable Set [ Name:%Index3 To:%Index2 Do Maths:eek:n Append:eek:ff ]
A5: Variable Set [ Name:%Index2 To:%Index1 Do Maths:eek:n Append:eek:ff ]
A6: Variable Set [ Name:%Index1 To:%Index Do Maths:eek:ff Append:eek:ff ]
A7: Flash [ Text:Right! Let's see what we come up with... Long:eek:ff ]
A8: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
Profile: PhoneCall (153)
State: Call [ Type:Incoming Number:* ]
Enter: Phone (318)
A1: Variable Set [ Name:%Noise To:Phone Do Maths:eek:ff Append:eek:ff ]
A2: Destroy Scene [ Name:%PopUp Continue Task After Error:eek:n ]
A3: Variable Set [ Name:%Index5 To:%Index4 Do Maths:eek:n Append:eek:ff ]
A4: Variable Set [ Name:%Index4 To:%Index3 Do Maths:eek:n Append:eek:ff ]
A5: Variable Set [ Name:%Index3 To:%Index2 Do Maths:eek:n Append:eek:ff ]
A6: Variable Set [ Name:%Index2 To:%Index1 Do Maths:eek:n Append:eek:ff ]
A7: Variable Set [ Name:%Index1 To:%Index Do Maths:eek:ff Append:eek:ff ]
A8: Flash [ Text:Right! Let's see what we come up with... Long:eek:ff ]
A9: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
nijohnson said:
Code:
Wallppr (154)
A1: List Files [ Dir:backgrnds Match: Include Hidden Files:eek:ff Use Root:eek:ff Variable:%files ]
A2: Variable Set [ Name:%max To:%files(#) Do Maths:eek:ff Append:eek:ff ]
A3: Variable Randomize [ Name:%index Min:1 Max:%max ]
A4: Variable Set [ Name:%Wallppr To:%files(%index) Do Maths:eek:ff Append:eek:ff ]
A5: Variable Split [ Name:%Wallppr Splitter:/ Delete Base:eek:ff ]
A6: Flash [ Text:%Wallppr5/%Wallppr6 Long:eek:n ]
A7: Set Wallpaper [ Image:%Wallppr5/%Wallppr6 Scale:eek:n Crop:eek:ff ]
Just for fun, here are a few others:
NoiseChng3 (373)
A1: If [ %GuestNet ~ True ]
A2: Variable Set [ Name:%RingDir To:rINGS_nOTIFS/work Do Maths:eek:ff Append:eek:ff ]
A3: Else
A4: Variable Set [ Name:%RingDir To:rINGS_nOTIFS/off Do Maths:eek:ff Append:eek:ff ]
A5: End If
A6: List Files [ Dir:%RingDir Match: Include Hidden Files:eek:n Use Root:eek:n Variable:%files ]
A7: Variable Set [ Name:%max To:%files(#) Do Maths:eek:ff Append:eek:ff ]
A8: Variable Randomize [ Name:%index Min:1 Max:%max ]
A9: Variable Set [ Name:%Index To:%index Do Maths:eek:n Append:eek:ff ]
A10: Variable Set [ Name:%Notif To:%files(%index) Do Maths:eek:ff Append:eek:ff ]
A11: Variable Split [ Name:%Notif Splitter:/ Delete Base:eek:ff ]
A12: Variable Split [ Name:%Notif7 Splitter:. Delete Base:eek:ff ]
A13: Flash [ Text:%Notif71 Long:eek:ff ]
A14: If [ %Noise ~ Phone ]
A15: Default Ringtone [ Type:Ringer Sound:%Notif71 ]
A16: Variable Set [ Name:%Ringername To:%Notif71 Do Maths:eek:ff Append:eek:ff ]
A17: Zooper Widget Pro Variable [ Configuration:#TRing# = %Ringername Timeout (Seconds):0 ]
A18: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A19: Perform Task [ Name:RingerQuery1 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:n ]
A20: Else
A21: Default Ringtone [ Type:Notification Sound:%Notif71 ]
A22: Variable Set [ Name:%Notifname To:%Notif71 Do Maths:eek:ff Append:eek:ff ]
A23: Zooper Widget Pro Variable [ Configuration:#TNotif# = %Notifname Timeout (Seconds):0 ]
A24: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A25: Perform Task [ Name:NotifQuery1 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:n ]
A26: End If
NotifQuery1 (375)
A1: If [ %Index eq %Index1 | %Index eq %Index2 | %Index eq %Index3 | %Index eq %Index4 | %Index eq %Index5 | %Notif71 ~ *unknown ringtone* ]
A2: Write File [ File:Notif.txt Text:Notif: %DATE %TIME
Dedupe: %Index
%Index1
%Index2
%Index3
%Index4
%Index5 Append:eek:n Add Newline:eek:n ]
A3: Flash [ Text:Damn it! I'll try again... Long:eek:n ]
A4: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
A5: Else
A6: Write File [ File:Notif.txt Text:Notif: %DATE %TIME: %Index
%Index1
%Index2
%Index3
%Index4
%Index5 Append:eek:n Add Newline:eek:n ]
RingerQuery1 (376)
A1: If [ %Index eq %Index1 | %Index eq %Index2 | %Index eq %Index3 | %Index eq %Index4 | %Index ~ %Index5 | %Notif71 ~ *unknown ringtone" ]
A2: Write File [ File:Notif.txt Text:Phone: %DATE %TIME
Dedupe: %Index
%Index1
%Index2
%Index3
%Index4
%Index5 Append:eek:n Add Newline:eek:n ]
A3: Flash [ Text:Damn it! I'll try again... Long:eek:n ]
A4: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
A5: Else
A6: Write File [ File:Notif.txt Text:Phone: %DATE %TIME: %Index
%Index1
%Index2
%Index3
%Index4
%Index5 Append:eek:n Add Newline:eek:n ]
---------- Post added at 01:10 PM ---------- Previous post was at 01:05 PM ----------
Code:
Cal (320)
A1: Perform Task [ Name:NotifLauncher Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
A2: Variable Clear [ Name:%Noise Pattern Matching:eek:ff ]
A3: Variable Set [ Name:%Index5 To:%Index4 Do Maths:eek:n Append:eek:ff ]
A4: Variable Set [ Name:%Index4 To:%Index3 Do Maths:eek:n Append:eek:ff ]
A5: Variable Set [ Name:%Index3 To:%Index2 Do Maths:eek:n Append:eek:ff ]
A6: Variable Set [ Name:%Index2 To:%Index1 Do Maths:eek:n Append:eek:ff ]
A7: Variable Set [ Name:%Index1 To:%Index Do Maths:eek:ff Append:eek:ff ]
A8: Flash [ Text:Right! Let's see what we come up with... Long:eek:ff ]
A9: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
Phone (318)
A1: Variable Set [ Name:%Noise To:Phone Do Maths:eek:ff Append:eek:ff ]
A2: Destroy Scene [ Name:%PopUp Continue Task After Error:eek:n ]
A3: Variable Set [ Name:%Index5 To:%Index4 Do Maths:eek:n Append:eek:ff ]
A4: Variable Set [ Name:%Index4 To:%Index3 Do Maths:eek:n Append:eek:ff ]
A5: Variable Set [ Name:%Index3 To:%Index2 Do Maths:eek:n Append:eek:ff ]
A6: Variable Set [ Name:%Index2 To:%Index1 Do Maths:eek:n Append:eek:ff ]
A7: Variable Set [ Name:%Index1 To:%Index Do Maths:eek:ff Append:eek:ff ]
A8: Flash [ Text:Right! Let's see what we come up with... Long:eek:ff ]
A9: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
Txt (319)
A1: Variable Clear [ Name:%Noise Pattern Matching:eek:ff ]
A2: Variable Set [ Name:%Index5 To:%Index4 Do Maths:eek:n Append:eek:ff ]
A3: Variable Set [ Name:%Index4 To:%Index3 Do Maths:eek:n Append:eek:ff ]
A4: Variable Set [ Name:%Index3 To:%Index2 Do Maths:eek:n Append:eek:ff ]
A5: Variable Set [ Name:%Index2 To:%Index1 Do Maths:eek:n Append:eek:ff ]
A6: Variable Set [ Name:%Index1 To:%Index Do Maths:eek:ff Append:eek:ff ]
A7: Flash [ Text:Right! Let's see what we come up with... Long:eek:ff ]
A8: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
Profiles:
Code:
Profile: Calengoo1 (199)
Event: AutoNotification Intercept [ Configuration:Event Behaviour: true
Notification Type: Only Created Notifications
Notification App: CalenGoo
Package Name: com.calengoo.android ]
Enter: Cal (320)
A1: Perform Task [ Name:NotifLauncher Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
A2: Variable Clear [ Name:%Noise Pattern Matching:eek:ff ]
A3: Variable Set [ Name:%Index5 To:%Index4 Do Maths:eek:n Append:eek:ff ]
A4: Variable Set [ Name:%Index4 To:%Index3 Do Maths:eek:n Append:eek:ff ]
A5: Variable Set [ Name:%Index3 To:%Index2 Do Maths:eek:n Append:eek:ff ]
A6: Variable Set [ Name:%Index2 To:%Index1 Do Maths:eek:n Append:eek:ff ]
A7: Variable Set [ Name:%Index1 To:%Index Do Maths:eek:ff Append:eek:ff ]
A8: Flash [ Text:Right! Let's see what we come up with... Long:eek:ff ]
A9: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
Profile: FunNotifTxt (24)
Event: Received Text [ Type:Any Sender:* Content:* ]
Enter: Txt (319)
A1: Variable Clear [ Name:%Noise Pattern Matching:eek:ff ]
A2: Variable Set [ Name:%Index5 To:%Index4 Do Maths:eek:n Append:eek:ff ]
A3: Variable Set [ Name:%Index4 To:%Index3 Do Maths:eek:n Append:eek:ff ]
A4: Variable Set [ Name:%Index3 To:%Index2 Do Maths:eek:n Append:eek:ff ]
A5: Variable Set [ Name:%Index2 To:%Index1 Do Maths:eek:n Append:eek:ff ]
A6: Variable Set [ Name:%Index1 To:%Index Do Maths:eek:ff Append:eek:ff ]
A7: Flash [ Text:Right! Let's see what we come up with... Long:eek:ff ]
A8: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
Profile: PhoneCall (153)
State: Call [ Type:Incoming Number:* ]
Enter: Phone (318)
A1: Variable Set [ Name:%Noise To:Phone Do Maths:eek:ff Append:eek:ff ]
A2: Destroy Scene [ Name:%PopUp Continue Task After Error:eek:n ]
A3: Variable Set [ Name:%Index5 To:%Index4 Do Maths:eek:n Append:eek:ff ]
A4: Variable Set [ Name:%Index4 To:%Index3 Do Maths:eek:n Append:eek:ff ]
A5: Variable Set [ Name:%Index3 To:%Index2 Do Maths:eek:n Append:eek:ff ]
A6: Variable Set [ Name:%Index2 To:%Index1 Do Maths:eek:n Append:eek:ff ]
A7: Variable Set [ Name:%Index1 To:%Index Do Maths:eek:ff Append:eek:ff ]
A8: Flash [ Text:Right! Let's see what we come up with... Long:eek:ff ]
A9: Perform Task [ Name:NoiseChng3 Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:eek:ff ]
Click to expand...
Click to collapse
Thanks.... But can you explain it. I dont know anything about coding.
What should I do to get it working?
LOL! Sorry. So if you use Tasker, this is what it looks like when you export a task or profile to your clipboard as a description. You do this by long-tapping the task, and selecting "export" from the drop down menu.
I'll walk you through the Wallpaper switcher.
First, create a new task. Name it whatever you like
In that task, add an action with the + button. The action you're looking for is in the "List Files" in the "File" catagory
A1: List Files [ Dir:backgrnds Match: Include Hidden Files: Use Root: Variable:%files ]
Action: List files
Directory: (whereever your wall papers are stored. Mine are in a folder called" backgrnds")
Match: (skip)
Include Hidden Files: (skip)
Use Root: (Yes if you have root)
Variable: This is where you're going to save all the file names you list. enter :%files"
Next action: Variable Set - in the Vaiables catagory
A2: Variable Set [ Name:%max To:%files(#) Do Maths: Append: ]
Variable Name:"%max"
To: (This is what you want "%max" to be) %files(#) - which means the number of files
Do Maths: Yes, check this
Append: no. You want a new list each time
Next Action Variable Randomize
A3: Variable Randomize [ Name:%index Min:1 Max:%max ]
Name: (this is where you want to put the random number you're generating)
Min: 1
Max: %max
Next Action Variable Set
A4: Variable Set [ Name:%Wallppr To:%files(%index) Do Maths: Append: off ]
Name: %Wallppr
To: %files(%index) (This is the file name associated with your random number)
Do Maths: no
Append: no.
Next Action Variable Split (This chopps up a variable into manageable bits so the phone can read it)
A5: Variable Split [ Name:%Wallppr Splitter:/ Delete Base: off ]
Name: %Wallppr
Splitter: / (This is the character that tasker looks for. When it finds it, it chopps the variable into two parts - %Wallppr1 is to the left of the splitter and %Wallppr2 is to the right)
Next Action (optional)
A6: Flash [ Text:%Wallppr5/%Wallppr6 ]
Flash is found in the alerts catagory. Its just a way to check to see if everytthing is working. Flash just flashes whatever on the screen. In this case %Wallppr1 and %Wallppr2
Next Action:
A7: Set Wallpaper [ Image:%Wallppr5/%Wallppr6 Scale: Crop: ]
Pretty self expanitory. Found in Display catagory.
nijohnson said:
LOL! Sorry. So if you use Tasker, this is what it looks like when you export a task or profile to your clipboard as a description. You do this by long-tapping the task, and selecting "export" from the drop down menu.
I'll walk you through the Wallpaper switcher.
First, create a new task. Name it whatever you like
In that task, add an action with the + button. The action you're looking for is in the "List Files" in the "File" catagory
A1: List Files [ Dir:backgrnds Match: Include Hidden Files: Use Root: Variable:%files ]
Action: List files
Directory: (whereever your wall papers are stored. Mine are in a folder called" backgrnds")
Match: (skip)
Include Hidden Files: (skip)
Use Root: (Yes if you have root)
Variable: This is where you're going to save all the file names you list. enter :%files"
Next action: Variable Set - in the Vaiables catagory
A2: Variable Set [ Name:%max To:%files(#) Do Maths: Append: ]
Variable Name:"%max"
To: (This is what you want "%max" to be) %files(#) - which means the number of files
Do Maths: Yes, check this
Append: no. You want a new list each time
Next Action Variable Randomize
A3: Variable Randomize [ Name:%index Min:1 Max:%max ]
Name: (this is where you want to put the random number you're generating)
Min: 1
Max: %max
Next Action Variable Set
A4: Variable Set [ Name:%Wallppr To:%files(%index) Do Maths: Append: off ]
Name: %Wallppr
To: %files(%index) (This is the file name associated with your random number)
Do Maths: no
Append: no.
Next Action Variable Split (This chopps up a variable into manageable bits so the phone can read it)
A5: Variable Split [ Name:%Wallppr Splitter:/ Delete Base: off ]
Name: %Wallppr
Splitter: / (This is the character that tasker looks for. When it finds it, it chopps the variable into two parts - %Wallppr1 is to the left of the splitter and %Wallppr2 is to the right)
Next Action (optional)
A6: Flash [ Text:%Wallppr5/%Wallppr6 ]
Flash is found in the alerts catagory. Its just a way to check to see if everytthing is working. Flash just flashes whatever on the screen. In this case %Wallppr1 and %Wallppr2
Next Action:
A7: Set Wallpaper [ Image:%Wallppr5/%Wallppr6 Scale: Crop: ]
Pretty self expanitory. Found in Display catagory.
Click to expand...
Click to collapse
Thanks! I got it.
You're the best
Cool! Have fun!

Mobile data no longer works

I've used tasker for months and its been perfect
But yesterday it decided to stop working with the command to turn mobile data on and off
Now it says "mobile data isn't available on this device" it used to work fine before though.
HTC One M9
Rooted
Magisk V11.1 + MagiskSU
ViperOneM9 V6.0.0 custom rom
TWRP
If it makes my diference, a week go I switched from PHH's SuperUser to MagiskSU
Please help!
Car Bluetooth Off (14)
A1: Mobile Data [ Setn ]
A2: Bluetooth [ Setff ]
A3: Get Location [ Source:Any Timeout (Seconds):10 Continue Task Immediatelyff Keep Trackingff ]
A4: Variable Set [ Name:%CarLoc To:%LOC Recurse Variablesff Do Mathsff Appendff ]
A5: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]
A6: Mobile Data [ Setff ]
A7: Variable Set [ Name:%Leave To:%TIME Recurse Variablesff Do Mathsn Appendff ]
It fails at A1
My device Nexus 6P and older Nexus 4 always had Mobile Data "greyed" rather red'ed out. I used secure settings for that, but eventually SS didn't work either with no help form the developer. I now use Toggle Data [paid app] from the Play Store https://play.google.com/store/apps/details?id=com.cygery.toggledata&hl=en Using with Tasker as plugin, so everything works fine now!
obednal97 said:
I've used tasker for months and its been perfect
But yesterday it decided to stop working with the command to turn mobile data on and off
Now it says "mobile data isn't available on this device" it used to work fine before though.
HTC One M9
Rooted
Magisk V11.1 + MagiskSU
ViperOneM9 V6.0.0 custom rom
TWRP
If it makes my diference, a week go I switched from PHH's SuperUser to MagiskSU
Please help!
Click to expand...
Click to collapse

Recipe: Make FolderSync actually work by using Tasker

FolderSync is a very powerful backup/synchronization app, but its scheduling is complete CARP! Often folderpairs that are scheduled for syncing will not start at all or will error out inexplicably. The developer hasn't provided any support in years (even for the paid app) despite releasing a sporadic update every now and then. And so users are forced to make do with the functionality as it is and find their own workarounds.
Luckily, it is integrated as a Tasker plugin, so we can kick off sync jobs from Tasker. But if you queue several jobs, you still face problems with them not always starting and also with handling crashes/errors. If you have root and sqlite, however, you can use Tasker to directly poll the sqlite database that FolderSync uses. This way you can check on busy/idle state, job status, and retry jobs with errors. I made a task that does this and wanted to share this solution/recipe.
Below is a code description and attached is an XML project file.
-----------------
The core of the functionality is in the pollFolderSyncDb task show below. It is intended to be called after invoking the FolderSync plugin. It uses the sqlite executable that is installed along with the Titanium Backup app (or set the %sqlite3 var to use a different path). The task should be called with two parameters:
%par1: The name of the FolderSync folderpair to check on, or "." for a global free/idle check.
%par2: (Optional) A timeout in seconds.
The task runs a couple sanity checks to make sure it finds a valid FolderSync sqlite database, and then it does one of two things based on the parameters:
1) If %par1 is ".", then it checks that there are no active jobs. A return value of "1" means it's free/idle. Otherwise it returns "0|SyncInProgress".
2) If %par2 is a valid folderpair name, then it starts querying the database to check on the job. Again "1" is a return value indicating successful completion and various "0|error" return values indicate problems. If no folderpair job appears in the database with that name within 8 seconds, it returns "0|null". Otherwise, it starts querying using an exponential backoff algorithm (configurable via the %max_exp var) for 1:59:20 (just less than two hours).
Possible return values for the pollFolderSyncDb task are:
1 -- Job completed with SyncOK status.
0|fpiderr -- No folderpair found matching the name parameter provided.
0|null -- No recently submitted folderpair job found for the name parameter provided.
0|SyncCancelled -- Job was cancelled in FolderSync (or data connection was turned off during the job).
0|SyncFailed -- Job had an error.
0|SyncInProgress -- Job is still running after the timeout passed.
0|dberr -- Critical error occurred accessing the sqlite database.
0|dbqueryerr -- Critical error occurred during a sqlite query.
0|pollerr -- Something unanticipated happened (a logic bug occurred).
Below is a sample task named "Folder Sync Example" that runs two folderpair sync jobs. First, it checks that FolderSync is not currently running a job. Then it kicks off the first FolderSync job and waits for the result. If needed, it can retry the job (controllable via the %max_attempts var). After the first job finishes, it kicks off the second job, and this can be repeated and so on and so on.
Code:
Task: Folder Sync Example (120)
A1: Notify [ Title:Folder Sync Text: Icon:hd_collections_collection Number:0 Permanent:eek:n Priority:3 ]
A2: Variable Set [ Name:%max_attempts To:3 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A3: Perform Task [ Name:pollFolderSyncDb Priority:%priority Parameter 1 (%par1):. Parameter 2 (%par2):7160 Return Value Variable:%ready Stop:eek:ff ]
A4: If [ %ready neq 1 ]
A5: Notify [ Title:Folder Sync Error Text:Not ready. Icon:hd_alerts_and_states_warning Number:0 Permanent:eek:ff Priority:3 ]
A6: Goto [ Type:Action Label Number:1 Label:end ]
A7: End If
<NB: first job>
A8: Variable Set [ Name:%attempt To:0 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
<sdcard0:DCIM>
A9: Variable Set [ Name:%attempt To:%attempt + 1 Recurse Variables:eek:ff Do Maths:eek:n Append:eek:ff ]
A10: FolderSync [ Configuration:sdcard0:DCIM;;;SYNC Timeout (Seconds):0 Continue Task After Error:eek:n ]
A11: Perform Task [ Name:pollFolderSyncDb Priority:%priority Parameter 1 (%par1):sdcard0:DCIM Parameter 2 (%par2): Return Value Variable:%result Stop:eek:ff ]
A12: Notify [ Title:Folder Sync Error Text:sdcard0:DCIM failed (%result) Icon:hd_alerts_and_states_warning Number:0 Permanent:eek:ff Priority:3 ] If [ %result neq 1 ]
A13: Goto [ Type:Action Label Number:1 Label:sdcard0:DCIM ] If [ %attempt < %max_attempts & %result eq 0|null |+ %result eq 0|SyncCancelled |+ %result eq 0|SyncFailed ]
A14: Goto [ Type:Action Label Number:1 Label:end ] If [ %result neq 1 & %result neq 0|null & %result neq 0|SyncCancelled & %result neq 0|SyncFailed ]
<NB: second job>
A15: Variable Set [ Name:%attempt To:0 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
<sdcard0:Documents>
A16: Variable Set [ Name:%attempt To:%attempt + 1 Recurse Variables:eek:ff Do Maths:eek:n Append:eek:ff ]
A17: FolderSync [ Configuration:sdcard0:Documents;;;SYNC Timeout (Seconds):0 Continue Task After Error:eek:n ]
A18: Perform Task [ Name:pollFolderSyncDb Priority:%priority Parameter 1 (%par1):sdcard0:Documents Parameter 2 (%par2): Return Value Variable:%result Stop:eek:ff ]
A19: Notify [ Title:Folder Sync Error Text:sdcard0:Documents failed (%result) Icon:hd_alerts_and_states_warning Number:0 Permanent:eek:ff Priority:3 ] If [ %result neq 1 ]
A20: Goto [ Type:Action Label Number:1 Label:sdcard0:Documents ] If [ %attempt < %max_attempts & %result eq 0|null |+ %result eq 0|SyncCancelled |+ %result eq 0|SyncFailed ]
A21: Goto [ Type:Action Label Number:1 Label:end ] If [ %result neq 1 & %result neq 0|null & %result neq 0|SyncCancelled & %result neq 0|SyncFailed ]
<end>
A22: Notify Cancel [ Title:Folder Sync Warn Not Exist:eek:ff ]
Task: pollFolderSyncDb (163)
A1: Variable Set [ Name:%fpid To:. Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A2: Variable Set [ Name:%timeout To:0 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A3: If [ %par1 Set & %par1 neq \%par1 ]
A4: Variable Set [ Name:%fpid To:%par1 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A5: Stop [ With Error:eek:n Task: ] If [ %fpid ~R ['"`;] ]
<NB: 1:59:20>
A6: Variable Set [ Name:%timeout To:7160 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A7: End If
A8: Variable Set [ Name:%timeout To:%par2 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %par2 Set & %par2 neq \%par2 ]
A9: Variable Set [ Name:%now To:%TIMES Recurse Variables:eek:ff Do Maths:eek:n Append:eek:ff ]
A10: Variable Set [ Name:%max_exp To:7 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A11: Variable Set [ Name:%sqlite3 To:/data/data/com.keramidas.TitaniumBackup/files/sqlite3 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A12: Variable Set [ Name:%dbfile To:/data/data/dk.tacit.android.foldersync.full/databases/foldersync.db Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A13: Test File [ Type:Size Data:%sqlite3 Store Result In:%size Use Root:eek:n Continue Task After Error:eek:n ]
A14: Variable Set [ Name:%dberr To:Sqlite3 binary not found. Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %size !Set ]
A15: If [ %dberr !Set ]
A16: Variable Clear [ Name:%size Pattern Matching:eek:ff ]
A17: Test File [ Type:Size Data:%dbfile Store Result In:%size Use Root:eek:n Continue Task After Error:eek:n ]
A18: Variable Set [ Name:%dberr To:Sqlite3 database not found. Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %size !Set ]
A19: End If
A20: If [ %dberr !Set ]
A21: Run Shell [ Command:%sqlite3 %dbfile "select sql from sqlite_master where type = 'table' and tbl_name = 'synclogs'" Timeout (Seconds):10 Use Root:eek:n Store Output In:%dbreturn Store Errors In:%dberr Store Result In: Continue Task After Error:eek:n ]
A22: Variable Set [ Name:%dberr To:Expected synclogs table not found (%dbreturn). Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %dberr !Set & %dbreturn neq CREATE TABLE `synclogs` (`actions` TEXT , `createdDate` VARCHAR NOT NULL , `dataTransferred` BIGINT , `endSyncTime` VARCHAR , `errors` TEXT , `filesChecked` INTEGER , `filesDeleted` INTEGER , `filesSynced` INTEGER , `folderPair_id` INTEGER NOT NULL , `id` INTEGER PRIMARY KEY AUTOINCREMENT , `message` VARCHAR , `status` VARCHAR ) ]
A23: End If
A24: If [ %dberr !Set ]
A25: Run Shell [ Command:%sqlite3 %dbfile "select sql from sqlite_master where type = 'table' and tbl_name = 'folderpairs'" Timeout (Seconds):10 Use Root:eek:n Store Output In:%dbreturn Store Errors In:%dberr Store Result In: Continue Task After Error:eek:n ]
A26: Variable Set [ Name:%dberr To:Expected folderpairs table not found (%dbreturn). Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %dberr !Set & %dbreturn neq CREATE TABLE "folderpairs" (`account_id` INTEGER , `account_id_primary` INTEGER , `active` SMALLINT , `advancedSyncDefinition` BLOB , `allowedNetworks` VARCHAR , `backupSchemePattern` VARCHAR , `batteryThreshold` INTEGER , `checkFileSizes` SMALLINT , `cleanEmptyFolders` SMALLINT , `createdDate` VARCHAR , `currentStatus` VARCHAR , `deleteFilesAfterSync` SMALLINT , `disallowedNetworks` VARCHAR , `excludeSyncAll` SMALLINT , `fileMasks` VARCHAR , `groupName` VARCHAR , `hasPendingChanges` SMALLINT , `id` INTEGER PRIMARY KEY AUTOINCREMENT , `ignoreNetworkState` SMALLINT , `instantSync` SMALLINT , `lastRun` VARCHAR , `name` VARCHAR NOT NULL , `notificationEmail` VARCHAR , `notifyOnChanges` SMALLINT , `notifyOnError` SMALLINT , `notifyOnSuccess` SMALLINT , `notifyOnSync` SMALLINT , `onlySyncChanged` SMALLINT , `onlySyncWhileCharging` SMALLINT , `preserveTargetFolder` SMALLINT , `remoteFolder` VARCHAR NOT NULL , `remoteFolderReadable` VARCHAR , `rescanMediaLibrary` SMALLINT , `retrySyncOnFail` SMALLINT , `sdFolder` VARCHAR NOT NULL , `sdFolderReadable` VARCHAR , `sortIndex` INTEGER , `syncAsHotspot` SMALLINT , `syncHiddenFiles` SMALLINT , `syncInterval` VARCHAR , `syncRuleConflict` VARCHAR , `syncRuleReplaceFile` VARCHAR , `syncSubFolders` SMALLINT , `syncType` VARCHAR , `turnOnWifi` SMALLINT , `use2G` SMALLINT , `use3G` SMALLINT , `useBackupScheme` SMALLINT , `useMd5Checksum` SMALLINT , `useMultiThreadedSync` SMALLINT , `useOtherInternet` SMALLINT , `useRoaming` SMALLINT , `useTempFiles` SMALLINT , `useWifi` SMALLINT ) ]
A27: End If
A28: If [ %dberr Set ]
A29: Notify [ Title:Folder Sync Error Text:Expected table not found. Icon:hd_alerts_and_states_warning Number:0 Permanent:eek:ff Priority:3 ]
A30: Return [ Value:0|dberr Stop:eek:n ]
A31: End If
A32: If [ %fpid neq . ]
A33: Run Shell [ Command:%sqlite3 %dbfile "select id from folderpairs where name = '%fpid'" Timeout (Seconds):10 Use Root:eek:n Store Output In:%dbreturn Store Errors In:%dberr Store Result In: Continue Task After Error:eek:n ]
A34: Variable Set [ Name:%dberr To:Folderpair not found (%fpid). Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %dberr !Set & %dbreturn !~R ^[0-9]+$ ]
A35: If [ %dberr Set ]
A36: Notify [ Title:Folder Sync Error Text:Folderpair not found. Icon:hd_alerts_and_states_warning Number:0 Permanent:eek:ff Priority:3 ]
A37: Return [ Value:0|fpiderr Stop:eek:n ]
A38: Else
A39: Variable Set [ Name:%fpid To:%dbreturn Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A40: End If
A41: End If
A42: If [ %fpid eq . ]
A43: Variable Set [ Name:%poll_query To:%sqlite3 %dbfile "select id, folderPair_id, createdDate, status from synclogs where status = 'SyncInProgress' limit 1" Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A44: Else
A45: Variable Set [ Name:%poll_query To:%sqlite3 %dbfile "select id, folderPair_id, createdDate, status from synclogs where folderPair_id = %fpid order by id desc limit 1" Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A46: End If
A47: Variable Set [ Name:%first_run To:1 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A48: Variable Set [ Name:%exp To:3 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
<whileLoop>
A49: If [ %TIMES < %now + %timeout + 1 | %first_run eq 1 ]
A50: If [ %fpid neq . | %first_run eq 0 ]
A51: Wait [ MS:0 Seconds:2 ^ %exp Minutes:0 Hours:0 Days:0 ]
A52: Variable Set [ Name:%exp To:%exp + 1 Recurse Variables:eek:ff Do Maths:eek:n Append:eek:ff ] If [ %exp < %max_exp ]
A53: End If
A54: Variable Set [ Name:%first_run To:0 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A55: Run Shell [ Command:%poll_query Timeout (Seconds):10 Use Root:eek:n Store Output In:%dbreturn Store Errors In:%dberr Store Result In: Continue Task After Error:eek:n ]
A56: Variable Set [ Name:%poll_ok To:0|dbqueryerr Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %dberr Set ]
A57: If [ %fpid eq . ]
<NB: no active row returned>
A58: Variable Set [ Name:%poll_ok To:1 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %poll_ok !Set & %dbreturn !Set ]
A59: Else
<NB: no fresh row returned>
A60: Variable Set [ Name:%poll_ok To:0|null Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %poll_ok !Set & %dbreturn !Set ]
A61: If [ %poll_ok !Set ]
A62: Variable Split [ Name:%dbreturn Splitter:| Delete Base:eek:ff ]
A63: If [ %dbreturn(#) eq 4 ]
A64: Variable Set [ Name:%status To:%dbreturn(4) Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A65: Variable Set [ Name:%timestamp To:%dbreturn(3) Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A66: Variable Search Replace [ Variable:%timestamp Search:\.[0-9]+$ Ignore Case:eek:ff Multi-Line:eek:ff One Match Only:eek:ff Store Matches In: Replace Matches:eek:n Replace With: ]
A67: Variable Convert [ Name:%timestamp Function:Date Time to Seconds Store Result In: ]
A68: Variable Set [ Name:%age To:%now - %timestamp Recurse Variables:eek:ff Do Maths:eek:n Append:eek:ff ]
A69: Else
A70: Variable Set [ Name:%status To:dbreturnerr Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ]
A71: Variable Clear [ Name:%age Pattern Matching:eek:ff ]
A72: End If
<NB: row found is not fresh>
A73: Variable Set [ Name:%poll_ok To:0|null Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %poll_ok !Set & %age Set & %age > 8 ]
A74: Variable Set [ Name:%poll_ok To:1 Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %poll_ok !Set & %status eq SyncOK ]
<NB: SyncCancelled (cancelled? or connection turned off) or SyncFailed (error)>
A75: Variable Set [ Name:%poll_ok To:0|%status Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %poll_ok !Set & %status neq SyncInProgress ]
A76: End If
A77: End If
A78: Goto [ Type:Action Label Number:1 Label:whileLoop ] If [ %poll_ok !Set ]
<endWhileLoop>
A79: End If
A80: If [ %dbreturn Set & %fpid eq . |+ %status eq SyncInProgress ]
A81: Variable Set [ Name:%poll_ok To:0|SyncInProgress Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %poll_ok !Set ]
A82: Else
<NB: unexpected logic error>
A83: Variable Set [ Name:%poll_ok To:0|pollerr Recurse Variables:eek:ff Do Maths:eek:ff Append:eek:ff ] If [ %poll_ok !Set ]
A84: End If
A85: Return [ Value:%poll_ok Stop:eek:n ]
Reserved.
Reserved 2.
Hi dadnammit,
i would like to use your Recipe. It seems to be the perfect solution to automatically backup my photos and whatsapp-folders to my NAS.
I have installed "FolderSync Pro, Tasker, Titanium Backup" and granted root-permissions. The mobile is an Sony Xperia Z3C with LineageOS 14.
The manually started foldersync of my folderpair DCIM/Camera to Remote-folder works.
Unfortunately, the pollFolderSyncDb-task returns always 0|dberr.
It seems that it can't open the database or use the sqlite3!?
My first thought was about no access to the root-partition /data/...
edit: Booting in the TWRP-reovery, i can see every single folder and the files mentioned.
edit2: Running a test-task: "run shell: touch /data/data/test.log with using root" creates the file without problems.
So this is not the issue.
edit3: Next try, same procedure on a rootet Galaxy S2 running LOS14. Same failure. =(
Would it help to see a log-file provided by tasker?
Code:
20170713 08.29.07 E Start ID0:0.0 TaskService
20170713 08.29.08 T Running ID9 Test
20170713 08.29.09 T Running ID7:2 Folder Sync Example
20170713 08.29.09 A OK ID9.1 Test.Perform Task, Folder Sync Example
20170713 08.29.09 T ExitOK ID9 Test
20170713 08.29.09 A OK ID7:2.1 Folder Sync Example.Notify
20170713 08.29.09 A OK ID7:2.2 Folder Sync Example.Var Set, %max_attempts=3
20170713 08.29.09 T Running ID5:3 pollFolderSyncDb
20170713 08.29.09 A OK ID7:2.3 Folder Sync Example.Perform Task, pollFolderSyncDb
20170713 08.29.09 A OK ID5:3.1 pollFolderSyncDb.Var Set, %fpid=.
20170713 08.29.09 A OK ID5:3.2 pollFolderSyncDb.Var Set, %timeout=0
20170713 08.29.09 A OK ID5:3.3 pollFolderSyncDb.If
20170713 08.29.09 A OK ID5:3.4 pollFolderSyncDb.Var Set, %fpid=.
20170713 08.29.09 A IfFail ID5:3.5 pollFolderSyncDb.Stop
20170713 08.29.09 A OK ID5:3.6 pollFolderSyncDb.NB: 1:59:20
20170713 08.29.09 A OK ID5:3.7 pollFolderSyncDb.End If
20170713 08.29.09 A OK ID5:3.8 pollFolderSyncDb.Var Set, %timeout=7160
20170713 08.29.09 A OK ID5:3.9 pollFolderSyncDb.Var Set, %now=1499927349
20170713 08.29.09 A OK ID5:3.10 pollFolderSyncDb.Var Set, %max_exp=7
20170713 08.29.09 A OK ID5:3.11 pollFolderSyncDb.Var Set, %sqlite3=/data/data/com.ker..
20170713 08.29.09 A OK ID5:3.12 pollFolderSyncDb.Var Set, %dbfile=/data/data/dk.taci..
20170713 08.29.09 A OK ID5:3.13 pollFolderSyncDb.Test File, %size=1
20170713 08.29.09 A IfFail ID5:3.14 pollFolderSyncDb.Var Set, %dberr=%dberr
20170713 08.29.09 A OK ID5:3.15 pollFolderSyncDb.If
20170713 08.29.09 A OK ID5:3.16 pollFolderSyncDb.Var Clear, %size=%size
20170713 08.29.09 A OK ID5:3.17 pollFolderSyncDb.Test File, %size=1
20170713 08.29.09 A IfFail ID5:3.18 pollFolderSyncDb.Var Set, %dberr=%dberr
20170713 08.29.09 A OK ID5:3.19 pollFolderSyncDb.End If
20170713 08.29.09 A OK ID5:3.20 pollFolderSyncDb.If
20170713 08.29.09 A OK ID5:3.21 pollFolderSyncDb.Run Shell, %dbreturn=%dbreturn, %dberr=%dberr
20170713 08.29.09 A IfFail ID5:3.22 pollFolderSyncDb.Var Set, %dberr=%dberr
20170713 08.29.09 A OK ID5:3.23 pollFolderSyncDb.End If
20170713 08.29.09 A OK ID5:3.24 pollFolderSyncDb.If
20170713 08.29.09 A OK ID5:3.25 pollFolderSyncDb.Run Shell, %dbreturn=%dbreturn, %dberr=%dberr
20170713 08.29.09 A OK ID5:3.26 pollFolderSyncDb.Var Set, %dberr=Expected folderpai..
20170713 08.29.09 A OK ID5:3.27 pollFolderSyncDb.End If
20170713 08.29.09 A OK ID5:3.28 pollFolderSyncDb.If
20170713 08.29.09 A OK ID5:3.29 pollFolderSyncDb.Notify
20170713 08.29.09 A OK ID5:3.30 pollFolderSyncDb.End If
20170713 08.29.09 A OK ID5:3.31 pollFolderSyncDb.Return
20170713 08.29.09 T ExitOK ID5:3 pollFolderSyncDb
20170713 08.29.09 A OK ID7:2.4 Folder Sync Example.If
20170713 08.29.09 A OK ID7:2.5 Folder Sync Example.Notify
20170713 08.29.09 A OK ID7:2.6 Folder Sync Example.Goto
20170713 08.29.09 A OK ID7:2.22 Folder Sync Example.end
20170713 08.29.09 T ExitOK ID7:2 Folder Sync Example
20170713 08.29.16 E Stop ID0:0.0 TaskService
Hopefully you can help me a little bit,
Kind regards,
Minfred
I never had or have any problems with FolderSync. I am not sure why other people are encountering problems, but I actually use folder-sync for my Online Anti-Theft Web App.
It works great by sending the audio/video recording to my google drive within 10 seconds, even when my phone screen is turned off. Maybe it has compatibility issues with certain android phones.
I noticed different "problems" with different versions in the beginning, but when I got the Pro version, Everything worked allright.
Hello dadnammit,
do you have an idea why the error accured?
Greetings,
Minfred
I've recently upgraded to Android Oreo, and it seems FolderSync Pro has gotten even less reliable. It now often fails to respond at all even with my recipe above. The solution seems to be bringing the app to the foreground recently before the task starts. This prevents the total unresponsiveness.
Hey sorry @minifred. I didn't get notification about posts here before for some reason! :/
For Oreo - you need to enable FolderSync service (in Android settings) and set notification while syncing in FolderSync.
Minfred said:
Hello dadnammit, do you have an idea why the error accured?
Click to expand...
Click to collapse
It is necessary to remove lines A22 and A26 (inside pollFolderSyncDb task) from the code of the first post because they do not match the value returned in %dbreturn var. The values are correct, but they are disordered and therefore activates the error flag.
And, on the other hand, if there really is an error, the %dberr flag is activated and the task is interrupted, sending a notification in the notification bar of the device.
By doing this, it works fine for me (on Android MM 6.0.1) in the tests I've done, which have all been done manually. But I have to check if it works well in unattended way (at a scheduled time) and with the screen off.
Despite the fact that a long time has passed, I hope that this solution can serve others. And thanks, of course, to the Tasker project author.
Still current?
Is this still working for people?

Tasker can't delete root folders...

Hi everyone I'm trying to make a task which will delete a folder in /system/app/ folder but Tasker always gives me error 1 when I try to perform action. I already tried to mount /system rw with Tasker remount action but didn't helped. Also Tasker's file explorer seems like can't see root folders so I have to write path manually so I think it's may be Tasker related problem and I give every permission Tasker asks for solve this but not worked. It's already have root, modify system, usage access permissions.
Running Android 8.1 LOS 15.1
Here is the error log;
Code:
08.30.27/FileUtil nrda: need request: /system/app/BasicDreams: false
08.30.27/E checkSDPath: /system/app/BasicDreams useRoot: true there: true file: false dir: true
08.30.27/E Delete Directory: checkSDPath: /system/app/BasicDreams useDocFile: false
08.30.27/Shell runSync test -e '/system/app/BasicDreams' root: true timeout: 3000
08.30.27/Shell have process
08.30.27/Shell write cmd: test -e '/system/app/BasicDreams'
08.30.27/Shell start process timeout timer 3000ms for: test -e '/system/app/BasicDreams'
08.30.27/Shell start process-thread ID 559
08.30.27/Shell joined with 559
08.30.27/Shell exit result: 0
08.30.27/Shell non-null timeout
08.30.27/Shell runSync test -f '/system/app/BasicDreams' root: true timeout: 3000
08.30.27/Shell have process
08.30.27/Shell write cmd: test -f '/system/app/BasicDreams'
08.30.27/Shell start process timeout timer 3000ms for: test -f '/system/app/BasicDreams'
08.30.27/Shell start process-thread ID 561
08.30.27/Shell joined with 561
08.30.27/Shell exit result: 1
08.30.27/Shell non-null timeout
08.30.27/Shell runSync test -d '/system/app/BasicDreams' root: true timeout: 3000
08.30.27/Shell have process
08.30.27/Shell write cmd: test -d '/system/app/BasicDreams'
08.30.27/Shell start process timeout timer 3000ms for: test -d '/system/app/BasicDreams'
08.30.27/Shell start process-thread ID 563
08.30.27/Shell joined with 563
08.30.27/Shell exit result: 0
08.30.27/Shell non-null timeout
08.30.27/E Delete Directory: checkSDPath: /system/app/BasicDreams ok true
08.30.27/Shell runSync rm -r -f '/system/app/BasicDreams' root: true timeout: 7000
08.30.27/Shell have process
08.30.27/Shell write cmd: rm -r -f '/system/app/BasicDreams'
08.30.27/Shell start process timeout timer 7000ms for: rm -r -f '/system/app/BasicDreams'
08.30.27/Shell start process-thread ID 565
08.30.27/Shell joined with 565
08.30.27/Shell exit result: 1
08.30.27/Shell non-null timeout
08.30.27/E One or more failures deleting /system/app/BasicDreams.
08.30.27/E result: stop task (error)
08.30.27/E Error: 1
08.30.27/MacroEdit action finished exeID 1 action no 5 code 408 status: Err next 5
Could you export and post the description (not XML) of the task foot this please.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
ktmom said:
Could you export and post the description (not XML) of the task foot this please.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Click to expand...
Click to collapse
Code:
Do Stuff (52)
A1: Flash [ Text:Mounting /system rewritable... Long:eek:ff ]
A2: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A3: Remount [ Path:/system Writeable:eek:n ]
A4: Flash [ Text:Deleting files and directories... Long:eek:n ]
A5: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A6: Delete Directory [ Dir:/system/app/BasicDreams Recurse:eek:n Use Root:eek:n ] [I]ERROR HAPPENS AT THIS ACTION[/I]
A7: Delete Directory [ Dir:/system/app/Calendar Recurse:eek:n Use Root:eek:n ]
A8: Delete Directory [ Dir:/system/app/Email Recurse:eek:n Use Root:eek:n ]
A9: Delete Directory [ Dir:/system/app/Jelly Recurse:eek:n Use Root:eek:n ]
A10: Delete Directory [ Dir:/system/app/LatinIME Recurse:eek:n Use Root:eek:n ]
A11: Delete Directory [ Dir:/system/app/messaging Recurse:eek:n Use Root:eek:n ]
A12: Delete Directory [ Dir:/system/app/PhotoTable Recurse:eek:n Use Root:eek:n ]
A13: Delete Directory [ Dir:/system/app/webview Recurse:eek:n Use Root:eek:n ]
A14: Delete Directory [ Dir:/system/priv-app/AudioFX Recurse:eek:n Use Root:eek:n ]
A15: Delete Directory [ Dir:/system/priv-app/Contacts Recurse:eek:n Use Root:eek:n ]
A16: Delete File [ File:/system/priv-app/Dialer/Dialer.apk Shred Level:0 Use Root:eek:n ]
A17: Delete Directory [ Dir:/system/priv-app/Eleven Recurse:eek:n Use Root:eek:n ]
A18: Delete Directory [ Dir:/system/priv-app/Gallery2 Recurse:eek:n Use Root:eek:n ]
A19: Delete Directory [ Dir:/system/priv-app/Snap Recurse:eek:n Use Root:eek:n ]
A20: Delete Directory [ Dir:/system/priv-app/Trebuchet Recurse:eek:n Use Root:eek:n ]
A21: Flash [ Text:Copying files... Long:eek:n ]
A22: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A23: Copy File [ From:Chandler Muriel Bing/Portbag/Google Phone v23.0.apk To:/system/priv-app/Dialer/Dialer.apk Use Root:eek:n ]
A24: Copy File [ From:Chandler Muriel Bing/Portbag/MIUI 9.5 Ringtones/Mi.ogg To:/system/media/audio/ringtones/ Use Root:eek:n ]
A25: Copy File [ From:Chandler Muriel Bing/Portbag/MIUI 9.5 Ringtones/Mi.ogg To:/system/media/audio/alarms/ Use Root:eek:n ]
A26: Copy File [ From:Chandler Muriel Bing/Portbag/MIUI 9.5 Ringtones/Fresh.ogg To:/system/media/audio/notifications/ Use Root:eek:n ]
A27: Copy File [ From:Chandler Muriel Bing/myDevice/LOS/bootanimation.zip To:/system/media/ Use Root:eek:n ]
A28: Flash [ Text:Setting permissions... Long:eek:n ]
A29: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A30: Run Shell [ Command:chmod 644 /system/priv-app/Dialer/Dialer.apk Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In: Store Result In: ]
A31: Run Shell [ Command:chmod 644 /system/media/alarms/Mi.ogg Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In: Store Result In: ]
A32: Run Shell [ Command:chmod 644 /system/media/ringtones/Mi.ogg Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In: Store Result In: ]
A33: Run Shell [ Command:chmod 644 /system/media/notifications/Fresh.ogg Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In: Store Result In: ]
A34: Run Shell [ Command:chmod 644 /system/media/bootanimation.zip Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In: Store Result In: ]
A35: Flash [ Text:Mounting /system read-only... Long:eek:n ]
A36: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A37: Remount [ Path:/system Writeable:eek:ff ]
A38: Flash [ Text:Rebooting... Long:eek:n ]
A39: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A40: Run Shell [ Command:reboot Timeout (Seconds):0 Use Root:eek:n Store Output In: Store Errors In: Store Result In: ]
OK, I can run that exactly as written without trouble on my device (not running on LOS).
What root are you using? LOS superuser or Magisk?
I don't think it's an SELinux enforcing issue because I am enforcing and it works. But, you could try setting SELinux to permissive just to test. Run a shell action as root "setenforce 0" for permissive and "setenforce 1" for enforcing. If you want to flash which mode you are in, use a shell action: "getenforce" as root and make sure to assign a variable to the "store output in" field. Then flash that variable. It will return enforcing or permissive.
My last thought is to try the command in a terminal and see if there is any enlightenment as a result.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
ktmom said:
OK, I can run that exactly as written without trouble on my device (not running on LOS).
What root are you using? LOS superuser or Magisk?
I don't think it's an SELinux enforcing issue because I am enforcing and it works. But, you could try setting SELinux to permissive just to test. Run a shell action as root "setenforce 0" for permissive and "setenforce 1" for enforcing. If you want to flash which mode you are in, use a shell action: "getenforce" as root and make sure to assign a variable to the "store output in" field. Then flash that variable. It will return enforcing or permissive.
My last thought is to try the command in a terminal and see if there is any enlightenment as a result.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Click to expand...
Click to collapse
I'm using Magisk v17.1 and I don't think this issue is root related, but I'm gonna try SELinux mode and post result here thanks!
SELinux didn't worked... But I assume I found issue issue is Tasker can't mount system rw, for test it I used terminal and type command; "mount -o rw,remount /system" command worked without error then write that command; "rm /system/app/BasicDreams/BasicDreams.apk" terminal asks yes or no typed y and gived error read-only system...
I'm not familiar with LOS, but it's possible the boot.img (kernel) doesn't permit remount. Maybe someone in your rom thread could help.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
ktmom said:
I'm not familiar with LOS, but it's possible the boot.img (kernel) doesn't permit remount. Maybe someone in your rom thread could help.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Click to expand...
Click to collapse
Actually I think I solved this, there is a system mirror folder in /sbin/.core/mirror/ which contains exact same files on /system/ so I tried to create a file there and it's created on /system/ too and deleted it guess what? IT'S DELETED ON /system/ TOO so I changed every action on Tasker to /sbin/. core/mirror/system/... and worked! So like you said before it's related with Magisk's systemless specification. Thanks again ?
Now Tasker can't change /sbin folder too ?

How to convert image to base64 and store it in a variable

I am trying to convert image saved by the AutoNotifications but it's not working.
Code:
GET APP DETAILS (3)
A1: AutoNotification Query [ Configurationersistency Type: Non-Persistent Only
Package: %evtprm(1)
Get All Fields : true Timeout (Seconds):2 Structure Output:On ]
A2: Variable Split [ Name:%anstatusbaricon Splitter:, Delete Base:Off Regex:Off ]
A3: Text Dialog [ Title:. Text:%anstatusbaricon1 Button 1: Button 2: Button 3: Close After (Seconds):30 Use HTML:Off ]
A4: Read Binary [ File:%anstatusbaricon1 To Var:%b64img ]
A5: Text Dialog [ Title:Base 64 string Text:%b64img Button 1:Ok Button 2: Button 3: Close After (Seconds):30 Use HTML:Off ]

Categories

Resources