I have an app I am trying to automate with Tasker, and I need Tasker to move the touchpad cursor and then simulate a left click and/or simply simulate a finger tap on the screen.
Details: The app is the Boston Globe reader, which is a localized version of Press Reader. The app only downloads new issues when it is opened (the "background update" feature is not working for me), and this takes a few minutes, so I am trying to use Tasker to open the app at 5 AM and take a few steps to get the download started. (The download is supposed to start when the app is opened, but this also is not working for me).
Problem is that after a few steps, I get to a screen where I have to touch (or click with the touchpad and cursor) a particular Boston Globe icon. I have been unable to get Tasker to simulate either of those actions.
Strangely enough, if I tap anywhere on the screen, I can then use the cursor keys to select the Globe icon and then press the "Enter" key, but this does not work without the initial "triggering" screen tap with my finger, which I cannot get Tasker to simulate.
All suggestions are appreciated! TIA!
smalis said:
I have an app I am trying to automate with Tasker, and I need Tasker to move the touchpad cursor and then simulate a left click and/or simply simulate a finger tap on the screen.
Details: The app is the Boston Globe reader, which is a localized version of Press Reader. The app only downloads new issues when it is opened (the "background update" feature is not working for me), and this takes a few minutes, so I am trying to use Tasker to open the app at 5 AM and take a few steps to get the download started. (The download is supposed to start when the app is opened, but this also is not working for me).
Problem is that after a few steps, I get to a screen where I have to touch (or click with the touchpad and cursor) a particular Boston Globe icon. I have been unable to get Tasker to simulate either of those actions.
Strangely enough, if I tap anywhere on the screen, I can then use the cursor keys to select the Globe icon and then press the "Enter" key, but this does not work without the initial "triggering" screen tap with my finger, which I cannot get Tasker to simulate.
All suggestions are appreciated! TIA!
Click to expand...
Click to collapse
SOLVED, via Tasker Google Groups:
"Ok, you can try the "Run shell" action with the command "input tap 564 1856" where the numbers are the x and y coordinates of the tap location.
in order to get the correct coordinates, on your device go to Settings -> dev options and turn on "show pointer location" then you can go into your app and tap on the correct location and it will display the x/y coordinates of the tap which you can input on that script."
smalis said:
SOLVED, via Tasker Google Groups:
"Ok, you can try the "Run shell" action with the command "input tap 564 1856" where the numbers are the x and y coordinates of the tap location.
in order to get the correct coordinates, on your device go to Settings -> dev options and turn on "show pointer location" then you can go into your app and tap on the correct location and it will display the x/y coordinates of the tap which you can input on that script."
Click to expand...
Click to collapse
i can i tap and HOLD for a specific ammount of seconds?
joelstitch said:
i can i tap and HOLD for a specific ammount of seconds?
Click to expand...
Click to collapse
Don't know. You would have to determine if Run Shell has a "tap and hold" function. Try asking in Tasker Google Groups: https://groups.google.com/forum/#!forum/tasker
Did you ever find out about the tap and hold request? I am looking for the same solution.
squint said:
Did you ever find out about the tap and hold request? I am looking for the same solution.
Click to expand...
Click to collapse
You can do a long press by using shell script and doing input swipe x1 y1 x2 y2 ms, just make sure that x1 and x2 are the same value and that y1 and y2 are the same value then end with however many milliseconds you want the press to be. For example input swipe 400 700 400 700 300, would do a long press on coordinate 400 700 for 300 ms.
Thank you! That worked perfectly. One thing I did discover is that the "input swipe" command seems to be case sensitive. SwiftKey automatically capitalized "Input" - and it did not work until I made it lowercase.
SparedSquid said:
You can do a long press by using shell script and doing input swipe x1 y1 x2 y2 ms, just make sure that x1 and x2 are the same value and that y1 and y2 are the same value then end with however many milliseconds you want the press to be. For example input swipe 400 700 400 700 300, would do a long press on coordinate 400 700 for 300 ms.
Click to expand...
Click to collapse
I came across this when searching for a way to stimulate a long press with Tasker. I'm trying to stimulate a long press of a volume key, to attach it to a Tasker task, so that I can then assign that task to a swipe using the Wake Gestures app I'm using, so as to bring up Ambient Display in Lollipop. Unless anyone reading this knows of a shortcut I'm missing that will activate Ambient Display in an easier way?
Related
I'm looking to make a 1x1 shortcut to launch this activity: com.teslacoilsw.widgetlocker.UNLOCK
Does anyone know how I can accomplish this?
Try:
-long press on desktop
-custom shortcut
-enter label name, click on "pick your activity" button
-choose between "Activities" (adw), "Any Cut", etc, then scroll down to the activity you mentioned
Unfortunately It's not in the list, hence the "hidden" in the title
I can see the app's activities, but not this specific one.
Install and run Tasker:
Create new Task
Name it Unlock or whatnot
Add from Misc category "Action Intent"
Action: com.teslacoilsw.widgetlocker.UNLOCK
Target: Activity
(Leave the rest alone)
Click Done to finish setting the Action Intent
Tap the Icon button in the bottom to give it an Icon (to the left of the X)
Click Done to save the Task
Click Apply to save settings and exit Tasker setup
In Widgetlocker Config:
Add Shortcut
Look for the "Task" shortcut from Tasker
Find your "Unlock" task
Click Make Shortcut
Profit. Although it's faster to swipe
khaytsus said:
Install and run Tasker:
Create new Task
Name it Unlock or whatnot
Add from Misc category "Action Intent"
Action: com.teslacoilsw.widgetlocker.UNLOCK
Target: Activity
(Leave the rest alone)
Click Done to finish setting the Action Intent
Tap the Icon button in the bottom to give it an Icon (to the left of the X)
Click Done to save the Task
Click Apply to save settings and exit Tasker setup
In Widgetlocker Config:
Add Shortcut
Look for the "Task" shortcut from Tasker
Find your "Unlock" task
Click Make Shortcut
Profit. Although it's faster to swipe
Click to expand...
Click to collapse
Thanks for this.
Well, no, tapping a single 1x1 button is faster than swiping (hold and drag). But that's not the reason I'm looking to do this. Namely, I don't want to waste a 4x1 row just to unlock when I don't need or want the sliders on either side (I have other widgets that I want to put on my lock screen )
[Edit]: Tasker $$$
Paul22000 said:
Thanks for this.
Well, no, tapping a single 1x1 button is faster than swiping (hold and drag). But that's not the reason I'm looking to do this. Namely, I don't want to waste a 4x1 row just to unlock when I don't need or want the sliders on either side (I have other widgets that I want to put on my lock screen )
[Edit]: Tasker $$$
Click to expand...
Click to collapse
Yes, Tasker costs money. But Tasker can do anything.
Here's a partial list of what Tasker does for me...
Home, Work, Meeting, Sleep profiles... Based on time AND location.
Turns on speakerphone when I'm on the phone and turn it face down
Downloads a zip file of data I want for geocaching daily, unzips it so it's ready to digest
Turns up the volume and backlight when Waze (GPS Nav) is running
Backs up my dcim dir (10 minutes) using rsync, as images sometimes go poof
Pings me at 7:20 that it's time to get out the door with my kid to get her to school
Responds to specially tagged email or sms with info such as GPS location, phone number, last call in and out
Sends the same info above to a fixed number if my phone number changes (SIM gets swapped)
Reminds me if I've missed a phone call every N minutes
Gives me extra notification for important emails so I know to look right away
Uploads my current GPS coordinates to my website every 10 minutes
Backup my SD card over Wifi nightly
That's most of the list I have.. Some people have it read SMS to them while in the car, chime N number of times for the time (coo-coo clock).. Some of these (like back up the SD card) requires more stuff (fixed ssh client, generating keys, rsync, etc) but most of the above are all Tasker. Think of Tasker as a GUI interface to create programs (tasks) that run under specific circumstances (Contexts) that executes about anything in the Android API or beyond (it can use Locale plugins, including the Execute plugin etc..)
I can't imagine Android without it. And in case you're curious, what effect on battery life? None that I've ever measured. When I first started using it I monitored battery life for several days and noticed no increase in usage.
Paul22000 said:
Thanks for this.
Well, no, tapping a single 1x1 button is faster than swiping (hold and drag). But that's not the reason I'm looking to do this. Namely, I don't want to waste a 4x1 row just to unlock when I don't need or want the sliders on either side (I have other widgets that I want to put on my lock screen )
[Edit]: Tasker $$$
Click to expand...
Click to collapse
Just disable the lock sliders in Widget Locker, and enable one of the button unlocks.
EDIT: Ok, I did it. Unfortunately, my method requires "ShorterCut" from the market (paid app) but much cheaper than Tasker. There may be other ways. Here's what I did.
1. Go to WL and add shortcut
2. Select ShorterCut from the shortcut list
3. Select empty shortcut
4. Go to "Edit Intent"
5. In the first field labeled "Action" put:
Code:
com.teslacoilsw.widgetlocker.UNLOCK
6. In the second field labled "Component" type:
Code:
com.teslacoilsw.widgetlocker/com.teslacoilsw.widgetlocker.WidgetLocker
7. Press "Save intent"
8. Edit Shortcut title to whatever you want and change icon to your wishes.
9. Press "Create shortcut"
10. Done
overground said:
Just disable the lock sliders in Widget Locker, and enable one of the button unlocks.
EDIT: Ok, I did it. Unfortunately, my method requires "ShorterCut" from the market (paid app) but much cheaper than Tasker. There may be other ways. Here's what I did.
1. Go to WL and add shortcut
2. Select ShorterCut from the shortcut list
3. Select empty shortcut
4. Go to "Edit Intent"
5. In the first field labeled "Action" put:
Code:
com.teslacoilsw.widgetlocker.UNLOCK
6. In the second field labled "Component" type:
Code:
com.teslacoilsw.widgetlocker/com.teslacoilsw.widgetlocker.WidgetLocker
7. Press "Save intent"
8. Edit Shortcut title to whatever you want and change icon to your wishes.
9. Press "Create shortcut"
10. Done
Click to expand...
Click to collapse
Is it possible to do this with AnyCut?
The fields are Action / Data / Type, and I'm not sure which one to use for the "Component". I got a LauncherPro force close... Weird.
Paul22000 said:
Is it possible to do this with AnyCut?
The fields are Action / Data / Type, and I'm not sure which one to use for the "Component". I got a LauncherPro force close... Weird.
Click to expand...
Click to collapse
Don't think Anycut's that advanced.
EDIT: Just tried with Bettercut, and same thing happened to me as it did to you. Uninstalling that crap.
I might be missing what you are wanting to do, but you just want to press one button to unlock Widgetlocker correct? I have it installed and in Settings/ Buttons & Imputs there is an option to "Back Button Unlock". I have that checked and all i have to do is hit the back button and it unlocks it for me. There is also an option to unlock with the camera button and/or trackball.
ukYfan said:
I might be missing what you are wanting to do, but you just want to press one button to unlock Widgetlocker correct? I have it installed and in Settings/ Buttons & Imputs there is an option to "Back Button Unlock". I have that checked and all i have to do is hit the back button and it unlocks it for me. There is also an option to unlock with the camera button and/or trackball.
Click to expand...
Click to collapse
Yes but I don't want it to unlock accidentally, which is possible if using the "back button unlock" feature. And if you put the timer on it, then it just becomes annoying to unlock.
Paul22000 said:
Yes but I don't want it to unlock accidentally, which is possible if using the "back button unlock" feature. And if you put the timer on it, then it just becomes annoying to unlock.
Click to expand...
Click to collapse
Understandable, but I have never unlocked it accidentally
Sent from my Droid using Tapatalk
sorry to dig up an old thread but what home app are you using, if you are using a third party app like apex or nova you can just put a shortcut on your widget locker screen to launch that app. thats what i was doing for a while.
I have found an app "Home2 Shortcut" that will allow me to double tap my home button to trigger a app or shortcut. I have created a Tasker task (and exported to a app) that sets the media volume to 5 when my home button is double tapped.
I would like to be able to double tap the home button and have the media volume adjusted based on the current volume. So for example if its less than 5 set to 15. If its less than 15 set to 5. And if its equal to 15 set to 5. I have played around with the "IF" variables but I not a programmer and need some help. THANX!
Maybe this can help:
http://tasker.wikidot.com/fadeintask
post-mortem said:
Maybe this can help:
http://tasker.wikidot.com/fadeintask
Click to expand...
Click to collapse
Found what I need here:
https://groups.google.com/forum/#!searchin/tasker/help$20needed/tasker/AMg2U6zZG1s/NnC9s2FWzZEJ
THANX!!
As we all know, the camera app opens in Auto mode by default. There's no option to select it to use Pro Mode by default. We can put a shortcut on the homescreen to open Pro Mode, but there's not way to set that shortcut on the lockscreen or activate via double-press power. Sometimes if the camera is still in memory, it'll open from the lockscreen still in Pro Mode, but not reliably. So I'm wondering what we can figure out to "hack" this a bit to make Pro Mode open automatically when the camera app opens.
1. Tasker is my first inclination. But we need the Pro Mode setting/toggle/switch/activity/whatever to be exposed for Tasker to use. It's not, as far as I can tell.
2. Actually what's weird is there are no activities within the camera app to start Pro Mode. But without that activity, how is the homescreen shortcut created?
3. Is there a macro that can be created to turn on Pro Mode when camera is launched?
4. How can we put that Pro Mode shortcut on the lockscreen?
5. Is there a way to build a very basic app that does what the Pro Mode homescreen shortcut does? Then we could set it as a lockscreen shortcut. Ideally this would not require root. Basically an app that triggers the shortcut that launches the camera in Pro Mode.
Any other ideas?
Tagging @zeroprobe since he is our most knowledgeable contributor for the S7 camera.
It would be nice if Samsung made a proper shortcut but this seems to work in a convoluted kind of way.
Okay, so we’ll need a few things to make this work.
Tasker - paid app
Tasker plugin Autoshortcut – paid app with a 7 day trial
I made a task that uses Autoshortcut to click a place on my home screen. This place is the physical location of the Pro Mode Camera shortcut I made from the camera app. The most reliable way to determine the on screen location was to turn on “Show Pointer Location” in Developer Options. With that option turned on I was able to find out the X/Y coordinates for the physical location of the Pro Mode Camera shortcut on my screen. I am aware that If I move my shortcut to another spot this whole thing will fall apart.
With the X/Y coordinates in hand I continued with the Autoinput task. Manual mode worked best for me:
--
Type: Point
Value: 1000,730 (the X/Y coordinates of the shortcut on my screen)
Nearby text: Pro (this is the name of the pro mode shortcut)
Action: Click
--
When I tested my task I found that it wasn’t reliable because the shortcut wasn’t pressed every time. To fix this I added a delay task to my task of 66 ms (I was going for 50 but got lazy).
I also thought that I needed to ensure I was at the right screen before doing all this. In my case the shortcut is placed on my “main” home screen.
My task now looks like this:
1) Go Home, page 0
2) Wait 66 ms (not sure if this step is actually needed)
3) AutoInput Action,
Type: Point
Value: 1000,730
Nearby text: Pro
Action: Click
Then I found a premade profile, "AutoInput Multi-Press", and task, "Key Press Timer", written by /u/Ratchet_Guy (a Mod on /r/tasker) that addressed the double, triple, quadruple, etc clicking of buttons. This profile and task is great and also needs the plugin AutoInput. I imported the profile and task and added my camera task with AutoInput Action at the end of the “Key Press Timer”.
https://www.reddit.com/r/tasker/comments/5hkelp/how_to_trigger_tasks_on_hardware_button/
So now when I double click the volume down button it launches my pro mode camera shortcut.
Then I thought of your requirement to add this to a shortcut on the lockscreen. I downloaded the Tasker App Factory app and generated an app from my pro camera task. I put this app on the lockscreen and it works 90 % of the time. Sometimes it gets confused and launches the regular camera.
saj222 said:
It would be nice if Samsung made a proper shortcut but this seems to work in a convoluted kind of way.
Okay, so we’ll need a few things to make this work.
Tasker - paid app
Tasker plugin Autoshortcut – paid app with a 7 day trial
I made a task that uses Autoshortcut to click a place on my home screen. This place is the physical location of the Pro Mode Camera shortcut I made from the camera app. The most reliable way to determine the on screen location was to turn on “Show Pointer Location” in Developer Options. With that option turned on I was able to find out the X/Y coordinates for the physical location of the Pro Mode Camera shortcut on my screen. I am aware that If I move my shortcut to another spot this whole thing will fall apart.
With the X/Y coordinates in hand I continued with the Autoinput task. Manual mode worked best for me:
--
Type: Point
Value: 1000,730 (the X/Y coordinates of the shortcut on my screen)
Nearby text: Pro (this is the name of the pro mode shortcut)
Action: Click
--
When I tested my task I found that it wasn’t reliable because the shortcut wasn’t pressed every time. To fix this I added a delay task to my task of 66 ms (I was going for 50 but got lazy).
I also thought that I needed to ensure I was at the right screen before doing all this. In my case the shortcut is placed on my “main” home screen.
My task now looks like this:
1) Go Home, page 0
2) Wait 66 ms (not sure if this step is actually needed)
3) AutoInput Action,
Type: Point
Value: 1000,730
Nearby text: Pro
Action: Click
Then I found a premade profile, "AutoInput Multi-Press", and task, "Key Press Timer", written by /u/Ratchet_Guy (a Mod on /r/tasker) that addressed the double, triple, quadruple, etc clicking of buttons. This profile and task is great and also needs the plugin AutoInput. I imported the profile and task and added my camera task with AutoInput Action at the end of the “Key Press Timer”.
https://www.reddit.com/r/tasker/comments/5hkelp
So now when I double click the volume down button it launches my pro mode camera shortcut.
Then I thought of your requirement to add this to a shortcut on the lockscreen. I downloaded the Tasker App Factory app and generated an app from my pro camera task. I put this app on the lockscreen and it works 90 % of the time. Sometimes it gets confused and launches the regular camera.
Click to expand...
Click to collapse
I will 250% try this on my phone. But out of curiosity, is it possible to do the same with other software? Perhaps Automate?
Even though the P2 can be considered large with a 5.5" display, the lower region of the screen is occupied by the on-screen navigation bar. While there's an option to turn off the navigation bar and use the fingerprint button exclusively, I still find this alternative lacking in many fronts:
1. I can't tell you how many times I return to the home daily; it gets tiring to always have to push down the fingerprint button.
2. You need to touch the fingerprint button for a second or so before the recent apps window is launched. If you've ever had the need to flip between apps quickly, you would know how irritating this delay is.
3. Because one button is used for three functions (back, home, recent apps), there's no way to quickly switch between apps (like alt+tab in windows).
4. I sometimes find myself lying on my side, holding the phone with one hand, and finding it almost impossible to reach all the way down to the navigation bar, let alone the fingerprint button.
Fortunately, I have a solution that I believe addresses all of the problems above and that is to navigate the phone through the use of gestures.
I've been using GMD GestureControl for about a week now and I think I've found an optimal combination of gestures that don't only work but are also intuitive to use. There's nothing you can lose by giving it a try.
It can take a bit of time to set it up the way I have mine set up. So, if you don't feel like spending some time doing it yourself, you can just "restore" my "titanium backup" backup. Download it from here. Just extract the zip file and copy the content into your "titanium backup" folder. Open "titanium backup" and restore.
If instead, you would like to set it up yourself, here's how I currently have mine set up:
1. After installing the app, the first thing to do is go to "Device Setup" by pressing the menu button on the top right corner of the screen. Change your values to the one you see in the first attached image below. Then go to "Settings", and change the values to those in the second attached image.
2. To create a gesture: press the plus button > Select a gesture > create path. You can see all the gestures I created in the third attached image. Recreate all of them.
3. You can decide which region of the screen a gesture is detected by choosing the appropriate zone in the "select starting zone" option.
4. You need to go to "advanced options" (attached image no. 4) at the bottom of the screen to decide whether or not the gesture can be triggered when the keyboard is active. I have most of the gestures disabled when the keyboard is active because I sometimes swipe to type and I don't want to accidental swipe to trigger something. For this reason, I have duplicated most of the gestures for the only the top half of the screen (above the keyboard) so that the gestures still continue to work when the keyboard is activated.
5. Make sure you enable "evaluate on release" on all gestures so that a gesture is only triggered after you lift your finger off the screen.
If you've gone through all the steps, it's now time to start trying things:
1. To open resent apps, just make a small ^ sign anywhere on the screen.
2. To go home, just make a small V sign anywhere on the screen.
3. To flip between apps, just make a small < or > sign anywhere on the screen, starting from the top.
4. To press back, swipe away from left or the right edge.
5. To open the launchpad, swipe up on the left or right edge.
Good looking out. I really like this option.
This guide is mainly for those who know what the "clocktransition" or "activeclock" bug is, where your AOD brightness drops significantly after a few seconds of AOD set to always on while you have the under-display FP reader on.
This workaround functions by turning AOD off and then on after the screen turns off, eliminating this bug from happening.
It's not perfect but gets the job done.
We use an app called "Tasker" from the Playstore (as well as "Tasker Settings")
Here's the guide:
Open Tasker Settings first just to make sure it's running
You can do this at any time, but make sure you remove Tasker from apps that can optimize battery usage (the app will constantly remind you about this anyway)
Open Tasker and go to the "Tasks" tab (dismiss any of the annoying reminders you get from Tasker)
* Add a new task (+ sign at the bottom) and give it a name. Any will do. I will name it "Aod off-on"
Then add an Action on the screen it takes you to (+ sign at the bottom)
In the "Select Action Category" pop up, search for "Wait" and select it. This "Wait" command is done so that there is a few seconds before the task can turn AOD off and on so you can fully appreciate the clocktransition animation. You can add any value you want here. I recommend between 3 to 7 seconds but it's up to you.
Save (back button)
Add a new action
In the "Select Action Category" pop up, search for "Custom Setting"
In the drop down menu under "Type", select "System" instead of "Global"
In "Name", type aod_mode
In "Value", type 0
Save (back button)
Add a new action
In the "Select Action Category" pop up, search for "Custom Setting"
In the drop down menu under "Type", select "System" instead of "Global"
In "Name", type aod_mode
In "Value", type 1
Save (back button)
You are done with your task, now go back and create a profile that will trigger it
Switch back to the "Profiles" tab and add a new profile (with +)
Select "Event" -> Search for "Display Off"-> Leave Normal Priority
Go back and it will request that you select a task, select the one you created
You should be done. Now, the task will activate everytime you turn the screen off.
Note: If this doesn't work for you, you'll probably have to edit the task and in both instances where you change the aod value to 1 and 0, you'll have to give it root permissions (there should be a checkbox when editing the task and the action to use root)
Enjoy, let me know if it works for you!