Jump to content

jaypeters

Member
  • Posts

    8
  • Joined

  • Last visited

Posts posted by jaypeters

  1. On 5/17/2018 at 2:35 PM, Russell Davis said:

    @Luciano Santana (and anyone else following along), there are a few commands (Create New Timer, Create New Alarm, and View Recent) that are still broken in Alfred 3. I have a branch that fixes them. (I also submitted a PR to Luciano's repo.)

     

    Super newbie question -- how do I add this branch into Alfred as a workflow?

     

    Also, to anyone reading, I could use some help integrating parts of this workflow into another. Right now, I start work by typing "start work", and the apps I use open and the webpages I need to start with also open. I'd like have my "start work" command also start a repeating 30 minute timer to remind me to take a break. Anyone know how I could do that within the workflow manager?

  2. 16 hours ago, CJK said:

    Hi @Chamend

     

    This slight adjustment to the script negates the need to use System Events to issue menu clicks (which is an unreliable method):

     

    on new_tab(www)

            tell application "Safari" to tell the front window to ¬

                    make new tab with properties { URL:www }

    end new_tab

     

    Then you call the handler, specifying the URL at the same time, e.g.:

     

            my new_tab("https://stackoverflow.com")

     

    Thanks @CJK! Full disclosure -- the script I shared is the first code I have ever written so I'm a complete newbie. Would you be able to give me some more detail about how to plug this adjustment into the script I wrote? 

  3. I got this to work! Example code below. Swap in the URLs of your choice.

     

    When this code runs, the tabs open one after the other. So, after the code runs, the active tab is the Stack Overflow one, with Google and Apple in tabs in the background. 

     

    This is really handy! Thanks auco for your help.

    on alfred_script(q)
    	tell application "Safari"
    		activate
    		make new document with properties {URL:"https://www.apple.com"}
    		my new_tab()
    		set the URL of document 1 to "https://www.google.com"
    		my new_tab()
    		set the URL of document 1 to "https://stackoverflow.com"
    	end tell
    	end run
    	on new_tab()
    	tell application "Safari" to activate
    	tell application "System Events"
    		tell process "Safari"
    			click menu item "New Tab" of menu "File" of menu bar 1
    		end tell
    	end tell
    	end new_tab

     

  4. Thanks! I used that site to get a script working in Script Editor (first screenshot), but when I try to run it in Alfred, I get the error in the second attached screenshot. Any idea how to get it to work within Alfred?

     

    Sorry they are screenshots. I'm not sure how to share code snippets on Alfred forums like you did. 

     

    Screen Shot 2018-06-11 at 10.21.18 AM.png

    Screen Shot 2018-06-11 at 10.20.35 AM.png

  5. On 8/17/2016 at 2:13 AM, auco said:

    Here's a small update, adding "http://" to the string, if a TLD ending is detected

     

     

    Hi! Is it possible to use this extension to open multiple tabs in one new window? If so, what would I need to change in the AppleScript? Thanks!

     
×
×
  • Create New...