How do I do this text-based task? - Tasker Tips & Tricks

Hey guys, I'm trying to automate a task I do often for work. When I get a potential new customer, I receive a standard email with their information in a specific format. For example:
Name - x
Email - y
Phone - z
I am trying to figure out a way to interact with this body of text and automate it as much as possible. I would have to add a new contact with the name, and send out a standardized email as well as a text.
I haven't really made complex tasks like this, so I'm a bit lost as to where to start. I am rooted. I would also like to note that I'm using a proprietary email app (Blackberry Hub+ Inbox), so I think it may be easiest to start off the task by manually copying the body of the text and then somehow triggering the task.
Thanks in advance!

This project is actually a little complex, and it also interested me so, while I usually don't do this, here is a taskernet share.
Requires AutoTools to be installed because a webscreen is used. On install, you must edit actions 15 & 16 in the task. These are variables for the email subject and body.
The profile triggers when data starting with e.g. "Name - John Doe" is copied to the clipboard. Then a button pops up on the right side of your screen and when you tap it the information is entered into a new contact form that you can edit, cancel or save.
A second button becomes available which triggers the composed email action.
The buttons will time out after 30 seconds without triggering the associated task. You can also "fling" them away to dismiss.
The task is expecting each piece of information to be on a separate line like:
Name - John Doe
Email - [email protected]
Phone - (999) 999-9999
The labels for each line are used as variables in the task to identify the associated data. Therefore, the order does not matter. Though if "Name - " is not first, the profile will not trigger. You would need to edit the regex in the profile context.
If, for example, an address is on multiple lines, the task will need to be modified to handle that.
To limit the activation of this profile to only when the data is copied in a specific app such as an email client, add that app as a context in the profile.
The task is heavily commented.
Finally, I add my username into the profile and task names to help avoid the possibly of namespace collisions (when the imported project has the same profile, task or variable names as existing profile, task or variables). The -ktmom can be removed.

Related

Automated email app needed

I'm looking for an app that can compose and send an email with just a click from the home screen.
Ideally, it coule be set to ask for bits of variable information. So I could write an email template where the recipient is preset (or left as a variable), the subject is preset or can contain a variable as well, and most of the body is preset except for one variable. For example:
To: [email protected]
Subject: Make sure to buy [UserInputHere] today!
Message: You should buy this at [UserInputHere]'s market!
This would be incredibly useful for interacting with all sorts of bots like gmail (when combined with filters etc ...) or task.fm or rememberthe milk.
DG QuickCut is the closest (the customi shortcuts) but alas does not allow me to make templates or even set the subject or message body.
Can someone create this app?

[Q] contact/calendar.apk integration; ring profiles

There are 2 features I'd like make available. I am posting here to see if they've already been coded, and if not, some guidance on what i how to go about coding them (i have eclipse and the SDK for 1.6 all set up...i just need to know what native android files to modify (im guessing contacts.apk) to get the first item figured out, and then for the second item below, i'd like to see some sample code of how to set ring settings.
1) since most of our new calendar events are to meet with/call people in our contacts list, id like if the context menu for contacts could have a menu item added: Create Event. what would happen when selected is a new calendar event window would pop up, pre-populated with the contact's phone number in the Description field and their name in the Event Name field. the user could then modify these to add details. this mod would save us from having to go to the calendar and create an even to "call joe", only to have the reminder come up later and then have to navigate the contacts to find joe so we can call him. here, the event would have his number preloaded and could be clicked on (like a hyperlink) to load the number into the dialer
how do we hook into the contacts.apk file to make this type of mod? or, is the mod to be done some other way?
2) though we can select different ring tones for different contacts/groups, and we can also set different ring volumes/vibes, it would be nice to have a ring profile that would, say, only let the "family" group ring but stay silent for everyone else. this way, i can put the phone in this mode when going to sleep, but still be available for emergency family phone calls. this is much like the black list/white list app on xda for winmo.
Dude, stop double-clicking that Submit button. The mods are probably tired of deleting your double posts by now.
Moved To Dream Q&A

[HELP] How do I get the start and end times (values) of current calendar event?

