Set Scene Element Text to empty/null/blank - Tasker Tips & Tricks

NEED HELP:
I'm trying to create a button in a scene that will delete the text from textEdit box.
Any idea if this is possible. Tried adding %null but nothing.
Cheers

Will setting it to a single space (" ") do it?

Vagelis1608 said:
Will setting it to a single space (" ") do it?
Click to expand...
Click to collapse
In that case I will get a space that I don't want for the future text. Other ideas?

SOLVED
Deleated edit text box, put a normal text box and in the Tap section used Variable Query.
Scene test
Text box
UI
Name: Text box test
Text: %Text
TAP
Variable query:
Name: insert text
Variable: %Text
Default: Enter text here

Related

[PROJECT] Automactically Switch between 12hr/24hr on WatchMaker (Android Wear)

Hello all XDA users! I created a project that automatically switches the clock format on your WM watchface whenever you switch between the formats on your phone via system settings.
===Prerequisites===
First and foremost, you need to install the Tasker (I used this on full version but it may work on the trial version) and have Allow External Access enabled, you can do this by doing the following:
Press the 3 dot menu
Click Preferences
Swipe over to Misc and find Allow External Access, then tap it to enable it
Done!
Then you need AutoTools by joaomgcd, you can download it here
Have USB Debugging enabled for ADB configuration for AutoTools
To Enable this, do the following:
Go to Settings
Go to About Device
Find your build number and click it several times until the phone says that you have enabled developer mode
Go into Developer Settings
Click on the tab that sets USB Debugging to enable it
Done!
Have ADB Drivers/Fastbook installed, here are two places that you can download these from but you don't have to download from these: Skipsoft, XDA
Have Installed WatchMaker Premium or Free Version
===About this Project===
What this project does is check if you have booted up your device and if so, it records the current time format your clock is set to. Then it checks if you have changed the format of your clock via broadcast intent, then it compares the previously recorded setting and the new setting, if they do not match, the task sends the new setting to WatchMaker and it changes the format on the watch to the new setting.
===Building the Project===
The first and foremost you MUST do is ensure that you have downloaded and got everything from the prerequisites. Once you have everything, follow the instructions for enabling access to system settings for AutoTools (you HAVE to do this in order for the profile to function correctly, as it needs to read the configuration for the 24hr format switch in the system settings, the profile will ONLY be looking at this setting). Once you have done these, you can move on to making the actual profiles
For the first profile, it will record the current clock format soon after the device boots up
So we must create an Event profile that will trigger soon after the phone finishes booting on, leave Invert unchecked
Now here's what you need for the actions:
Plugins -> AutoTools -> Secure Settings. Then click custom settings and do the following:
Setting Type: System
Name: time_12_24
Input Type: String
Leave Value Blank
Read Setting: Enabled
Variables -> Variable Set. Set %TIME_FORMAT to %time_12_24 (its the variable that AutoTools passes for the custom setting). This records the value we got from AutoTools and stores it in a global variable for us to use later on
OPTIONAL: Alert -> Notify Vibrate. For Title: put 'Logged Format Time' without quotes, and for text, added 'Log Format: %TIME_FORMAT' without quotes. This will notify that you have logged the format and will tell what the format is.
OPTIONAL: Task -> Wait. Set it for 10 seconds. This will make Tasker wait 10 seconds to move on to the next action
OPTIONAL: Alert -> Notify Cancel. For Title: put 'Logged Format Time' without quotes, and have Warn Not Exist checked. This will dismiss that notification we just sent 10 seconds ago
For the second profile, it will do the actual process of sending the variables to the WatchMaker App
We're going to create a Intent Received profile that will check if the specified broadcast intent has been received. For action, put 'android.intent.action.TIME_SET' without quotes. This will check if the TIME_SET intent has been received
Now here's what you need for the actions:
Task -> If. Set the condition to %TIME_FORMAT is SET. This will check if the global variable we defined in the first profile has something in it (this is for in case that you didn't boot up your device to store the value to the global variable so Tasker does not return an error since there is no value in the variable)
Plugin -> AutoTools -> Secure Settings. Like the same as like time, we're going to be finding that system variable, time_12_24. Just do the exact same steps as listed for the last time we defined this action
Task -> If. This time, set the condition to %time_12_24 does not match (!~) to %TIME_FORMAT. This will make Tasker check if the system format variable we just grabbed in the previous action DOES NOT match the previously recorded variable from our first profile. This is necessary to check because if you have automatic update clock enabled in system settings, that TIME_SET intent gets called whenever the phone updates to the network time, and because of this, we do not want Tasker constantly nagging us that the format has been update, despite that the format is the same as before.
Plugin -> WatchMaker -> WM Send Variable. Set the variable to send to %time_12_24, which is the new format that we switched to and just checked for.
OPTIONAL: Alert -> Notify Vibrate. For Title: put 'Time Format Changed' without quotes, and for text, added 'Updated Format to %time_12_24' without quotes. This will notify that you have logged the format and will tell what the format is.
OPTIONAL: Task -> Wait. Set it for 10 seconds. This will make Tasker wait 10 seconds to move on to the next action
OPTIONAL: Alert -> Notify Cancel. For Title: put 'Time Format Changed' without quotes, and have Warn Not Exist checked. This will dismiss that notification we just sent 10 seconds ago
Task -> End If. Close that If stated that we have created so far
Variables -> Variable Set. Set %TIME_FORMAT to %time_12_24. This will override the previously recorded value and place the new one in its place in the variable, %TIME_FORMAT
Task -> Stop. Leave everything else blank. This will make Tasker end the task from here
Task -> Else. Leave everything else blank. This basically says that if that system format variable DOES have something in it. This is necessary to check because
OPTIONAL: Alert -> Notify Vibrate. For Title: put 'Logged Format Time' without quotes, and for text, added 'Log Format: %time_12_24' without quotes. This will notify that you have logged the format and will tell what the format is.
OPTIONAL: Task -> Wait. Set it for 10 seconds. This will make Tasker wait 10 seconds to move on to the next action
OPTIONAL: Alert -> Notify Cancel. For Title: put 'Logged Format Time' without quotes, and have Warn Not Exist checked. This will dismiss that notification we just sent 10 seconds ago
Variables -> Variable Set. Set %TIME_FORMAT to %time_12_24. This records the value we got from AutoTools and stores it in a global variable for us to use later on.
Task -> End If. Close up the main IF statement that surrounds everything.
One final thing! Make sure that your watchface in WM has this method or something similar (WITH the quotes): '{ttime_12_24}' == '24' and '{dh23z}:{dmz}' or '{dh}:{dmz} {da}'. This sets the clock format to 24hr if the tasker value is 24, and switches to 12hr if the value is 12.
Note: You DO NOT have to have items such as he notification and clock method text to display exactly as I have, as I have designed these for my convenience.
===Download===
The download files are attached below, you can import this by doing the following:
Long-press the little icon that looks like a house at the bottom of the main menu
Press Import
Locate the downloaded file
Tasker should do the rest and import the entire project and the profiles
===Final Notes===
If you have any questions or issues, please feel free to post them here! ^^

Location accuracy - message

Hi there, please how can I accept or hide this message? If I turn on location every time I have to accept it. Any ideas?
I haven't used the app, but I think AutoInput can do it.
If you are rooted, you can use input tab shell commands. You have to figure out the coordinates od the accept button first, enabling the option to see the cursor in development settings...
Here is my profile:
LocationPrompt
autoinput ui query, use the text field and click action ... anyway flash beangapps and its dissapears forever

How to Save text in your application created by Tasker

In this days, i desperately tried to find a way in how to save a text that I wrote in my application made by Tasker. Everytime I opened my application and wrote something in EditText box and close the app.... It disappeares! So with some help (I don't know how to tag him: RuggedHunter, @RuggedHunter thank you so much) he helped me how to make it:
In the task that launches your scene, before the Show Scene action:
1) Variable Set: %Text to: Enter Text Here (if %Text is't set)
2) Show Scene
In your Text Edit element:
1) Text field: %Text
In the task that destroys your scene, before your Destroy Scene action:
1) Variable Set: %Text to: %new_val
When you close the scene, that new text is saved as a global variable.
The next time you open your app, the text edit field should display the text you previously entered.

