Hello I have made ascript for creating parent and child mailboxes but for some reasons It cannot work
Here is my piece of script if anyone could tell me where I made a mistake?
tell application "Numbers"
tell table 1 of sheet 1 of document 1
set A37 to (value of cell "A37") as text --Set file name
set A35 to (value of cell "A35") as text --Set Client folder/mailbox name
end tell
end tell
--Create
Mailboxes
set parentMailbox to A35
set childMailbox to A37
tell application "Mail"
if not (exists mailbox (parentMailbox / childMailbox)) then
set mbox to make new mailbox with properties {name:parentMailbox / childMailbox}
end if
end tell
You’re mixing up variables names with literal strings.
A slash without quotes is the division operator
maybe
tell application "Mail"
if not (exists mailbox (parentMailbox & "/" & childMailbox)) then
set mbox to make new mailbox with properties {name:parentMailbox & "/" & childMailbox}
end if
end tell