Code Monkey home page Code Monkey logo

Comments (7)

odapg avatar odapg commented on September 7, 2024 2

I believe that this is due to Mail having a different menu layout in Ventura.
Try to change "menu item 18" with "menu item 21" in the final "Run script" action.

from alfred-mail-sorter.

ldebritto avatar ldebritto commented on September 7, 2024

I've changed the AppleScript of the second step on the workflow to a more straightforward move command. However, I'm still having trouble dealing with Gmail Accounts.

I guess I will keep an eye on how one could use both account and mailbox names in the menu approach, as it used to work even with Gmail accounts.

from alfred-mail-sorter.

Blog404DE avatar Blog404DE commented on September 7, 2024

I've changed the AppleScript of the second step on the workflow to a more straightforward move command. However, I'm still having trouble dealing with Gmail Accounts.

I guess I will keep an eye on how one could use both account and mailbox names in the menu approach, as it used to work even with Gmail accounts.

... and i even had trouble with every Account (one IMAP and one Exchange-Account). I've testet it under Ventura and Sonoma (current Version / Language set to: German) and it didn't move any Mail :-/

from alfred-mail-sorter.

odapg avatar odapg commented on September 7, 2024

@Blog404DE
I had the same problem. In "move command.applescript", I replaced the line
set mailbox of theMessage to theMailbox
with
move theMessage to theMailbox
(and put the line set theMailbox to mailbox mailboxName of account theAccount before of the repeat loop), and now it works fine.

from alfred-mail-sorter.

Blog404DE avatar Blog404DE commented on September 7, 2024

@odapg
hmm, i've changed the script to the following code:

on run argv
	tell application "Mail"
		try
			set mailboxName to item 1 of argv
			set theAccount to item 2 of argv
			if selection is {} then error
			set messageList to (selection as list)
			set theMailbox to mailbox mailboxName of account theAccount
			repeat with theMessage in messageList
				-- set theMessage to the first item of (selection as list)
				set theMailbox to mailbox mailboxName of account theAccount
				move theMessage to theMailbox
			end repeat
		end try
	end tell
end run

But it still didn't move any E-Mails and i have absolutely no idea how to debug a AppleScript inside of Alfred :-(

from alfred-mail-sorter.

odapg avatar odapg commented on September 7, 2024

@Blog404DE
Hmm. On my side it even works with my gmail account (on Sonoma 14.2.1).
Actually, my personal version is also modified at the level of the other applescript, in order to make it independent of JSON Helper.
So: I forked @ldebritto's project, and put my complete version on this fork. Perhaps can you give it a try? If it works, I could propose to @ldebritto to merge it (and this would probably mean that the problem comes from JSON Helper).

from alfred-mail-sorter.

Blog404DE avatar Blog404DE commented on September 7, 2024

thx :-) ... I've tried it with the same result. But i've found a option to debug my problem.

With activating the debugging mode in alfred, i've could created some log-Outputs. The first part of the script (creating a list auf mailboxes) is working without any problem (with your version) and i've testet the second script and it seems, the Problem started with the line:
set theMailbox to mailbox mailboxName of account theAccount
After this line, the script stopped and log "Debug-Point" didn't output anything inside Alfred's debugger. A debug output in the line directly in front of it, however, is still displayed and "mailboxName" / "theAccount" contains the correct information.

Maybe i've got time to dig deeper into the problem next year ... ;-)

from alfred-mail-sorter.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.