how to test the value returned by an array if it is empty?

76 views
Skip to first unread message

F

unread,
Feb 22, 2024, 12:17:19 PM2/22/24
to Automate for Android
Good evening. with this batch I have a problem testing the value returned by the "Wi-Fi network scan" block. If I choose to only scan WiFi in WEP for example, most of the time the array returned is empty. Well, that's what I thought because if I test the value by indicating "if null", the batch chooses "NO". Same thing if I say ="". And if I display the value between two characters (* for example) I have **.
What should we understand? how to test if the value returned by an array is empty or not? thank you again and have a good evening.
Screenshot_2024-02-21-18-01-30-839_com.llamalab.automate.jpg

Henrik "The Developer" Lindqvist

unread,
Feb 22, 2024, 1:34:29 PM2/22/24
to Automate for Android
In the Expression true block simply use nom, i.e. the array, since those evaluate to "false" when empty, see:

F

unread,
Feb 22, 2024, 2:43:05 PM2/22/24
to Automate for Android
yesssss !!! thanks. it works. 
Reply all
Reply to author
Forward
0 new messages