navbar actions Smart NavBar Tasker tasker project whatsapp

Tasker Smart NavBar #2 WhatsApp NavBar actions

WhatsApp is the perfect messaging app for many. Virtually everybody I do know makes use of it to keep up a correspondence with buddies and associates. Typically it’s simpler to open the online shopper and benefit from the actual keyboard when having more in-depth conversations. I have a set of NavBar actions to make the process simpler and take care of your privacy higher!

I’m going to borrow closely from the NavBar half 1 as I already handled setting an lively PC profile and site context. You must really take a look at the “Set active PC” and “Device Location” profiles which I’m going to use in this venture.

WhatsApp NavBar Actions

To assist your conversations, I made 3 actions which might be out there for WhatsApp and WhatsApp for Enterprise:

  • open net shopper on lively PC
  • open net shopper in incognito mode (privacy mode)
  • scan QR code

In the same means as before, I’m going to use EventGhost to send the lively PC info again to Tasker. When you don’t have a Home windows PC, or you are not capable of install the EventGhost, you’ll be able to still use WiFi info to set the popular PC to open the WhatsApp net shopper.

This can be a stand alone profile, and it will use both approaches. It’ll decide an lively PC at house (EventGhost) and set my Laptop computer once I’m outdoors, or my work PC once I’m at work.

WhatsApp Profile

TASKER PROFILE: NB WhatsApp

