Jump to content

sepulchra

Member
  • Posts

    390
  • Joined

  • Last visited

  • Days Won

    25

Posts posted by sepulchra

  1. @pseudometa i don't know if you might have time to test this on your end -- but when i select a dot to append to (⌘⏎ Append to the Dot), it still just appends to the dot selected in the user configuration when using the "qq" keyword. It was working as expected for a while but suddenly it just appends to the one dot.

     

    I'm on Alfred 5.1.4 and OS 13.6.3

  2. Is the delay utility intended to work with fractions of a second? I have a delay that is set it .1 seconds but when it runs it appears to delay for a full second.

     

    I'm on alfred 5.1.4 [2195] and OS 13.6.3.

     

    Thanks!

    EDIT

     

    I set up a test workflow with .1 second delay and it appears it is getting pretty close:

    image.thumb.png.3eab88a89d40f04ace71bd93efc312e5.png

  3. not surprisingly @vitor this has sent me down a bit of a rabbit hole after looking at your Tapback Message workflow. One part of the workflow requires that i fire number keys on the numpad. It is a shortcut I am trying to fire in pro tools (the digital audio workstation app that I use). In order to go to a marker one has to type the "." key and the marker # on the numeric keypad. The numbers can be 1 digit or 6 digits long. For exmple say you want to go to marker #5. the keycommand to go to that marker would be ".5."    

     

    I want to be able to use this in a script that is then followed by other objects downstream. I thought I use use a variable to store the value (like in tapback) and pass to the dispatch keycombo, but there is no way to specify a numpad key with it is passed that way, correct? I'm guessing I would have to build a list filter where the possible numpad combos are assigned a keycode value and get saved as variables?

     

    Bring on the rabbit holes. 

     

     

     

     

  4. I have a workflow I'm building that can use either -- it is a Item in an edit menu but also has a shortcut assigned? Is one faster? more reliable/preferable?


    also if I wanted to select the same menu item multiple times in succession is there a way to repeat it x amount of times like dispatching a hot key? Or do I just need to copy that objects amount of times.

     

  5. @vitor i wonder if i could prey upon your good graces one more time. The applescript I'm using outputs the path but with an extra line, which i'm removing in a var utility. But would you be able tell me what in the script is outputting a blank line at the end? I can't seem to sort it.

     

    try
        tell application (path to frontmost application as text)
            (path of document 1) as text
        end tell
    on error
        try
            tell application "System Events" to tell (process 1 where frontmost is true)
                value of attribute "AXDocument" of window 1
            end tell
            do shell script "x=" & quoted form of result & "
            x=${x/#file:\\/\\/}
            x=${x/#localhost} # 10.8 and earlier
            printf ${x//%/\\\\x}"
        end try
    end try

     

  6. interesting. 

     

    these additional lines work on apps that didn't initially return the path:

     

    try
        tell application (path to frontmost application as text)
            (path of document 1) as text
        end tell
    on error
        try
            tell application "System Events" to tell (process 1 where frontmost is true)
                value of attribute "AXDocument" of window 1
            end tell
            do shell script "x=" & quoted form of result & "
            x=${x/#file:\\/\\/}
            x=${x/#localhost} # 10.8 and earlier
            printf ${x//%/\\\\x}"
        end try
    end try

     

  7. Thanks Stephen .... this got me going. I got this script to work:

     

    tell application "System Events"
    	set activeApp to name of first application process whose frontmost is true
    end tell
    tell application activeApp
    	set myPath to POSIX path of (get file of front document)
    end tell

     

    Interestingly, when i run it on any app the first time I get this permission request. I haven't had that kind request to run any other applescript. Any idea why that would be the case?

     

    image.png.9ff88f8f54c68eab7b9752049171f95d.png

     

    Also some applications, don't return the path and instead return this error "execution error: Preview got an error: Can’t get file of document 1. (-1728)"

     

  8. I have  a bit of workflow i have been puzzling over. I often have a document open where I want to quickly go to its path in the finder. For example, I might have a numbers file open and I will command+click on the top of that document's window and click on the folder it resides in, which reveals it in the finder.

     

    I would love to build a way to do this with a script or maybe there is a way to use an automation task for this so I can assign it to a hotkey. It is something I do often and would love to eliminate the need for the mouse.

×
×
  • Create New...