I want to set up an Alarm at the time the current calendar event ends.
Read the wiki and didn't find an in built variable that stores the end time. Only %CALTITLE / %CALDESCR / %CALLOC were there.
Then I stumbled on to Action > test app feature. But can't figure out how to get it to work. I made this little task to test it out
This is what I tried
Get the end time of current calendar event and store in variable %Time
Flash a message of %Time to make sure value was correctly put in the variable
1 Test App > Set Type - Calendar End(Second), Set Data - %TIME, Store in %Time.
2 Alert > Flash > Set Text to %Time
However, The flash message read "%Time" instead of the end time of current calendar entry.
I don't know what Data meant in test app. I assumed it asked for the time at which calendar entries should be fetched. So I put %TIME to fetch the end time of the calendar entry active at current time.
Also this is what's present in the documentation
Calendar tests: require the time in seconds since the epoch as Data (e.g. use %TIMES, or use the Variable Convert action to convert a date/time into seconds first) and are entered in an array (%var1, %var2 etc), not a plain value, because there may be multiple events at the time specified.
Click to expand...
Click to collapse
this thread is 2 years old, but I thought I'd share my humble opinion....
theoretically you could test calendar to determine the title of the of the event, make a FOR loop and keep testing it until the event is gone.
Other than that, I'd use apps like Business Calendar, which displays a notification for on going event. Presumably Tasker can detect this.

[TUTORIAL] Email yourself through tasker!

