Jump to content

vehovmar

Member
  • Posts

    7
  • Joined

  • Last visited

Posts posted by vehovmar

  1.  

    try this instead:

    on alfred_script(q)
    	tell application "Finder" to activate
    	tell application "System Events" to tell application process "Finder"
    		click menu item "Hide Others" of menu 1 of menu bar item "Finder" of menu bar 1
    		click menu item "Minimize All" of menu 1 of menu bar item "Window" of menu bar 1
    	end tell
    end alfred_script
    

     

     

    Thanks linuslundahl, but that doesn't work either:

     

    here is event track from applescript editor:

    tell application "Finder"
    	activate
    end tell
    tell application "System Events"
    	click menu item "Hide Others" of menu 1 of menu bar item "Finder" of menu bar 1 of application process "Finder"
    		--> error number -1728 from menu item "Hide Others" of menu 1 of menu bar item "Finder" of menu bar 1 of application process "Finder"
    

    OSX 10.9

    Alfred 2.1

  2. Hey folks,

     

    I'm wondering if anyone can help me with this, I have pretty simple script to un-minimize all windows of formost application. 

    tell application (path to frontmost application as text)
    	try
    		set miniaturized of every window to false
    	on error errorMessage
    		display alert errorMessage
    		try
    			set collapsed of every window to false
    		on error errorMessage
    			display alert errorMessage
    			reopen
    		end try
    	end try
    end tell
    

    I bind this script to Hotkey (I tried both "Run script" /usr/bin/osascript and "Run NSAppleScript"), but It's not working as in AppleScript Editor.

     

     

    For example for Finder with Alfred workflow, I'm getting error message "Finder got an error: Can’t set |collapsed| of every window to false." That is not happening when I'm testing this script in AppleScript Editor..

     

     

     

    OSX 10.9

    Alfred 2.1

     

     

  3. Hi, first of all thank you very much.

     

    Sadly it's not working for me on Mavericks.. any ideas?

    tell application "Finder"
    	activate
    end tell
    tell application "System Events"
    	click menu item "Hide Others" of menu of menu bar item "Finder" of menu bar 1 of application process "Finder"
    		--> error number -1728 from menu item "Hide Others" of menu of menu bar item "Finder" of menu bar 1 of application process "Finder"
    
×
×
  • Create New...