Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Task: Tasker Scene Manager
- <✅ <font color="#00884E"><b> COLOR FOR VISIBLE SCENE NAMES IN LIST>
- A1: Variable Set [
- Name: %visible_text_color
- To: #005F07
- Max Rounding Digits: 3 ]
- <✅ <font color="red"><b>COLOR FOR HIDDEN SCENE NAMES IN LIST>
- A2: Variable Set [
- Name: %hidden_text_color
- To: #B10000
- Max Rounding Digits: 3 ]
- <<h3>↘ <b><font color="#000000"> BEGIN>
- A3: Anchor
- A4: Flash [
- Text: PLEASE WAIT, CREATING LIST...
- Tasker Layout: On
- Background Colour: #FF000000
- Continue Task Immediately: On
- Dismiss On Click: On ]
- <<font color="blue"><b> GET ALL SCENES IN TASKER>
- A5: Test Tasker [
- Type: Scenes
- Store Result In: %all_scene_names ]
- <SORT ALPHABETICALLY>
- A6: Array Process [
- Variable Array: %all_scene_names
- Type: Sort Alpha Caseless ]
- <RESET COUNTER>
- A7: Variable Set [
- Name: %counter
- To: 0
- Max Rounding Digits: 3 ]
- <<font color="blue"><b> LOOP THRU ALL TASKER SCENES>
- A8: For [
- Variable: %scene_name
- Items: %all_scene_names() ]
- <TEST THIS SCENES STATUS>
- A9: Test Scene [
- Name: %scene_name
- Test: Status
- Store Result In: %status
- Continue Task After Error:On ]
- <IF SCENE ISN'T CREATED AT ALL>
- A10: Goto [
- Type: Top of Loop ]
- If [ %status ~ uncreated ]
- <ADD SCENE NAME TO VISIBLE ARRAY LIST, WITH HTML FORMATTING>
- A11: Array Push [
- Variable Array: %visible_scene_names
- Position: 9999
- Value: <font color="%visible_text_color"><b>%scene_name ]
- If [ %status ~ visible ]
- <ADD SCENE NAME TO HIDDEN ARRAY LIST, WITH HTML FORMATTING>
- A12: Array Push [
- Variable Array: %hidden_scene_names
- Position: 9999
- Value: <font color="%hidden_text_color"><b>%scene_name ]
- If [ %status ~ hidden/background ]
- <COUNTER + 1>
- A13: Variable Set [
- Name: %counter
- To: %counter+1
- Do Maths: On
- Max Rounding Digits: 3 ]
- A14: End For
- <IF NO SCENES AT ALL ARE SHOWING OR CREATED>
- A15: If [ %counter = 0 ]
- A16: Flash [
- Text: NO SCENES VISIBLE OR HIDDEN
- Long: On
- Tasker Layout: On
- Background Colour: #FF000000
- Continue Task Immediately: On
- Dismiss On Click: On ]
- A17: Stop [ ]
- A18: End If
- <COMBINE SCENE NAMES INTO FULL LIST>
- A19: Array Set [
- Variable Array: %combined_scene_list
- Values: %visible_scene_names(+◇₩)◇₩%hidden_scene_names(+◇₩)
- Splitter: ◇₩ ]
- If [ %visible_scene_names(#) > 0 & %hidden_scene_names(#) > 0 ]
- <ONLY VISIBLE SCENE NAMES EXIST>
- A20: Array Set [
- Variable Array: %combined_scene_list
- Values: %visible_scene_names(+◇₩)
- Splitter: ◇₩ ]
- If [ %visible_scene_names(#) > 0 & %hidden_scene_names(#) = 0 ]
- <ONLY HIDDEN SCENE NAMES EXIST>
- A21: Array Set [
- Variable Array: %combined_scene_list
- Values: %hidden_scene_names(+◇₩)
- Splitter: ◇₩ ]
- If [ %visible_scene_names(#) = 0 & %hidden_scene_names(#) > 0 ]
- <<font color="blue"><b> SHOW MAIN SCENE LIST MENU>
- A22: List Dialog [
- Mode: Multiple Choices
- Title: %counter EXISTING SCENES
- Items: %combined_scene_list
- Button 1: SHOW
- Button 2: HIDE
- Button 3: DESTROY
- Close After (Seconds): 120
- Use HTML: On
- First Visible Index: 0
- Continue Task After Error:On ]
- <IF NO LIST ITEMS SELECTED>
- A23: If [ %ld_selected(#) = 0 ]
- A24: Flash [
- Text: NO SCENES SELECTED
- Long: On
- Tasker Layout: On
- Background Colour: #FF000000
- Continue Task Immediately: On
- Dismiss On Click: On ]
- A25: Stop [ ]
- A26: End If
- <RESET COUNTER>
- A27: Variable Set [
- Name: %counter
- To: 0
- Max Rounding Digits: 3 ]
- <<font color="blue"> <b>PERFORM SELECTED ACTION ON EACH SCENE>
- A28: For [
- Variable: %scene_name
- Items: %ld_selected() ]
- <<i>1REMOVE HTML FORMATTING>
- A29: Variable Search Replace [
- Variable: %scene_name
- Search: (\<)[^>]+(\>)
- Replace Matches: On ]
- <TEST>
- A30: [X] Flash [
- Text: %scene_name
- Continue Task Immediately: On
- Dismiss On Click: On ]
- A31: Show Scene [
- Name: %scene_name
- Display As: Overlay, Blocking
- Horizontal Position: 100
- Vertical Position: 100
- Animation: System
- Show Exit Button: On
- Show Over Keyguard: On
- Continue Task Immediately: On
- Overlay +: On
- Continue Task After Error:On ]
- If [ %ld_button ~ show ]
- A32: Hide Scene [
- Name: %scene_name
- Animation: System
- Continue Task After Error:On ]
- If [ %ld_button ~ hide ]
- A33: Destroy Scene [
- Name: %scene_name
- Continue Task After Error:On ]
- If [ %ld_button ~ destroy ]
- <COUNTER + 1>
- A34: Variable Set [
- Name: %counter
- To: %counter+1
- Do Maths: On
- Max Rounding Digits: 3 ]
- A35: End For
- <<font color="blue"><b> CONFIRM ACTION PERFORMED ON SELECTED SCENES>
- A36: Flash [
- Text: ACTION: %ld_button
- APPLIED TO %counter SCENES
- Tasker Layout: On
- Title: COMPLETE!
- Background Colour: #FF000000
- Continue Task Immediately: On
- Dismiss On Click: On ]
- <❌ <font color="#000000"><b>MAIN STOP>
- A37: Stop [ ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement