Jump to content

gustavok

Member
  • Posts

    4
  • Joined

  • Last visited

Posts posted by gustavok

  1. On 11/18/2016 at 1:56 PM, RodgerWW said:

    Just out of curiosity: Why not just have Alfred open the folder with the "Open File" action?

     

    In a new workflow:

    Add a Hotkey and set it to whatever you want.

    Add an "Open File" action and drag the folder you want to open into the left pane of the popup, where it says "Open the passed-in file(s)"

    then save

    Then, connect the hotkey to the open file action.

    Thanks ! It works. I thought that the "open file" action only work with files and not folders. Anyway, I'm curios why the commands didn't work on that script.

  2. Hi, 

    I made a simple an apple script to open a specific folder triggered by a hotkey, but it's not working and I can't find why.

    It works if I use the Script Editor from Mac OS but when I paste it inside the   "Run NSAppleScript" window on Alfred it doesn't. 

     

    Script:

     

    on alfred_script(q)

     

     property the_path : "/Users/UserXXX/Downloads"
     set the_folder to (POSIX file the_path) as alias

     tell application "Finder"
        activate

        if front Finder window exists then
          set target of front Finder window to the_folder
        else
          open the_folder
        end if

     end tell

     

    end alfred_script

  3. Hi,

     

    I want to use a series of terminal commands, first to open the terminal ( if needed ), change the user ( log in as another user ), enter in a folder and execute a command to start a SQL server and then log out and close the terminal window ( if needed, maybe I can do it without opening it ).

      After that I want to do the same to stop the server, but following the logic is the same script just changing the start to stop.

     

     

     

    # Manually Start PostgreSQL
    ## su as user "postgres" and run server: 
    su postgres 
    # type the password ( if possible do it automatically )
    cd /Library/PostgreSQL/9.0/bin/
    ./pg_ctl -D /Library/PostgreSQL/9.0/data/ start
    # then logout 
    exit
    # close the terminal window
     
     
    Anyway thanks for the attention !
×
×
  • Create New...