Random/Useful Card & Script Sharing

Here you are welcome to share your Push2Run cards

PLEASE NOTE:
If you are downloading a Push2Run card from here or anywhere else, please inspect it carefully before running it or any software associated with it. If you don't do this you may end up with seriously unwanted results.

When sharing a card, please leave any special instructions that are required for its use. For example, if additional software is needed to enable the card, you should leave a link to the program's official webpage.
Post Reply
silverchevy220
Posts: 4
Joined: Wed Aug 25, 2021 3:13 pm

Random/Useful Card & Script Sharing

Post by silverchevy220 »

Recently started using tasker and wanted to start automating tasks between my phone and pc which lead me to Push2Run. Just started using it this past week and have been loving it. I've been looking around online for some useful cards to help me get an idea of what I would like to do, but haven't found as much as I thought I would.

So I figured I would start posting some as I create them and share here. I only have a couple small ones currently, but looking to do a lot more and though maybe someone could find these useful.

Note: I have push2run set to run with admin privileges which is needed for the ps script to run. I tried creating a scheduled task to give push2run highest elevation, but that didn't seem to work for me as push2run was getting an error. Going to circle back to that later.

-------

Restart Plex
Useful when I'm not around my computer or if I'm being lazy. Plex can be run as a service, but it's nice to be able to restart with voice commands.

Card
Restart Plex.p2r
(626 Bytes) Downloaded 301 times
The Restart Plex.p2r card calls this powershell script "C:\GoogleHome\scripts\Plex\Restart.ps1".

Code: Select all

TASKKILL /f /im "Plex Media Server.exe"
TASKKILL /f /im "PlexScriptHost.exe"

Start-Sleep -s 5

& 'C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe'
-------

Run CCleaner
Runs CCleaner silently in Auto mode which uses the saved cleaning settings.

Card
Runs CCleaner Silently.p2r
(550 Bytes) Downloaded 295 times
-------

New Text Notification
Now this one is a little tricky as it relies on tasker to use the $SMSRN variable along with the keyboard input to enter a command into google assistant. My reason for creating this: I've been working from home since COVID-19 and have a routine in tasker to keep my phone silent when connected to my home wifi because I get bombarded by spam calls and just find the phone annoying in general. The main goal is to get it to notify me when I get texts from important contacts.

Tasker will send a command to google assistant with the contact name that sent me a text message and that will kick off the below card. The card will then call a small vbs script that will create a pop-up on my computer telling me I received a text from ContactName and close after 15 seconds. It's very basic right now, but will eventually make it more robust for other operations.

Card
New Text Message.p2r
(557 Bytes) Downloaded 308 times
The "New Text Message" card calls the vbs script "C:\GoogleHome\popups\newText.vbs"

Code: Select all

Dim objShell, intButton
set objShell = CreateObject("Wscript.Shell")
intButton = objShell.Popup("Text from " + UCase(WScript.Arguments.Item(0)), 15, "New Message", 0+64)
As I create more I'll probably create an export that I'll update and post periodically.
RobLatour
Site Admin
Posts: 1003
Joined: Mon Feb 19, 2018 11:43 am

Re: Random/Useful Card & Script Sharing

Post by RobLatour »

Thanks for sharing!
silverchevy220
Posts: 4
Joined: Wed Aug 25, 2021 3:13 pm

Re: Random/Useful Card & Script Sharing

Post by silverchevy220 »

Open Drive
Opens to the root of the disk specified by saying, "Open drive $" ($ of course being the drive letter). I have six disks in my machine so I sometimes find it helpful. Can be copied into multiple cards and modified to open specific directories.

Card
Open Drive.p2r
(553 Bytes) Downloaded 327 times
Post Reply