New to Tasker - Need a Bit of Help

I have a Pixel 4 XL (rooted), there is a way to enable High Brightness Mode when the screen is at 100% brightness and by entering the following in Terminal Emulator.
su
echo on >> /sys/class/backlight/panel0-backlight/hbm_mode
This only sticks until the screen goes off and needs to be ran again to get it on again. I'd like to make a task so that it automatically turns on when the screen is at 100% brightness but I have no idea how to do it. I've watched a few videos but I'm still not sure what to do. Thanks in advance.
Add a task and make sure to name it.
Add an action to the task code -> run shell.
On the line for command put your terminal command;
echo on >> /sys/class/backlight/panel0-backlight/hbm_mode
Tick the box for use root.
Tap the [emoji809] on the line with the "if"
On the first line put the variable %BRIGHT
Tap the center button (probably displays a ~)
Select "Maths: greater than" (will now display a > )
On the second line, enter 230 (* see further down for an explanation)
Back out of the task to save it.
Now create a profile, with the context of event -> display -> display on
Link the task you created above
What this does is each time the display turns on, the associated task will run. But the code will execute only if the display brightness is above the level set. You will need to play with the number to your satisfaction.
On my Pixel 3XL, stock Pie, 237 is actually the highest I've seen brightness go. In theory, 255 is the highest. Other (non pixel devices) have reported an order of magnitude higher. You can view the value of the variable in an alert -> flash action.
If there is a specific app that you will be using, then adding that as a profile context will reduce the number of times the profile will run. Or any other way to narrow down the active condition, maybe a state -> light level context.
ktmom said:
Add a task and make sure to name it.
Add an action to the task code -> run shell.
On the line for command put your terminal command;
echo on >> /sys/class/backlight/panel0-backlight/hbm_mode
Tick the box for use root.
Tap the [emoji809] on the line with the "if"
On the first line put the variable %BRIGHT
Tap the center button (probably displays a ~)
Select "Maths: greater than" (will now display a > )
On the second line, enter 230 (* see further down for an explanation)
Back out of the task to save it.
Now create a profile, with the context of event -> display -> display on
Link the task you created above
What this does is each time the display turns on, the associated task will run. But the code will execute only if the display brightness is above the level set. You will need to play with the number to your satisfaction.
On my Pixel 3XL, stock Pie, 237 is actually the highest I've seen brightness go. In theory, 255 is the highest. Other (non pixel devices) have reported an order of magnitude higher. You can view the value of the variable in an alert -> flash action.
If there is a specific app that you will be using, then adding that as a profile context will reduce the number of times the profile will run. Or any other way to narrow down the active condition, maybe a state -> light level context.
Click to expand...
Click to collapse
Thank you very much, I'll give it a shot.

Create a scene with Titel and Text (for popup)

Hello,
I have made an task with an Popup, there i wrote an title and an text in it.
Now i created an scene for this.
I put an "Text" field into it and named it "Text1"
Now when i change the Layout to this new scene it shows my text from the popup in the Text fielt, but not the Title of the popup. How can i show also the title of my popup? What do i have to do in my scene to show the title and the text of my popup?
Greets, firemouz
If I understand correctly, the scene you created has just a text element named "text1". That element correctly displays the text you entered into the text field (either static text or a variable).
It sounds like you need to add a second text element for the title and position that element at the top of the scene for a common placement of a title.
And how can i tell the second text field that a want to see the title from my popup in it?
I did this already and named it "title1" (because i had to name the first one for the text "text1").
But i do not get the title displayed.
EDIT:
Got it. When i name it "Title" it is working!
Glad you solved your problem. Sorry, I missed the fact that you were still using the pop-up action (as opposed to show scene) with your new scene.

Categories

Resources