Hi all. There's this one tasker tutorial on how to send yourself emails, but it doesn't work. At least for me. You have to install SL4A and PY4A and all these kinds of stuff from random github links, both apps being old and not providing errors on failure of python scripts.
So I wrote a fresher, shorter python script to mail yourself, and using the tasker plugin QPyPlugin I managed to send myself an email.
REQUIREMENTS
NOTE: QPyPlugin is a paid app, and it's really limited, but it does the job for this case.
Tasker (duh)
QPython3 (or QPython)
QPyPlugin (Paid: 3$)
This python script
Steps
First of all you'll have to edit the script and enter your data instead of the data written. Enter your email, your password, and if you'd like to use another smtp server other than gmail enter it's data.
Make sure the script is located at "qpython/scripts3/" (or "qpython/scripts", depending if you're using QPython3 or QPython). It will stay there.
Let's create the simplest task we can: A greeting email.
1. Create a new task named whatever you'd like
2. Now lets write what we're going to send into a file. The default location is "temp/mailout.conf" and it's changeable inside the script. If you are going to change it make sure you'll be writing to the file you specified in the script instead of "temp/mailout.conf".
Add a "Write File" action. In the File field, enter "temp/mailout.conf". In the text, enter the following:
Code:
To: [email protected]
From: Tasker Greeting Task
Subject: Hello from tasker!
Hello there!
I can use multiple lines, and even tasker variables.
It is now %TIME.
Crazy, right?
That's the syntax for the config file. The first lines can be an field you'd like, but the first line must be To: <address>. After the fields, enter a blank line and after that, type the body.
Make sure "Append" is not selected, so it'd create a new file each time you run it.
3. Now let's run the script. Add a "QPyPlugin" action. Press the configuration button and select which QPython app you have (QPython or QPython3) and the script.
That's it! Try to run the task and check your email.
Ideas / actual usage
Send yourself the weather & the news every morning
E-Mail participants in a calendar event reminding them about it
Email yourself the phone's location when your battery is low (Which is what I use it for)
When someone fails entering the phone twice email yourself the phone's current location
The possibilities are endless!
FAQ
Q: I'm getting a ValueError with something about the first line of the file and I don't know what to do!
A: Really? It says so right there. The first line of the mail file must be "To: <address>".
Q: I'm getting another error!
A:
Make sure you inputted the correct username & password in the script.
If you changed the SMTP server make sure you entered it properly and it's working.
Make sure that the mail file you create matches with the path & name in the python script (defaults to "/temp/mailout.conf").
Q: How do I know you're not going to steal my precious data?!
A: Because you can see so for yourself in the script

Dialer app - specific functions for kid phone

Hello guys,
I was looking for kids mode like the one from Samsung. Unfortunately my kid's phone is not samsung and i wasnt able to port the application to work on Sony Device.
The main reason for this is that they had a Dialer application for kids which shows no phone number but ONLY the name of the mother/father contacts while calling. I want to use this function to make the phone more secure in case is stolen or robbed. As well it offers to block any other incoming calls except the selected ones.
@ktmom suggested me to try with a Tasker. I've never been experience a similar software for this kind of things.
Could you please gimme some advices or help regarding my needs and suggest me from where to start.
Thanks in advance.
Hi Ho [emoji16]
The plan I would start with is to create a shortcut on the desktop or a notification with call mom (or dad) buttons. Then use tasker to directly dial the numbers (as variables) without having them entered into the phone's contacts.
The trick is the dialer history will keep a history of called numbers, but I think that can be deleted; though we may need one or two plugins to tasker to achieve that reliably.
If this is in line with your goals, then I'll be happy to create a task or two to handle this that you can import. That is easier than teething to develop it yourself as a beginner.
I'm at the airport waiting for my daughter's flight, but let me know if this will work, or any ideas you have.
Sure, let's do it like that with your help. And in the process of developing we can sharpen it.
BTW thank you so much for your help and patience. I do really appreciate your help. ????
I actually just got home. Is there a timeframe for this? I'm thinking Christmas or similar. Otherwise I'll spend some time this weekend to come up with something for you.
This is just a basic set of tasks to create quick dialers to Mom and Dad, without needing the numbers to have been entered into the contacts app.
One task, "create shortcuts", sets two of Tasker's quick setting tiles. One will call Dad, the other will call Mom. The use of the quick settings tiles should help prevent accidental calls and still be convenient.
After importing the linked project, go to the device's quick settings editor and drag the first two Tasker tiles into the active area. The tasks won't actually appear set to the tiles until they are in the active area.
The task, "create shortcuts" should run on import of this project, performing the configuration mentioned above; associating the tiles with the "call mom" and "call dad" tasks.
The icons are set in the respective "call mom" or "call dad" task. To change the icon, enter the task then tap the icon at the bottom and select a new one. The "create shortcuts" task may need to be run again (manually) to update the tile's icon.
You must go to the "dialer" task and edit the value in the "To" field within the first two actions to the appropriate phone numbers.
The left facing arrow at the top left of the screen exits out of the task and saves the changes. You should also make a habit of tapping the checkmark [emoji736] at the top of the screen after saving a task, which saves the changes to Tasker. That checkmark is available only when there are changes to be saved.
This is just a start, hoping to get feedback if this is the right direction for you.
Import Kids Phone project.
Hey,
thanks a lot for the time you spent for this.
I've tested it and it calls with no issues.
Now we have to make the phone numbers to disappear. Can we put a fixed custom title? This is because it uses the name written in the contact list.
BTW is there an option to drop an icon on the desktop of the phone?
Thanks again for your great help!
IMalchev said:
Hey,
thanks a lot for the time you spent for this.
I've tested it and it calls with no issues.
Now we have to make the phone numbers to disappear. Can we put a fixed custom title? This is because it uses the name written in the contact list.
BTW is there an option to drop an icon on the desktop of the phone?
Thanks again for your great help!
Click to expand...
Click to collapse
Yes, we can create a desktop shortcut. Instead of the tiles?
What do you mean "it uses the name in the contact list"? Do you mean in the call history?
I meant that when I run the call from the tasker it uses the name from the contact book/history. This is not big issue, but it just wondering if it's possible.
Thank you
IMalchev said:
I meant that when I run the call from the tasker it uses the name from the contact book/history. This is not big issue, but it just wondering if it's possible.
Thank you
Click to expand...
Click to collapse
That is the relationship the phone app has with the contact app. You have to remove the names from the contact app.
I'm confused. I thought the goal here is to obfuscate the phone numbers so if the phone is picked up by a "stranger", the numbers are not evident.
If I was, for example, a stalker, and I took the child's phone to get phone numbers, the first place I would look is in the contacts app. The second place is in the call log. Can you help me understand what is and isn't necessary here.
To create the task to remove the call's history from the history, I have to sort out the contentrovider structure for the phone database. I've explored the text messaging DB, but I need to be on my computer to find the phone DB structure.

Categories

Resources