How to get the contact online status of Skype friends via Applescript - applescript

is there a way to get the online status of each Skype contact via Applescript?
So far I only managed to get the group of online users. However, I need also the corresponding online status.
Thnaks for your help!
Cheers
Julian
set groupType to send command "GET GROUP " & group & " TYPE" script name "getType"
if groupType contains "ONLINE" then
set onlineFriends to send command "GET GROUP " & group & " USERS" script name "getType"

Okay, its quite easy... sometimes it helps to take a break ;-)
tell application "Skype"
set result to send command "GET USER <userName> ONLINESTATUS" script name "getType"
end tell
Cheers
Julian

Related

Apple Mail and Applescript

I have has this script working fine on Outlook 2011 for Mac all on a local machine.
I have now found out my "rules" will now work on Apple mail after all these years.
The last part of the rule is to run this script which then sends an HTML email back to the sender.
If I change the tell application "Microsoft Outlook" to tell the application "Mail", I keep getting Syntax Errors and it highlights the "mail folder" telling me it is wrong.
I am stumped.
I am using Exchange with the Mail app. Not sure if that may be the issue?
tell application "Microsoft Outlook"
set replyToMessage to message 1 of mail folder "•HOT FOLDER•"
if (replyToMessage is "") then
log ("NOTHING SELECTED!")
return
end if
set replyMessageSubj to subject of replyToMessage
set replyMessage to reply to replyToMessage without opening window
set contentHTML to "Vault:Users:vault:Documents:VAULT:Digital_Subscription_Reply:Digital_issue22.html" as alias
set contentHTML to read contentHTML
set the content of replyMessage to contentHTML
set the subject of replyMessage to "Vault Digital Issue - Issue 22"
send replyMessage
end tell
Every scriptable application has its own scripting dictionary with its own unique terminology. We can't just change tell application "Microsoft Outlook" to tell application "Mail" and expect it to work, because Mail and Outlook use different keywords for their equivalent objects. I don't have outlook installed on my machine, so I can't compile or run the original script, but I've modified it as best I can to use Mail terminology. No guarantee this will work, but it will compile and run so you can (at least) test it.
tell application "Mail"
set replyToMessage to message 1 of mailbox "•HOT FOLDER•"
if (replyToMessage is "") then
log ("NOTHING SELECTED!")
return
end if
set replyMessageSubj to subject of replyToMessage
set replyMessage to reply replyToMessage without opening window
set contentHTML to "Vault:Users:vault:Documents:VAULT:Digital_Subscription_Reply:Digital_issue22.html" as alias
set contentHTML to read contentHTML
set the content of replyMessage to contentHTML
set the subject of replyMessage to "Vault Digital Issue - Issue 22"
send replyMessage
end tell
When you're in Script Editor, select "Open Dictionary..." from the File menu and scroll down to open the Mail scripting dictionary. That will give you all the relevant terminology for scripting Mail.app.

AppleScript - How to Access Mail Directory?

I am trying to access folder in my mail using apple script. but did not succeed.
My folder Name is : BLABLABLA , it resides under Apple Mail .
I think that it should be :
set myDir to mailbox "BLABLABLA"
this does not work, any suggestions ?
This will retrieve the account mailbox
tell application "Mail"
set AccountNames to name of accounts
choose from list AccountNames with prompt "Select the email account" ¬
without multiple selections allowed
set AccountName to result as string
set MailboxesListV to mailboxes of account AccountName
end tell
Which is what I think you want. (Notice that the result is a list.)
I hope it helps.

Mac Automator/Applescript(?) to extract URL's from Mail messages

I'm trying to get a text document list of any links in a bunch of email messages that reside in the latest Mac Mail.app (OS X 10.10.2 Yosemite), and am simply stumped.
I thought I'd be able to just...
Put a couple of Automator.app actions together in a Service/Workflow,
Select/highlight all the email messages within the Mail.app,
Select that Service or run that Workflow,
And have a text document with every URL/link that could be found within them all.
However, this didn't work.
I figured out how to do this with one email message at a time, but that's not what I want. attached is a screenshot of 3 workflows. The first one is the one that works with just one email message & highlighting all the text in it & running the Service. the other two just simply don't work.
I also notice that the the first shows up in the Service Menu with a single email open; once I highlight more than one email message, the option goes away from the Service menu.
Any tips or tricks?
I figured out how you could reach your goal, start with creating a new service within Automator (input: "No input", application: "Mail")
The first action is Get Selected Mail Messages (Get selected: messages)
The second action is Execute AppleScript with the following script:
on run {input, parameters}
set mailContentList to {}
tell application "Mail"
repeat with selectedMail in input
set end of mailContentList to content of selectedMail
end repeat
end tell
return mailContentList
end run
This script simply walks through the given messages, reads out the content and passes this list to the next action
The third action is Extract URLs from Text. This is listed as "Extract Data from Text" and one of the types of data is "URLs".
And the final action is New TextEdit Document
Save it with a nice name like Extract URLs from selected mails
After that the Service is available inside the Services menu inside the Mail app.
In my test I found a few internal URLs without http:// from links to anchors, so maybe you want to delete all URLs that do not start with http. You can do so by using another action before creating the new TextEdit document:
Filter Paragraphs with options "Paragraphs that start with http" (don't know how these parameters are called in English Automator, sorry)
Feel good, Michael / Hamburg

VBScript List all Windows Services by user "Log on As"

I need help, how to create script (VB) listing all Services Windows in the computers in TXT file (Using wmi I think better), but I'd like know how to filter by "Log On As" because all customized Services running specify user.
Thank you for everybody.
You can:
for each item in GetObject("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_Service WHERE StartName = 'LocalSystem'",,48)
Wscript.Echo item.Name + "/" + item.StartName
next

how to get the subject of my outlook email to mac clipboard through an applescript?

I am new to applescript. I am trying to get the subject of the selected outlook (2011) email with the following applescript.
tell application "Microsoft Outlook"
set theMessage to the current messages
get the subject of theMessage
end tell
But I am getting the following error message.
Can’t get subject of {incoming message id 392990 of application "Microsoft Outlook"}
Can someone please help me?
I am completely new to AppleScript ... and am wanting a script to extract a list of both the the 'subject line' and 'date received' from a specific batch of emails in Outlook 2011.
Is this possible.
The script above works great for extracting the subject line from one highlighted email.
Many thanks
Simon
The reason this does not work is that set theMessage to the current messages returns a list. Notice the { }
tell application "Microsoft Outlook"
set theMessage to first item of (get current messages)
set theSubject to the subject of theMessage
end tell
set the clipboard to theSubject

Resources