I am using the PHX01RN PLUGIN
PHXO1RN.* matches any key pressed on my remote. I want to limit the wildcard input to match digits only.Regex would be something like \d*
Maybe a python script -but my Python scripting is very limited.
Many thanx
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Wild card for digits only
Re: Wild card for digits only
Give this a try:
Code: Select all
import re
# RegEx matching the event suffix.
regEx = re.match('\d', eg.event.suffix)
if regEx != None:
# match made, suffix is digit.
# exit script, continue subsequent actions in the macro.
eg.Exit()
else:
# no match made, Stop macro immediately.
eg.StopMacro()Re: Wild card for digits only
Great works like a charm -many thanx