Monday, May 25, 2020

#1 2020-03-25 01:20:00 pm

robertfern
Member
Registered: 2011-11-29
Posts: 55

SessionLogoutManager

Does anyone know where to find the documentation on the SessionLogoutManager?
I am trying to use AppleScriptObjC to get the PowerDialog that shows the Shutdown,Sleep,Restart option in one dialog?

This is usually brought up by the Command-Eject or Command-Power buttons on the Mac keyboard.
I am using a third party keyboard that does not have those keys.

Any help would be greatly appreciated.

Offline

 

#2 2020-03-25 09:15:38 pm

technomorph
Member
Registered: 2017-12-14
Posts: 152

Re: SessionLogoutManager

Just remap it in your system prefs.
Keyboard shortcuts

Offline

 

#3 2020-03-25 11:15:04 pm

maro
Member
From:: Nerima, Tokyo, Japan
Registered: 2004-05-30
Posts: 101
Website

Re: SessionLogoutManager

How about this?

Applescript:

tell application "loginwindow"
   «event aevtrrst»
end tell

or this?

Applescript:


tell application "System Events"
   log out
end tell


I wrote thousands of AppleScript to realize my idea. Natural language interface, voice recognition commander and so on. Though my mother toungue is strange language, Japanese, my most frequently write language is AppleScript. I believe it is for making things easy and powerful.

Offline

 

#4 2020-03-26 12:37:58 pm

robertfern
Member
Registered: 2011-11-29
Posts: 55

Re: SessionLogoutManager

Sorry, I already know about those options.

Neither one brings up the full dialog with all three options.
only one option and cancel.

The dialog I'm looking to trigger is the one you get when you (specifically) choose control-eject or control-power buttons.

Also, there is no way to remap it in the control panel.

Thanks

Last edited by robertfern (2020-03-26 12:39:23 pm)

Offline

 

#5 2020-03-27 10:32:21 pm

maro
Member
From:: Nerima, Tokyo, Japan
Registered: 2004-05-30
Posts: 101
Website

Re: SessionLogoutManager

I can not find the Apple's document for SessionLogoutManager. So, I can not.
It is a private framework within /System/Library/CoreService/loginwindow ?


I wrote thousands of AppleScript to realize my idea. Natural language interface, voice recognition commander and so on. Though my mother toungue is strange language, Japanese, my most frequently write language is AppleScript. I believe it is for making things easy and powerful.

Offline

 

#6 2020-03-30 05:33:31 am

technomorph
Member
Registered: 2017-12-14
Posts: 152

Re: SessionLogoutManager

Use the karabiner app

https://karabiner-elements.pqrs.org/

You should be able to remap
Anything to the control-eject or control-power button

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)