Pro lema para comparar valor

Vr6

New member
I'm Brazilian and I'm using a translator to communicate here,
I created a macro that when the text is copied, the clipboard will trigger the translation of the copied text, before starting the translation it will open a selection box to confirm the language from Spanish to English and from English to Spanish, after confirming the choice the translation will appear in a floating text, the idea is to help the translation of the macros by copying the comments and this macro that I configured will translate the comments, I hope it helped
Voy a compartir este inglés a español y español a la traducción en inglés macro en la tienda de plantillas de macrodroid para ayudar a más personas con traducciones,

I'm going to share this English to Spanish and Spanish to English translation macro in the macrodroid template store to help more people with translations
 

Dm114

Well-known member
Ya modifique el disparador, trate de escribir el monto en amount pero no me da el signo $, es bien complejo el sistema........tratando de establecer las variables
Please don't modify any statement nor value inside the macro. The only thing you have to do is to manually set the minimum amount you want to reach to validate an order in the variable called Minimum (at the very bottom of the screen, in the dark turquoise area). Just enter this amount, i.e. type 5 if you want to set the minimum order value to $5.

Unfortunately I just noticed that I made a mistake with this variable. It had to be of decimal type instead of integer. So, before manually entering the minimal amount (5 in my example) you'll have to transform it from Integer to decimal type:
- First of all, delete the current Minimum variable
- Create a decimal variable with exactly the same name, ie,, Minimum as decimal (with upper case for the first letter),
You can load again the attached macro: I corrected the type error for Minimum and Amount variables. So you just have to check comment lines inside macro. Don't modify anything else for the moment.

As an example, I've set the minimum value to 5.0 (for $.5.000). Try the macro this way, then you'll change the value.
 

Attachments

  • MDforum_fase.macro
    10.8 KB · Views: 3

fase

Member
Hola maestro, pregunta , si quiero subir el mínimo a $ 15.000 debería de cambiar solo el mínimo 5.0 que usted puso, hasta ahora el 70% de las cifras las lee ( aún no escribo el aceptar , estoy probando solamente), el problema es que lee cifras de hasta desde $ 1.000 HASTA $ 5.000 las de $ 10.000 NO LAS LEE , debería modificar algo más? Y la variable monto está en 30.000 se modifico sola , atento a tus comentarios
 

Dm114

Well-known member
Hola maestro, pregunta , si quiero subir el mínimo a $ 15.000 debería de cambiar solo el mínimo 5.0 que usted puso, hasta ahora el 70% de las cifras las lee ( aún no escribo el aceptar , estoy probando solamente), el problema es que lee cifras de hasta desde $ 1.000 HASTA $ 5.000 las de $ 10.000 NO LAS LEE , debería modificar algo más? Y la variable monto está en 30.000 se modifico sola , atento a tus comentarios
I'm really sorry but I completely forgot to take into account the Minimum value (currently set to 5.0)
Please add the following condition to the following IF clause...
IMG-20240506-WA0034.jpg
IMG-20240506-WA0035.jpg

You're right, to modify the minimum amount, just enter 15 (or any other value) to the Minimum decimal variable.

According to the $ 10.000 value, it must read it, unless the IF Regex condition is not exactly \$\s*\d+\.\d+

If the variable Amount is set to 30.0 (not 30.000) it means that a line with "$ 30.000" has been read and it was the highest amount.
 

fase

Member
Hola maestro, hice lo que escribió y ahora no hace nada, ja ja ja , estuve mirando las variables, y hay varias que no cambian, es más, sin tener mucho conocimiento los signos <> están ben ?, la variable "s" siempre está en 0 quizás haya un problema con esos signos? Atento a sus comentarios
 

Dm114

Well-known member
Hola maestro, hice lo que escribió y ahora no hace nada, ja ja ja , estuve mirando las variables, y hay varias que no cambian, es más, sin tener mucho conocimiento los signos <> están ben ?, la variable "s" siempre está en 0 quizás haya un problema con esos signos? Atento a sus comentarios
I'm afraid something has changed in one of the Regex expressions (the first "IF" or the Text manipulation).

After running the macro check the content of the Dictionary variable called Screen (to do so disable the last line "Clear variables... Line, s, Screen" prior running).

