openkore icon indicating copy to clipboard operation
openkore copied to clipboard

Rodex Get Mail ID

Open iamtonysoft opened this issue 9 years ago • 3 comments

Hi. is there a function for rodex to get mail id's and pass it into a loop

i want to read the mail and open it by doing a loop but no available function yet to get mail id at wiki documentation or will there be a seperate function by just reading the mail by index number instead of mail id

only function i found. rodex read <mail id>

iamtonysoft avatar Oct 11 '17 06:10 iamtonysoft

Try rodex list Do you want to do it by a macros?

Yakov-Chernogor avatar Oct 11 '17 06:10 Yakov-Chernogor

this sub are working:

you can use in macro, eventmacro and plugin:

sub checkRodexID {
	my $id;
	foreach my $mail_id (keys %{$rodexList->{mails}}) { my $mail = $rodexList->{mails}{$mail_id}; next if ($mail->{page} != 0 || $mail->{page_index} != 0); $id = $mail_id; last; }
	if (defined $id) {
		message "Your wanted mail id is $id.\n";
		return $id;
	} else {
		message "You have no mails.\n";
		return 0;
	}
}

credits to: @Henrybk and @ ReedemBR

alisonrag avatar Oct 11 '17 13:10 alisonrag

@alisonrag

Thank you that is what I am looking for.

iamtonysoft avatar Oct 12 '17 02:10 iamtonysoft