Hello!
Ive got problem and im stucked.
im using shell scripts in termux to call actions in tasker.
im doing it like here:
https://glow.li/posts/pass-variables-from-termux-to-tasker/
so for example i can send sms like so:
#tasker#
system-> intent received action: net.dinglish.tasker.send
task:
send SMS: Number: %number; Message: %message
#termux# send.sh
#!/data/data/com.termux/files/usr/bin/sh
am broadcast --user 0 -a net.dinglish.tasker.send -e number "$1" -e message "$2" > /dev/null
so when i execute send.sh 1234567 foo it send "foo" to 1234567
as you can see i can pass variable $1 and $2 and everything is working well.
But from few days im trying to send whatsapp message like this:
#Tasker#
profile: whatsapp
Action: phone->contact Via App
contact: MichaelX
app: .../vnd.com.whatsapp.profile
text: TEST_TEXT
#termux#
#!/data/data/com.termux/files/usr/bin/sh
(this way) am broadcast --user 0 -a net.dinglish.tasker.whatsapp > /dev/null
(or this way) am broadcast --user 0 -a net.dinglish.tasker.whatsapp -e number "$1" -e message "$2" > /dev/null
But when im executing it, whatsapp isnt opening and im geting the Text value inside termux and output "TEST_TEXT" (or %variable) command not found...
How can I do it? How can I call it? Or maybe do YOu know any other way to call it from termux...
Thank You so much, couse im out of ideas how can i pass it.
Related
I use galaxy s i9000. I use google contact not phone contact.. My contact displays like 1-234-5678. How can I change it to display like 123456? Is there a way to delete hyphen from the phone number?
Sent from my GT-I9000 using XDA App
Edit: Solution:
What I tried:
I tried sort of everything. I exported my contacts from google in csv format. Opened the file in excel and did a search and replace of hyphen with ""(nothing). It worked but the leading 0's disappeared. Tried changing the cell formatting to text but sort of didn't work because I had international numbers with + signs and it messed up these numbers. Anyways I played around and at one moment fixed everything but when I saved the file in csv format excel did not allowed me to save.
My Simple Solution which worked for me and might work for you:
1. Export google contact in vcf format.
2. Open this file with word.
3. Search and Replace the hyphen with nothing. i.e. press ctrl+f, select "search and replace" and on search field put "-" and replace field put blank.
4. Press Replace All
5. Now Select all (Ctrl+A) and copy that into a blank notepad.
6. save the file as vcf format.
7. Upload vcf in google contact.
It worked for me..
You could always edit the contact and change it yourself... I did that.
I had almost 400 contacts. 2-3 hyphens in one number..i.e. approx. 800 hyphens..editing contact one by one is out of the question.
Good idea mate, thanks for sharing
Sent from my GT-I9000 using Tapatalk
Check out this post from krunalkp http://forum.xda-developers.com/showthread.php?t=1070222
Download the app
Edit - ah sorry thought I read not google contacts
regsujan said:
I use galaxy s i9000. I use google contact not phone contact.. My contact displays like 1-234-5678. How can I change it to display like 123456? Is there a way to delete hyphen from the phone number?
Sent from my GT-I9000 using XDA App
Edit: Solution:
What I tried:
I tried sort of everything. I exported my contacts from google in csv format. Opened the file in excel and did a search and replace of hyphen with ""(nothing). It worked but the leading 0's disappeared. Tried changing the cell formatting to text but sort of didn't work because I had international numbers with + signs and it messed up these numbers. Anyways I played around and at one moment fixed everything but when I saved the file in csv format excel did not allowed me to save.
My Simple Solution which worked for me and might work for you:
1. Export google contact in vcf format.
2. Open this file with word.
3. Search and Replace the hyphen with nothing. i.e. press ctrl+f, select "search and replace" and on search field put "-" and replace field put blank.
4. Press Replace All
5. Now Select all (Ctrl+A) and copy that into a blank notepad.
6. save the file as vcf format.
7. Upload vcf in google contact.
It worked for me..
Click to expand...
Click to collapse
I have my contacts saved to Phone. Somewhere along the line, due to some sort of restore (happened long ago & I can't remember) I found I had a hyphen "-" between digits (e.g. 041-234-5678) on all phone numbers.
If I manually edited each contact, backspacing the hyphen, it would also remove the digit prior to the hyphen. A real pain.
So I exported my contact list to SD Card. I then took that vcf file & edited it notepad, removing all hyphens in phone numbers. I made sure I only removed hyphens associated with phone numbers, as I also had hyphens that I wanted to keep, which were in the notes section of various contacts.
Next, I saved that file back to SD Card making sure I overwrote the old vcf file.
I then went back into Contacts on the phone & chose "Import from SD Card" from the menu.
All contacts restored without hyphens in phone numbers
Thanks for the info! I have been wondering about this!!
I wrote a bash script for removing unwanted hyphens (dashes) from telephone fields in the vcard you pass as argument. I hope this will help:
Code:
#!/bin/sh
if [ $# -ne 1 ]
then echo "Usage: cleanvcf FILENAME"
return
fi
F_INPUT=$1
C_LINE=""
cat "$F_INPUT" | while IFS="\n" read line
do
C_LINE=$(echo "$line" | grep TEL)
if [ -z $C_LINE ]
then echo "$line">> Cleaned_$F_INPUT
else
echo "$line" | sed -e s/-/""/g>> Cleaned_$F_INPUT
fi
done
return
motopico said:
I wrote a bash script for removing unwanted hyphens (dashes) from telephone fields in the vcard you pass as argument. I hope this will help:
Code:
#!/bin/sh
if [ $# -ne 1 ]
then echo "Usage: cleanvcf FILENAME"
return
fi
F_INPUT=$1
C_LINE=""
cat "$F_INPUT" | while IFS="\n" read line
do
C_LINE=$(echo "$line" | grep TEL)
if [ -z $C_LINE ]
then echo "$line">> Cleaned_$F_INPUT
else
echo "$line" | sed -e s/-/""/g>> Cleaned_$F_INPUT
fi
done
return
Click to expand...
Click to collapse
how do you implement that? is that a linux script?
to OP: export outlook contacts (not google)in excel> high light column with numbers in with hypens edit>replace what = "-" with = " "
ot but usually needed
found this solution for editing in excel
it removes any 44 and replaces with a zero
for all numbers greater than 6 digits
before pasting this into the adjacent column of your data, change the format of the cells
in the column with your existing incorrectly displayed numbers to TEXT. ignore if it looks wrong.
now edit this formula where M1 is your start of data. for google contacts more than likely U2.
copy down to end of data, now copy the correctly displayed numbers and paste special "values" to the column the numbers should be in.
=IF(LEN(M1)>6,IF(AND(LEN(M1)>6,LEFT(M1,2)="44"),"0"&RIGHT(M1,LEN(M1)-2),IF(NOT(LEFT(M1)="0"),"0"&M1,M1)),M1)
Returns the original number if it is <=6 digits
when you close the csv file if you reopen it the numbers will look all weird again. 7.87E.+09 etc. ignore it. when you import back into gmail it will all be correct
The application in the market called Unhyphenizer solves the issue now.
Change the Local Language
Change your Local Language from English(United States) to English(United Kingdom) in Settings > Language and Keyboard. That would solve the problem.
ilyaskk said:
Change your Local Language from English(United States) to English(United Kingdom) in Settings > Language and Keyboard. That would solve the problem.
Click to expand...
Click to collapse
It does not help...
Hi All
I would be really gratefull if someone could help me on this.
I use Tasker on an Old Phone as a remote controller for my Network. Mainly i do commands via SMS , like WOL my Server.
Sometimes when router restarts , since i do not have Static IP but a DNS domain , i lose external IP and can no longer have RemoteDesktop unless i physically get there
So I would like to set tasker to get my external IP and sent it via SMS. I was told that i should :
1. Set Tasker Launch Brower to a specific URL ( Like: https://icanhazip.com )
2. Set it dump the result of that page to a variable
3. Sent it via SMS ...
But i couldn't make it work
Could someone help ?
Thanks in Advance !
Adrs Ip (2)
A1: HTTP Get [ Serverort:https://icanhazip.com Path: Attributes: Cookies: User Agent: Timeout:10 Mime Type: Output File: Trust Any Certificateff ]
A2: Send SMS [ Number:123456789 Message:%HTTPD Store In Messaging Appff ]
frrancuz. said:
Adrs Ip (2)
A1: HTTP Get [ Serverort:https://icanhazip.com Path: Attributes: Cookies: User Agent: Timeout:10 Mime Type: Output File: Trust Any Certificateff ]
A2: Send SMS [ Number:123456789 Message:%HTTPD Store In Messaging Appff ]
Click to expand...
Click to collapse
I cannot thank you enough !!! Brilliant
I want to send an intent with longitude and latitude to an app.
The app tells you which options you have to choose in order to receive an intent from tasker.
1st extra: lat:16.65878D
2nd extra: lng:-45.0364D
Target: Service
When I set those settings in Tasker and send an intent to Tasker which triggers to send this intent it works perfectly fine but sending an intent which triggers sending an intent seems pointless to me.
Intent serviceIntent = new Intent("com.incorporateapps.fakegps.ENGAGE");
serviceIntent.putExtra(Intent.EXTRA_TITLE, "lat:16.65878D ");
serviceIntent.putExtra(Intent.EXTRA_TEXT, "lng:45.0364D ")
startService(serviceIntent);
The location app tells me it changed its location but always changes location to lat:0, and lng:0
I tried different options for putExtra like EXTRA_SUBJECT instead of EXTRA_TITLE but nothing works.
Do you guys know what the intent tasker sends looks like or what I am doing wrong?
thanks a lot
Autoshare intercept is your friend…
I found that there might be a line break or new line that i was omitting and it would cause Tasker, and the app to completely crash
Anyone know a profile that can send an automated message (text) when phone is charging?
Profile: Charging (209)
State: Power [ Source:Any ]
Enter: Anon (236)
A1: Send SMS [ Number:<Number goes here> Message:<Message goes here> Store In Messaging Appff ]
sumotori1 said:
Profile: Charging (209)
State: Power [ Source:Any ]
Enter: Anon (236)
A1: Send SMS [ Number:<Number goes here> Message:<Message goes here> Store In Messaging Appff ]
Click to expand...
Click to collapse
What is Anon 236? and I want it for any number.
Anon is an anonymous task attached to the profile, it's just a naming.
I think you need to explain a little better what you are trying to do.
Do you want to reply to an incoming message of your phone is charging?
sumotori1 said:
Anon is an anonymous task attached to the profile, it's just a naming.
I think you need to explain a little better what you are trying to do.
Do you want to reply to an incoming message of your phone is charging?
Click to expand...
Click to collapse
I tried your profile, and it only worked once. Yes. I need to auto reply a text while cell is charging. Whether on my contact list or ANY number
sumotori1 said:
Anon is an anonymous task attached to the profile, it's just a naming.
I think you need to explain a little better what you are trying to do.
Do you want to reply to an incoming message of your phone is charging?
Click to expand...
Click to collapse
I realized what Anon meant, after I hit enter. Lol
Tmobilefan906 said:
I tried your profile, and it only worked once. Yes. I need to auto reply a text while cell is charging. Whether on my contact list or ANY number
Click to expand...
Click to collapse
Alright... Then you need to add one more condition on the profile: Event > Received text SMS
So you will have two conditions on the same profile.
Then replace the number with: %SMSRF
sumotori1 said:
Alright... Then you need to add one more condition on the profile: Event > Received text SMS
So you will have two conditions on the same profile.
Then replace the number with: %SMSRF
Click to expand...
Click to collapse
There...
Yup, I think I his should work perfectly.
Edit: Just saw that you used the variable on the message received. You don't need it there. As soon as you receive the message, the variable gets updated from tasker. It's a built-in variable that gets a value as soon as Tasker starts monitoring messages. So leave sender empty. Otherwise, perfect!
sumotori1 said:
Yup, I think I his should work perfectly.
Edit: Just saw that you used the variable on the message received. You don't need it there. As soon as you receive the message, the variable gets updated from tasker. It's a built-in variable that gets a value as soon as Tasker starts monitoring messages. So leave sender empty. Otherwise, perfect!
Click to expand...
Click to collapse
So, under "number" I could leave blank? The profile I shown ya seems to work as is.
Tmobilefan906 said:
So, under "number" I could leave blank? The profile I shown ya seems to work as is.
Click to expand...
Click to collapse
I'm glad it's working for you!
Yes, it's an optional parameter.
Maybe it works, but I'd suggest to empty it to avoid and undesired behaviour in the future.
sumotori1 said:
I'm glad it's working for you!
Yes, it's an optional parameter.
Maybe it works, but I'd suggest to empty it to avoid and undesired behaviour in the future.
Click to expand...
Click to collapse
Which one...number or sender?
sumotori1 said:
I'm glad it's working for you!
Yes, it's an optional parameter.
Maybe it works, but I'd suggest to empty it to avoid and undesired behaviour in the future.
Click to expand...
Click to collapse
Know a profile to send a text while you're on a call?
Tmobilefan906 said:
Which one...number or sender?
Click to expand...
Click to collapse
Sender
Tmobilefan906 said:
Know a profile to send a text while you're on a call?
Click to expand...
Click to collapse
You need two profiles, one to monitor phone off hook (task to set variable %INCALL to true) and another profile to monitor phone idle (task to set variable %INCALL to false).
sumotori1 said:
Sender
You need two profiles, one to monitor phone off hook (task to set variable %INCALL to true) and another profile to monitor phone idle (task to set variable %INCALL to false).
Click to expand...
Click to collapse
Yea, I did see phone off hook but wasn't sure. Thanks.
sumotori1 said:
Sender
You need two profiles, one to monitor phone off hook (task to set variable %INCALL to true) and another profile to monitor phone idle (task to set variable %INCALL to false).
Click to expand...
Click to collapse
I'm lost. Lol. How would I do that?
This is how I set up mine some time ago. These are two profiles (64 and 68) and each has one enter task (65 and 69 respectively).
Profile: Phone Offhook (64)
Event: Phone Offhook
Enter: Phone Offhook (65)
<Set InCall variable>
A1: Variable Set [ Name:%InCall To:true Recurse Variables: off Do Maths: off Append: off ]
Profile: Phone Idle (68)
Event: Phone Idle
Enter: Phone Idle (69)
<Set InCall variable>
A1: Variable Set [ Name:%InCall To:false Recurse Variables: off Do Maths: off Append: off ]
Once you do that, you will always have access to the variable %InCall for my example which you can monitor (with a profile with a state variable check). If the variable is set to true, you're in a call, otherwise you're not.
Anyone know how to create a task for automatic voice call on skype to a specific number. Pls help, i have tried my best to create one.
I saw this but i didnt know how to use it
Intent skype_intent = new Intent("android.intent.action.CALL_PRIVILEGED");
skype_intent.setClassName("com.skype.raider","com.skype.raider.Main");
skype_intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
skype_intent.setData(Uri.parse("tel:+91//phone number"));
startActivity(skype_intent);
https://stackoverflow.com/questions/14293974/skype-call-using-username-in-android
I think you want a "system -> send intent" action filled out something like this:
Code:
A1: Send Intent [
Action: android.intent.action.VIEW
Cat: None
Mime Type:
Data: skype:[user]?call&video=true
Extra:
Extra:
Extra:
Package:
Class:
Target: Activity
In the data field, you should replace "[user]" with the username you are calling.
I don't use Skype so this is a guess and I can't test it. But it should get you going.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers