Is there a way to click (select) some files at download directory ?

Hi

I need to click (select) files (at download directory) that have a month is his names, in order to attach them to a mail message.

Any suggestion?

Thanks a lot.
 
You use read screen? You can try to click element ID instead of the text itself
The problem is that the screen is a RECENT FILES list. Do you guess that element ID works at this scenarium? Every time that I tried to use element ID MD shows the coordinates.

Thanks
 

Dev777

Active member
This is the idea.
Read screen. Iterate the result and click the id if the text contains month name
 

Attachments

  • Read_screen_test.macro
    2.6 KB · Views: 2
I will try this.

Thanks
Hi.

I use your example and is working well for the first files to be clicked but suddenly MD begins to click at the right symbol (see attachment) that makes an app like text editor to open. Is there a way to force a click only over the file name?
 

Attachments

  • Screenshot_20240315_162941_Files.jpg
    Screenshot_20240315_162941_Files.jpg
    478.4 KB · Views: 7

Dev777

Active member
I see the preview icons also contain the month name. You can add a break from loop before the preview icons
 

Attachments

  • Screenshot_20240316-001153_crDroid Home.png
    Screenshot_20240316-001153_crDroid Home.png
    201.3 KB · Views: 7

Dm114

Well-known member
Hi

I need to click (select) files (at download directory) that have a month is his names, in order to attach them to a mail message.

Any suggestion?

Thanks a lot.
To select these files why don't you generate a list in a string variable (via Shell script)?

Then you could extract (or remove) from this list names matching (or not) the month pattern using Regex. If you have the ability to name these files in a more convenient way (such as YYYYMM, year/month in digits) Regex pattern would become very easy to write...
 
Here macro running
To select these files why don't you generate a list in a string variable (via Shell script)?

Then you could extract (or remove) from this list names matching (or not) the month pattern using Regex. If you have the ability to name these files in a more convenient way (such as YYYYMM, year/month in digits) Regex pattern would become very easy to write...
Hi.

I did this. The files are named with the month name and I iterate troughan list containing the twelve months names and, for each month, clicked at a corresponding text at the screen.

Unfortunately DM behavior is say... Erratic. At some time It begins to click on another place.

Also it seems that the loop jumps some instance of list.

Conclusion.

I will try to scrapp the data directly from each screen.

Thanks for suggestion.

Rgds
 

Dm114

Well-known member
Here macro running

Hi.

I did this. The files are named with the month name and I iterate troughan list containing the twelve months names and, for each month, clicked at a corresponding text at the screen.

Unfortunately DM behavior is say... Erratic. At some time It begins to click on another place.

Also it seems that the loop jumps some instance of list.

Conclusion.

I will try to scrapp the data directly from each screen.

Thanks for suggestion.

Rgds
I don't really understand what happens when you get the list from a Shell script...
 

Dm114

Well-known member
I don't get the list from outside MD. I declared the list as a global variable and iterate through it.
Shell Script is an built-in action to allow execution of bash commands.

When you speak about iteration, I guess you are speaking about a global array. But in your case, I don't think you need that at all.

I think you should have a look to MD Wiki to get more familiar with MacroDroid concept and statements...
 
Shell Script is an built-in action to allow execution of bash commands.

When you speak about iteration, I guess you are speaking about a global array. But in your case, I don't think you need that at all.

I think you should have a look to MD Wiki to get more familiar with MacroDroid concept and statements...
Thanks for advises.

I've read MD wiki frequently but am facing with some difficulties because lack of examples.

Rgds
 
Top