Making progress. First step is you need to get the folder ID inside Outlook for each of the inboxes. Create this script in Script Editor.
tell application "Microsoft Outlook"
get selected folder
end tell
With Outlook open, select and highlight the folder you want the count from in each account in the Folder Pane and run the script in Script Editor
You should see something like
mail folder id XXX of Application "Microsoft Outlook"
Repeat with all your account inboxes or folders you wish and record the numbers. Now you have the folder ID's you can call for each unreadCount
I got started on the script but work keeps distracting me, so I'll post here as is:
tell application "Microsoft Outlook"
set allMailFolders to get mail folders
repeat with currentFolder in allMailFolders
if id of currentFolder is XXX then
set unreadCount1 to the (unread count) of currentFolder
if unreadCount1 is not 0 then return unreadCount1
if unreadCount1 is 0 then return ""
end if
end repeat
end tell
It returns the correct folder counts when the folderIDs are substituted for XXX. Just need to figure out how to assign and nest multiple folderIDs and add them to an aggregate final total in the script. Ran out of time before I could figure the rest of it out though...
Think you could figure out a solution where people don't have to edit in folder names? Maybe a way to get the folder IDs programmatically? Although @liamb did you confirm whether or not your script is returning the correct number?
Progress! Supports up to 10 tabs at a time. I absolutely hate not being able to generate the correct amount of buttons in a single script, but I tried the add_new_trigger function and it permanently adds new buttons so... can't go that route.
What I really want to do is recreate (as closely as possible) Apple's Safari tabs widget. So I just need to somehow get a cropped screenshot of the page and display that in the button... simple
If I can't do that, I want to at least get the favicon and find a way to make all tab buttons the same length.
Will make sure to include all-day events in the calendar widget by default next update @chrisparker! And Airmail and Spark are actually next on my list
This means that something is wrong with your icalBuddy installation. Make sure it's installed to /usr/local/bin/icalBuddy. The other option is you have no calendar events in the next week?
icalBuddy seems to give people a lot of issues and is difficult to troubleshoot, this might be the next logical widget to knock off the list @Andreas_Hegenberg - native reminders/calendar support
Spark support coming soon, yep! Working on it and Airmail right now, actually. I'm so frustrated with Airmail that I think I'll take a break and do Spark lol
EDIT: Wow, Spark was easy. Airmail y u so annoying
Yep a native calendar widget should be doable Will work on this next week. However if everything goes well I'll probably do a public release by the end of the week, then start a new alpha phase next week.
Btw. the add_new_trigger function returns a UUID which you can use to delete the trigger again later. Not sure if that would help.
It would be amazing to see an example, especially of buttons being generated/destroyed inside of a button group. Another thing that would be useful is knowing how to set the button in the series to have the correct corner radius on the right edge. I think I'm just having a tough time getting started here.
I'm working on a new version for 2.559. Some spacing/padding broke again but I got Chrome tabs working in the browser tabs widget! So that'll be in the next release, too.
EDIT: Button highlighting is not working for me in 2.559. Additionally, all conditional widgets are displayed at all times. Whoops I downgraded for now @Andreas_Hegenberg
I think with some editing it would be, currently, it counts all unread emails in all folders in All Accounts from what I can gather:
Weirdly it seems to be out 1 everytime, regardless of how many emails I open (it'll update but be under by 1), perhaps an array issue or something where it's counting the first email as 0?
Got it! Here's a working multi-account no-config Outlook unread mail count script. It loops through each account inbox and then sums the different unread counts together this will be included in the next GC-BTT release. @liamb@Harrumph
if application "Microsoft Outlook" is running then
try
tell application "Microsoft Outlook"
set unreadCounts to the unread count of every mail folder whose name is "Inbox"
end tell
set unreadCount to 0
repeat with this_item in unreadCounts
set unreadCount to unreadCount + this_item
end repeat
if unreadCount is not 0 then
return unreadCount
else
return ""
end if
on error
return ""
end try
else
return ""
end if
EDIT: Also figured out a small workaround to cap the ends of tab lists, which has also inspired me to figure out how to make multi-component buttons out of widgets with no space between them. Definitely gonna play around with being able to close browser tabs from here.