Profile: NB WhatsApp
Software: WhatsApp or WA Business
Enter: NB Whatsapp (
A1: Variable Set [ Name:%NBactiveApp To:WhatsApp ] If [ %arcomm !Set ] A2: Navigation Bar [ Left:back[1.0] Middle:residence[1.0] Proper:activity(NB WhatsApp %ACTIVEPC=:=NB WhatsApp DT %ACTIVEPC=:=NB WhatsApp Login)[1.0] ]If [ %arcomm !Set & %DEVICELOCATION ~ home ] A3: Navigation Bar [ Left:back[1.0] Middle:house[1.0] Proper:process(NB WhatsApp WIFI=:=NB WhatsApp DT Laptop computer=:=NB WhatsApp Login)[1.0] ]If [ %arcomm !Set & %DEVICELOCATION !~ home ] A4: Navigation Bar [ Left:back[1.0] Middle:residence[1.0] Right:process(NB WhatsApp Login)[1.0] ]If [ %arcomm ~ QR & %NBactiveApp ~ WhatsApp ]

Exit: NB W Reset (54)
A1: Variable Set [ Name:%NBactiveApp To:none ] A2: Navigation Bar [ Left:back[1.0] Middle:residence[1.0] Right: ]

Regardless of which app are you utilizing on your cellular (WhatsApp, WhatsApp for Business), you need to use the app context to set a new NavBar. This NavBar will display the right icon based mostly on the %ACTIVEPC (if you wish to know why this variable is about in CAPS, read this publish).

The simplest method to set WhatsApp NavBar Actions is to create separate duties which have totally different icons and incorporate the %ACTIVEPC within the identify. This manner I can merely use the value from that variable to pick the right process and assign the suitable icon.

To deal with dynamic modifications between the computer systems, I had to update the “Set active PC” profile and add the WhatsApp entry. Each time an AutoRemote message is acquired, Tasker will verify if WhatsApp is open and replace the NavBar accordingly.

TASKER PROFILE: Set Lively PC

Profile: Set Lively PC
Event: AutoRemote [ Configuration:activePC (regex) ] Enter: Set ACTIVEPC
A1: Variable Set [ Name:%ACTIVEPC To:%arcomm ] …

A5: If [ %NBactiveApp ~ WhatsApp & %DEVICELOCATION ~ home ] A6: Navigation Bar [ Left:back[1.0] Middle:house[1.0] Right:activity(NB WhatsApp %ACTIVEPC=:=NB WhatsApp DT %ACTIVEPC=:=NB WhatsApp Login)[1.0] ]A7: Finish If

Faucet #1 – WhatsApp net

The fist motion will probably be to open the WhatsApp net shopper in a browser. This follows the directions from the Fb NavBar actions. There are not any modifications aside from the Be a part of Push message sending “net.whatsapp.com“.

TASKER TASK: WhatsApp Laptop computer

NB WhatsApp Laptop
A1: Be a part of Send Push [ Configuration:Url: https://web.whatsapp.com/
System Identify: %ACTIVEPC Timeout (Seconds):60 ] A2: Flash [ Text:Sent to %ACTIVEPC Long:Off ]

TASKER TASK: WhatsApp Desktop

NB WhatsApp Desktop
A1: Be a part of Ship Push [ Configuration:Url: https://web.whatsapp.com/
Gadget Identify: %ACTIVEPC Timeout (Seconds):60 ] A2: Flash [ Text:Sent to %ACTIVEPC Long:Off ]

The lively PC can be chosen based mostly on the current values of the %ACTIVEPC and %DEVICELOCATION. You will notice the suitable icons seem in the NavBar. The NavBar may even update dynamically as you modify your computer systems.

TASKER TASK: WhatsApp WIFI

NB WhatsApp WIFI (
A1: Be a part of Send Push [ Configuration:Gadget: Laptop computer
Url: https://web.whatsapp.com/ Timeout (Seconds):60 ] If [ %DEVICELOCATION ~ elsewhere ] A2: Be a part of Send Push [ Configuration:System: Work
Url: https://web.whatsapp.com/ Timeout (Seconds):60 ] If [ %DEVICELOCATION ~ work ] A3: Flash [ Text:Done Long:Off ]

Tap #2 – incognito mode

This is the primary change, as an alternative of opening the regular Chrome window, I can use EventGhost to drive the “web.whatsapp.com” to open in an incognito mode. WhatsApp net in the regular Chrome window retains you log in, so it’s attainable for anyone to simply open the online shopper and continue the conversations in your behalf.

TASKER TASK: WhatsApp DT Laptop

NB WhatsApp DT Laptop computer
Abort Present Activity
A1: Be a part of Ship Push [ Configuration:System: Work
Url: https://web.whatsapp.com/ Timeout (Seconds):60 ] If [ %DEVICELOCATION ~ work ] A2: AutoRemote Message [ Configuration:Recipient: %ACTIVEPC
Message: whatsapp Timeout (Seconds):200 ] If [ %DEVICELOCATION !~ work ]

TASKER TASK: WhatsApp DT Desktop

NB WhatsApp DT Desktop
Abort Present Process
A1: AutoRemote Message [ Configuration:Recipient: %ACTIVEPC
Message: whatsapp Timeout (Seconds):10 ]

The incognito mode logs you out each time you close it. The downside is that it’s a must to scan QR code every time to continue (one thing I will care for utilizing three faucets). Unfortunately, you’ll be able to solely open the incognito mode using EventGhost (and even then it took me a while to determine how).

Use the run command motion and sort:

start chrome –incognito “web.whatsapp.com”

This can open the incognito mode with a QR code waiting to be scanned. EventGost will reply to a simple process of sending an AutoRemote message whatsapp. Straightforward sufficient!

I also had so as to add restrictions. I would like the incognito to open on my Laptop computer once I’m not residence, or send a traditional (single faucet) net shopper at work, the place I can’t use EventGhost. I used %DEVICELOCATION variables to create behaviour.

Faucet #three – Scan QR code

We’ve the online shopper open, it’s time to automate the login. I’m not an enormous fan of AutoInput, however now, the AutoInput actions come with the power to allow and disable the accessibility settings. Operating the setting enabled creates somewhat lag, so having it on, simply to perform a activity is sensible.

Whereas tapping 3 times may be far from optimal, so I got here up with yet one more approach of getting the QR authentication automated.

Three single faucets to QR

Assuming that you are in the primary dialog record, to get to the QR interface it takes three AutoInput actions:

  1. AutoInput Action open “WhatsApp menu” (Allow Accessibility)
  2. AutoInput Motion click on on “WhatsApp web”
  3. AutoInput Motion click on on “scan QR” (Disable Accessibility)

TASKER TASK: WhatsApp Login

NB WhatsApp Login
A1: AutoInput Action [ Configuration:Sort: Text
Value: More options
Motion : Click on
Manage Accessibility Service: Enable Before Action Timeout (Seconds):23 ] A2: Wait [ MS:457 Seconds:0 Minutes:0 Hours:0 Days:0 ] A3: AutoInput Motion [ Configuration:Sort: Text
Worth: WhatsApp Net
Action : Click on Timeout (Seconds):23 ] A4: Wait [ MS:367 Seconds:0 Minutes:0 Hours:0 Days:0 ] A5: AutoInput Action [ Configuration:Sort: Textual content
Value: Scan QR code
Motion : Click on
Handle Accessibility Service: Disable After Motion Timeout (Seconds):23 ] A6: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ] A7: Go House [ Page:0 ]

I have added small delays to assure clean operation. Probably the most importantly keep in mind to enable the Accessibility within the Superior choices. Since three of the actions are run in fast succession, don’t toggle it for every action.

QR prompt

Because the incognito mode already uses EvenGhost, I can prompt Tasker to display single faucet QR NavBar as an alternative. I used EventGhost to attend until the Chrome window is opened and then send the request by way of AutoRemote to show the new NavBar.

QR NavBar has just one objective and lives for 20 sec before exiting. I found this affordable for both QR NavBar and the three faucet QR motion. Once Tasker opens the Residence display, the context will restore the original NavBar mechanically.

whatsapp=:=QR

To make this work, I want a simple profile that responds to AutoRemote occasion “whatsapp” and “QR” command. I don’t even should create one other Process, so long as I embrace %arcomm IF circumstances. The QR NavBar will run only when the duty is triggered by way of AutoRemote (%arcomm is about).

Smart NavBar integration

This can be a stand-alone model of the Smart NavBar actions. As soon as I created the standalone variations for every NavBar Process I will show you the way to combine it together. The hyperlink to that write up will probably be up soon!

Conclusion

WhatsApp NavBar Actions are nice enhancements to your online conversations. It exhibits how straightforward is to automate and introduce context delicate NavBar that solely exhibits the knowledge you need! When you use different messengers, this could possibly be tailored for that function. I’m tremendous pleased with the EventGhost variant, particularly that I exploit multiple WhatsApp shopper on the time (personal, work). What do you assume? You possibly can obtain the undertaking from this link.

Should you like my work you possibly can all the time purchase me a coffee or help me by way of Patreon.

Appreciated it? Take a second to help Pocketables on Patreon!