▲ 1 r/tasker

"Received Text" event within a Tasker profile ignores texts send from me to myself. How can I get these texts recognized in a profile?

I'm using Tasker version 6.7.6-beta on my Nothing 2 devices running Android 13.

For reasons that I do not want to discuss nor argue about here, I sometimes send SMS messages to myself (i.e., from my own device to my own device's phone number).

Those text messages get properly delivered, and I indeed see them in my SMS client.

However, when I set up a Tasker profile which listens for a "Received Text" event, that event never gets triggered by these SMS messages from myself to myself, even though that same event does properly get triggered by all SMS messages sent to me from other sources.

In the "Received Text" event setup, I set "Type" equal to "Any", and I tried this both with "Sender" not set, and also when specifying "Any Contact" for "Sender", which results in the text "C:ANY" appearing in the "Sender" field. Neither of these cases change the behavior of texts sent from me to myself not triggering that "Received Text" event, even though in all those cases, the message indeed gets properly delivered and shown in my SMS client.

Is there any way to configure Tasker so that these SMS messages from me to myself will indeed trigger "Received Text" events?

Or am I totally out of luck?

PS: This is not an "XY" issue, and there is only one, single thing I wish to discuss here: namely, whether or not there's a way to get SMS messages from me to myself to trigger a "Received Text" event in a Tasker profile.

Thank you very much.

reddit.com
u/unselective-amnesia — 14 days ago
▲ 1 r/tasker

Syntax question about Tasker regex group capture

I'm running Tasker 6.7.6-beta under Android 13, and I have the following code in a Tasker task:

Variable Set
  Name
    %variable
  To
    run abc
If
  %variable ~R ^run\s+(?<command>.+)
    Flash command=%command
Else
    Flash no match
End If

When I run this task, the following flashes:

command=%command

Of course I know that the only way this message should be flashed would be when the regular expression does indeed match the "run abc" string.

However, this also indicates that the %command variable was not set to any value after this regex match.

What is incorrect about my regex match syntax which prevents the contents of the match group from getting stored into the %command variable?

reddit.com
u/unselective-amnesia — 16 days ago

Library function which is the inverse of 'os.path.expanduser' ?

I'm running python 3.13.5.

Is there some sort of standard python library function which behaves as the inverse of 'os.path.expanduser'?

For example, if the current user's HOME directory is "/home/theuser", then we have this:

os.path.expanduser('~/a/b/c')
=> returns "/home/theuser/a/b/c"

I'm wondering whether there also might be any existing python library function which is the inverse of this and that works as follows:

some_sort_of_function("/home/theuser/a/b/c")
=> returns "~/a/b/c"

AND PLEASE NOTE: There often are people who lazily and disrespectfully refuse to read entire reddit posts before writing their reponses, and therefore, I'm making a point now to ask that before you start to write any reply here, please carefully and non-lazily read this *entire* post -- including the following, which is something that I want all potential responders to understand:

I know how to easily write my own function that works in this manner. However, I am clearly and SPECIFICALLY (!!!) asking whether or not there already is an existing python function which works this way, and if so, I'd like to know what this function might be ... and I am NOT (!!!) asking how to write my own function which does this.

Thank you very much in advance.

reddit.com
u/unselective-amnesia — 1 month ago
▲ 1 r/tasker

Sending remote messages to 'Tasker' without the use of 'Join'?

I'm running Tasker version 6.7.6-beta on my rooted Android 13 device.

Now that the 'Join' utility is no longer supported and doesn't seem to work for me, I'm looking for a way to send remote messages to Tasker on my Android device.

By "send remote messages", I mean that I want to send text from my linux desktop computer to Tasker on my Android device, without any USB connection, and I want to create Tasker event profiles that are triggered when these remotely sent messages arrive on the Android device.

And I don't want to use any kind of web-based software to send the messages, nor any other kind of GUI. I want to be able to send the messages via shell scripts that run on the linux device.

And I don't want to have to use any kind of SMS gateway on the linux machine.

Is there any way to accomplish this?

PS: One more thing: I don't want to have to rely on the Android device and the linux machine being within WiFi range of each other. I want this to work however far away from each other these two devices might be -- even in different hemispheres -- as long as both have working internet connections.

reddit.com
u/unselective-amnesia — 1 month ago

Full documentation for the 'PS1' syntax used in 'adb shell'?

I'm running Android 13.

When I run adb shell in a USB connection from my desktop machine to my Android device, the following is the value of the PS1 variable (which is used for generating the shell prompt) ...

${|
        local e=$?

        (( e )) && REPLY+="$e|"

        return $e
}$HOSTNAME:${PWD:-?} $ 

I can see how this particular setting of PS1 pretty much relates to the generated shell prompt in adb shell, but I'd like to know all of the details of PS1 syntax for adb shell.

Can anyone point me to the full documentation of PS1 as it's utilized in adb shell?

UPDATE:

For example, one thing that I'd like to understand is how the vertical bars work within that PS1 setting. The second vertical bar *seems* (???) like it might indicate a termination of the text following the first vertical bar, even though this second vertical bar appears to be nested within a double-quoted string. But that's just a wild guess which might be totally incorrect. And whatever these vertical bars might *actually* mean, I'd still also like the full docs, so that I can understand *all* of the PS1 syntax that's used in adb shell.

FURTHER UPDATE:

If I re-set PS1 to be the same value as above, except with the vertical bars removed, I then always get the following error message when running every command within adb shell ...

: can't create temporary file /data/local/shXXXXXX.tmp
: Permission denied

... where "XXXXXX" are 6 randomly generated base-36 characters, and where the displayed shell prompt is then only a single dollar sign. Therefore, these vertical bars relate to file/directory access permissions, *maybe* (???) involving some kind of evaluation being performed as root.

reddit.com
u/unselective-amnesia — 1 month ago
▲ 0 r/tasker

Where is the "searchFilterText" value stored in Tasker?

I'm running Tasker 6.7.6-beta under Android 13.

I recently changed some directories on my Android device, and now, one of Tasker's preferences called searchFilterText is pointing to a non-longer-existing directory, but I don't know the location of the setting of that preference, so that I can change it.

I know about this preference value because I performed a Data Backup of all of my Tasker settings into a file called backups.xml. When I inspect this file, I see the following data:

<Setting sr="prefs128">
        <n>searchFilterText</n>
        <t>s</t>
        <v>tmp/bin</v>

Because of my directory changes, I need to change "tmp/bin" to a new value, but when I search through all of my Tasker configuration via the magnifying-glass icon at the upper right, neither "searchFilterText" nor "tmp/bin" are found. And when I inspect all of the values under Menu=>Preferences, I don't see "searchFilterText" or "tmp/bin", either. And I am unable to locate what "prefs128" corresponds to in the Tasker Preferences.

How can I find out where "searchFilterText" has been defined within my Tasker configuration, so that I can change it's value?

reddit.com
u/unselective-amnesia — 1 month ago
▲ 4 r/textra

Textra only managing one SIM on a dual-SIM device?

I'm running the latest version of Textra (version 4.8.5) both on an Android 11 device and on an Android 13 device.

Both devices can support dual SIM's, but I have never used more than one SIM on either device.

However, now I'm thinking of adding a second SIM to each device, and I'm wondering if it would be possible to tell Textra to only manage messaging on one of the two SIM's on each device, and to totally ignore the second SIM.

Is this possible with Textra?

And I still want the second, non-Textra SIM to be active and fully functional on each device, and the only software that I want to use to manage messages via the non-Textra SIM would be Tasker.

Thank you in advance for thoughts, ideas, and suggestions.

reddit.com
u/unselective-amnesia — 1 month ago
▲ 6 r/tasker

Passing arguments from the adb shell command line to a Tasker task that gets invoked?

UPDATE: I accidentally overlooked the answer to this in an earlier search of mine, but now I found the answer. See ***SOLUTION*** below for how I solved this.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I know how to successfully invoke Tasker tasks via the command line from within an adb shell session, as follows ...

am broadcast -a net.dinglisch.android.tasker.ACTION_TASK --es task_name 'name-of-task'

But I don't know how to pass ad hoc arguments to these Tasker tasks. I want the Tasker task to be aware of the arguments that are passed, and then respond to the values of these arguments.

I'm guessing that I might be able to do this by somehow causing Tasker variables to be set before the task is invoked, and then having the task see and respond to these variables ... but I don't know how to set Tasker variable values via am broadcast, nor via any other external-to-Tasker method.

Is there any way to pass arguments to Tasker tasks that are called externally in this way?

***SOLUTION***

am broadcast -a net.dinglisch.android.tasker.ACTION_TASK --es task_name 'name-of-task' --esal varNames '%variable1,%variable2' --esal 'value1,value2'

This invokes the name-of-task task and correctly initializes %variable1=value1 and %variable2=value2 in the task.

reddit.com
u/unselective-amnesia — 1 month ago
▲ 3 r/termux+1 crossposts

Getting termux to *permanently* set and remember "termux-setup-storage"?

Is there any way under rooted Android 11 and Android 13 to get the latest version of Termux [ 0.119.0-beta.3 (1022) ] to *permanently* set up and remember the running of "termux-setup-storage", in the following manner? ...

Step 1: install Termux

Step 2: launch the Termux app

Step 3: run "termux-setup-storage" (and whatever else might be necessary)

Step 4: exit from the Termux app

Step 5: reboot the Android device

Step 6: from that point forward, run anything in /data/data/com.termux/files/usr/bin via the command line in an adb session without ever needing to run "termux-setup-storage" again in order to have full access to /sdcard, and without ever needing to launch the Termux app again in order to accomplish this.

reddit.com
u/unselective-amnesia — 1 month ago

Causing a ".profile" file to be automatically sourced on Android whenever I create an interative session via "adb shell"?

NOTE: This issue has now been solved! For details, see my second follow-up, below.

When I use "adb shell" from my desktop computer to establish an interactive session on my Android device, immediately after the connection is established, I always first manually do the following to initialize some variables and aliases and shell functions that I want to be defined during the Android session:

source /sdcard/.profile

I would like to find a way to make this automatically happen via some sort of arguments passed to the "adb shell" command, so that I no longer have to manually run that "source" command every time that I invoke "adb shell".

If I simply do the following ...

adb shell source /sdcard/.profile

... that .profile file indeed gets sourced, but then the adb session immediately ends.

Is there any way to get this .profile to be automatically sourced at the beginning of the "adb shell" session such that its results will be available during the remainder of that session?

reddit.com
u/unselective-amnesia — 1 month ago
▲ 0 r/ruby

Centralized location for shared Gemfile?

I'm using ruby 3.3.8 under linux.

There's more than one user on this machine who does ruby development. When I, running as the root user, want to add new gem references to Gemfile on my system, I want to add these gem references into one, single, shared, centralized Gemfile that all users will automatically see when running and developing ruby code.

Where should this shared, centralized Gemfile be located?

When any user runs "gem environment", the following item is always listed among that command's output for every user who runs that command:

- INSTALLATION DIRECTORY: /var/lib/gems/3.3.0

Does this mean that I can put a Gemfile into the /var/lib/gems/3.3.0 directory, and that then, this Gemfile will be recognized and used by all users who run and develop ruby code?

Or is there perhaps a different location in which to locate such a shared, centralized Gemfile that will always be the one that's used by each ruby user?

Thank you very much.

reddit.com
u/unselective-amnesia — 2 months ago
▲ 7 r/ruby

Getting DateTime parts as an array?

I know in ruby that DateTime.new(2001, 2, 3, 4, 5, 6) will return the following object:

#<DateTime: 2001-02-03T04:05:06+00:00 ...>

But if the current date and time are 2001-02-03T04:05:06 and I do the following ...

now = DateTime.now

... is there a single function on the "now" variable which will return this array? ...

[2001, 2, 3, 4, 5, 6]

I know that I can do this:

[now.year, now.month, now.day, now.hour, now.minute, now.second ]

... but I'm wondering: might there be a single function as simple as ...

now.the_function

... which would return that same array?

And yes, of course I know that I could easily write such a function, but I'd like to know whether or not something like this already exists in ruby.

reddit.com
u/unselective-amnesia — 2 months ago
▲ 7 r/ruby

Ruby function corresponding to python's fileinput.input() ?

Is there any already written ruby function which corresponds to the fileinput.input() function in python? ... or at least something with similar functionality?

I will write something like this in ruby if necessary, but I don't want to "re-invent the wheel" if such a thing already exists.

reddit.com
u/unselective-amnesia — 2 months ago

Is there any way to get Selenium to work with the SeaMonkey browser?

The SeaMonkey browser is one of the browsers which is supported by the Mozilla organization, just like Firefox.

I'd like to use Selenium in linux for automating accesses to the SeaMonkey browser, but I haven't found any documentation which describes how this might be done. I know that the "firefox"-specific code for Selenium only seems to be able to access the browser at the "/usr/bin/firefox" path.

Does anyone know of any way that I can automate SeaMonkey with Selenium?

Many thanks in advance.

PS: The SeaMonkey browser is built upon the exact, same code base on which Firefox is built, so the logic for automating access to SeaMonkey should be the same as the logic for automating Firefox access.

reddit.com
u/unselective-amnesia — 3 months ago