Sorry but the variable "s" cannot contain the value 0 as it is cleared at the end of the macro. So it must be empty!
 
Last edited:

Dm114

Well-known member
When you have disabled the last line and run the macro with real data, please send a screenshot of the variables part at the bottom of the screen.
 

fase

Member
Hola maestro, no me funcionaba la macro, y se me ocurrió clonarla y no se porque razón ahora funciona casi al 100%, he estado probandola estos días y hay días en que funciona bien y otros días no, la ocupo en momentos específicos, pero desde mañana la ocuparé todo el día y veré cuando funciona y tratare de ver que es lo que hago diferente y no funciona te aviso y gracias eres un MAESTRO !!!!!!!!
 

Dm114

Well-known member
Hola maestro, no me funcionaba la macro, y se me ocurrió clonarla y no se porque razón ahora funciona casi al 100%, he estado probandola estos días y hay días en que funciona bien y otros días no, la ocupo en momentos específicos, pero desde mañana la ocuparé todo el día y veré cuando funciona y tratare de ver que es lo que hago diferente y no funciona te aviso y gracias eres un MAESTRO !!!!!!!!
Thanks for your congratulations!

You say it works at nearly 100%... What doesn't work to reach 100%?
 

fase

Member
Hola, voy a tratar de explicar,
1.- Cada vez que acepta un servicio, queda guardado en otra pestaña llamada " aceptadas"que no está en primer plano, y la macro la sigue leyendo por lo menos 3 a 5 veces, lo mismo sucede con la que hice yo,
2.- Muchas veces hay un servicio que me sirve, pero no hace click, pero si deslizó la pantalla hacia abajo para ver el menú ( WiFi, Bluetooth, brillo etc ) y subo inmediatamente, hace click o si cambio de pantalla dentro de la aplicacion y vuelvo, también funciona
3.- Lo raro es que si veo mis ganancias, inmediatamente hace click en el monto, nunca falla
4.- Yo uso un autoclick, para no estar todo el día haciendo click en el día que necesito revisar( esa es la idea de la macro, tener tiempo con mi familia ), si toma un servicio se queda estancado ahí, igual tengo que estar revisando cada cierto tiempo .
AHORA LO IMPORTANTE: si toma un servicio de $ 13.765, será posible que no lea más ese valor ? Porque ya esta listo. Se que es complicado pero podrá la macro leer toda la semana y no solo el día que esta en primer plano ? Y lo último siempre lee lo que llevo generado en dinero , pero NO siempre el valor de los servicios
 

Attachments

  • Screenshot_20240515_094655_Cabify Driver.jpg
    Screenshot_20240515_094655_Cabify Driver.jpg
    456.5 KB · Views: 2

Dm114

Well-known member
I see your problem is much more complicated as it was at the beginning when you needed to extract an amount in $ from a screen...

As I don't know your app (even if I roughly understand how it works) I won't be able to help you in all the details you are referring to.

As an example, MD won't be able to detect which tab you are on. It's up to you to find discriminating items to identify where you are in the app.

As for the amounts, I based the Regex rules on the examples you gave me. It's very important to know the different ways they are spelled to find an efficient rule ($ sign before or after with/without a separator with the amount, with/without a thousand separator when applicable, character used as decimal point, etc.)
 

fase

Member
Se que es complicado, pero usted pregunto je je je , pero esta bien hecho, encontraré la forma de no lea 2 veces la misma cifra, si ya tengo un servicio ejemplo de $ 7.560, que la almacene y pase a ser una restriccion, para no volver a leer la misma cifra una y otra vez. Pero eres un crack, genio, hiciste algo sin conocer el programa, te felicito 👏, seguiré probando y mejorando
 

Dm114

Well-known member
Se que es complicado, pero usted pregunto je je je , pero esta bien hecho, encontraré la forma de no lea 2 veces la misma cifra, si ya tengo un servicio ejemplo de $ 7.560, que la almacene y pase a ser una restriccion, para no volver a leer la misma cifra una y otra vez. Pero eres un crack, genio, hiciste algo sin conocer el programa, te felicito 👏, seguiré probando y mejorando
I'm not a genius at all. Just 50 years of computer science! 🤣🤣

If you stil need some help, tell me (in private, not to flood this forum) or ask other MD users if you want: I won't be jealous! 🤣
 
Top