Wednesday, September 22, 2021

#1 2012-01-02 04:27:37 am

uluchay
Member
Registered: 2012-01-02
Posts: 2

Hot Corners (Launchpad)

Hello everyone, l'm new to the forum and this is my first post,

l am working on a piece of code to enable/disable hot corners. I have this piece of code:   

set properties of the top left screen corner to {activity:show desktop, modifiers:{}}
set properties of the top right screen corner to {activity:dashboard, modifiers:{}}
set properties of the bottom left screen corner to {activity:all windows, modifiers:{}}
set properties of the bottom right screen corner to {activity:application windows, modifiers:{}}

So far it works flawlessly but my problem is that l want Launchpad on the top right corner. Does anyone know how l can do that? Seems like AppleScript doesn't recognize launchpad as l tried changing "dashboard" with "launchpad". Any other variable l can use?

Please don't suggest the defaults write option, l don't want to go over killall Dock every time l run the script.

Thanks in advance

Model: MacBook Mid 2009
AppleScript: 2.4.1
Browser: Safari 534.52.7
Operating System: Mac OS X (10.7)

Offline

 

#2 2012-01-02 04:37:08 am

uluchay
Member
Registered: 2012-01-02
Posts: 2

Re: Hot Corners (Launchpad)

Ok I managed to go a little further, I ran this script

tell application "System Events"
    activate
    tell expose preferences
        get the properties of the top right screen corner
    end tell
end tell

and it returned the property as {activity:«constant ****lpad», class:screen corner, modifiers:{}}
when l tried to set it on the otherside with set properties of the top right screen corner to {activity:«constant ****lpad», class:screen corner, modifiers:{}}

it returned this error message:

error "System Events got an error: Can’t make {class:screen corner, activity:«constant ****lpad», modifiers:{}} into type properties of screen corner." number -1700 from {class:screen corner, activity:«constant ****lpad», modifiers:{}}

any suggestions?

Offline

 

#3 2013-02-07 02:35:56 pm

mjohnst
Member
Registered: 2013-02-07
Posts: 1

Re: Hot Corners (Launchpad)

Had the same problem.  Set it as {activity:«constant ****lpad», modifiers:{}} (without the class:screen corner) and it should work.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)