• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

exmaple for if command in tasker simple

The following examples have the same result in Tasker … if the variable %sample contains a y then Yes is flashed …

Dev1
A1: Variable Set [ Name:%sample To:y Recurse Variables:Off Do Maths:Off Append:Off ]
A2: If [ %sample ~ y ]
A3: Flash [ Text:Yes Long:Off ]
A4: End If

Dev2
A1: Variable Set [ Name:%sample To:y Recurse Variables:Off Do Maths:Off Append:Off ]
A2: Flash [ Text:Yes Long:Off ] If [ %sample ~ y ]

There is a forum dedicated to Tasker with many examples at …
https://androidforums.com/apps/tasker.704/


… Thom
 
Last edited:
The following examples have the same result in Tasker … if the variable %sample contains a y then Yes is flashed …

Dev1
A1: Variable Set [ Name:%sample To:y Recurse Variables:Off Do Maths:Off Append:Off ]
A2: If [ %sample ~ y ]
A3: Flash [ Text:Yes Long:Off ]
A4: End If

Dev2
A1: Variable Set [ Name:%sample To:y Recurse Variables:Off Do Maths:Off Append:Off ]
A2: Flash [ Text:Yes Long:Off ] If [ %sample ~ y ]

There is a forum dedicated to Tasker with many examples at …
https://androidforums.com/apps/tasker.704/


… Thom
i mean not with those commands like this
 

Attachments

  • Screenshot_20180528-080005.png
    Screenshot_20180528-080005.png
    110.7 KB · Views: 201
  • Screenshot_20180528-080014.png
    Screenshot_20180528-080014.png
    58.6 KB · Views: 174
Position to TASKS frame
Tap +
Type Sample
Tap check mark
Tap +
Tap Task
Tap If
after % type sample
In value type y
Tap back arrow
Tap +
Tap Alert
Tap Beep
Tap back arrow
Tap +
Tap Task
Tap End If
Tap back arrow

… Thom
 
I do not know what you are referring to with "like this file".

Tasker allows users to share code with each other very simply. That is what is shown in #2 above.

I strongly suggest that you step through the example that I posted in message #4 above. When you do I think it will start to become obvious to you.

If it is not something you are willing to do I suggest that you abandon Tasker as a tool.

… Thom
 
again tom thanks a lot for your help but as an exmpale can u give me a task that will make an app to work at acertain day at certain hour i really want 2 learn
 
This Profile/Task runs for one minute on May 29th at 3:38p and launches the Calculator app.

Profile: DateTime
Day: The 29th of May
Time: 3:38PM
Enter: Anon
A1: Launch App [ App:Calculator Data: Exclude From Recent Apps:Off Always Start New Copy:Off ]
A2: Stop [ With Error:Off Task: ]

… Thom
 
i need 2 ask tom where 2 put the the stop command in which page i attached a file can u tell me if this is the right page
 

Attachments

  • exmpale-2.jpg
    exmpale-2.jpg
    66.4 KB · Views: 175
It is impossible to know what you are asking by you posting a screenshot of something.

Enter: Anon
A1: Launch App [ App:Calculator Data: Exclude From Recent Apps:Off Always Start New Copy:Off ]
A2: Stop [ With Error:Off Task: ]

Is the Enter Task that is executed when the trigger in the profile invokes it.

Anon means it is unnamed.
A1 is the first action
A2 is the second action

Assuming your post is positioned at the first action you tap the back arrow in the top left corner and then enter Stop from the Task actions.

Where are you located and what is the language that is being displayed by the alphabet I don't know?

The way to learn Tasker is to stat out simple, get it to work, add to what works, get that to work.

… Thom
 
Last edited:
and one last thing can u send me a guide that expalins how to make the next situation
when i arrive to a certain location i want a call to happen to a certain number /contact
thanks tom:)
 
I cannot send you a "guide with pictures". Whatever I sent would be inadequate. I strongly suggest that you learn how Tasker subjects are shared and discussed around the world.

I think we are spinning our wheels here.

Tasker is a multi faceted tool for people who want to invest the time to do things the Tasker way and are willing to work at it. It has a fairly long learning curve. It is as close to programming as you can be without actually programming.

The communication is not by taking screen shots of partially legible screens (WHERE are you located and WHAT language is it displaying?) (I am in the USA and only work in English.)

The communications are by posting the code you are asking about using the Tasker tools provided for the purpose …

To post a Task ...
In the TASKS area
Long press on a Task name until it is highlighted
Tap three dots
Tap Export
Tap Description to Clipboard
Paste the contents of the Clipboard into a message
Ask the question(s)

"when i arrive to a certain location i want a call to happen to a certain number /contact" would be starting the third project when there is no indication that you tried what was documented for the first project or second project.

Do the first project, see what you learn, then do the second project. When they are both done consider a third project.

… Thom
 
here is the frofile i made fix me at my mistakes
Profile: Eee (2)
Location: 32.28874969482422 / 34.86185073852539 / 200.0m
Enter: 098355512 (3)
A1: Call [ Number:098333333 Auto Dial:On ]
this frofile is simple when ever i reach this location i want the my phone to call this number
 
I thought you were going to start with the first project, then do the second project, then do the third project.

I have found GPS to be rather unreliable and it eats battery.

I have found WiFi Near to be very accurate.

Is there a nearby WiFi node you can test for?

The following checks for proximity of my office WiFi and if present it turns on WiFi in my phone …

Profile: tlaOfficeNear
State: Wifi Near [ SSID:TLANET-2.4GHz/TLANET-5GHz MAC:* Capabilities:* Min. Activate Signal Level:4 Channel:0 Toggle Wifi:Off ]
Enter: tlaOfficeNearEnter
A1: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
A2: Perform Task [ Name:tlaWiFiOn Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ]

… Thom
 
Back
Top Bottom