Jump to content

Search the Community

Showing results for tags 'Applescript'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

  1. Hi guys, I wrote a little AppleScript that copies and pastes a text selection to the Alfred bar with a certain prefix: see below. The thing is, when I select text, and run the .scpt file from the Alfred bar (i.e. I look up the file and press enter) it works fine, but when I try to link this script to an Alfred keyword or hotkey, it stops working. I tried these three methods: I simply copied the content of the .scpt file into an Alfred workflow (actions --> RunNSAppleScript). Doesn't work. I wrote a bash script calling the .scpt file and attached it to the act
  2. Hi guys, wondering if anyone has a clue about what changed with applescripts and accessibility in macOS Sierra. Since upgrading to Sierra, it seems all of my workflows that use applescript no longer work. This is not exclusive to Alfred; I have tried running multiple scripts in Script Editor, and Script Editor ends up hanging on run. In Alfred 3, no information shows in debug. Calling a workflow will just cause Alfred to stop responding. Console does not show any Event errors in Alfred or Script Editor. I haven't been able to find similar issues with other p
  3. I've got an applescript which opens a specific path in the finder. When implementing this applescript in Alfred it behaves different. for instance, setting "q" to "~" (the home directory) will open the folder in the finder. But passing "~" in alfred in my workflow as an argument will reveal the folder, not open the folder. I want it to open the folder, similar to how the go to function in Finder works. Not reveal it. In Alfred I am using the Run NSAppleScript action and a keyword with an argument to trigger the script. set q to "~" set folder_var to true set mypat
  4. hey there, My goal is: type "ms" in Alfred to trigger the keyboard shortcut "cmd-shift-7" to invoke the help menu in the current app. "cmd-shift-7" is the standard keyboard shortcut to do that, but it is cumbersome to use. What I tried: keyword → RunNSAppleScript my AppleScript: on alfred_script(q) tell application "System Events" key code {26} using {command down, shift down} end tell end alfred_script This does work on most apps, but not all apps, despite the short cut "cmd-shift-7" works in those apps. What am I
  5. Why would this script throw an error when used in an Alfred workflow but work when launched in Script Editor? -- from https://gist.github.com/sillygwailo/1236890 on alfred_script(q) property theURL : "" tell application "Safari" set theURL to URL of current tab of window 1 end tell tell application "Google Chrome" if (count of (every window where visible is true)) is greater than 0 then tell front window make new tab end tell else make new window end if set URL of active tab of window 1 to theURL activate end tell end alfred_script The error it throws in the debug
  6. Hi all Is it possible to link applescript modules together so their variables pass from one to another? For example in the attached image - the central script module sets-up some variables which are then dealt with differently in the end-of-chain script modules. I've tried using {var:varname} to pass-through but it's not working... Is this actually possible? Here's an example workflow: https://www.dropbox.com/s/j52zibfpui9z0p7/multi-ascript.zip?dl=0 Cheers James
  7. Hi forum. I recently purchased the Alfred PowerPack and am looking forward to leveraging its power. I've added a few custom workflows that are triggered by hotkeys which run some NSAppleScripts. I'd like to do the same for a few more, but triggered automatically at a specific time each week (e.g. "every Friday @ 6pm"). I don't see a workflow object that is triggered by date or time. Is this possible in Alfred?
  8. I'm trying to create a workflow where I type "task {query}" which then sends an email via AppleScript to x@mail.asana.com which would add a new task to my account. I'm struggling with the AppleScript. All I need to do is set the recipient to x@mail.asana.com and subject to {query}. Please help. Here's my code: on run {input, parameters} set recipientName to "Asana" set recipientAddress to "X@mail.asana.com" set theSubject to "{query}" set theContent to "" tell application "Mail" set theContent to theContent & (content of msg) set theSubject to theSubject & (
  9. I have a simple workflow, hotkey fires an applescript action. The script makes a call to a scripted library script, like so tell script "COLib" do stuff end tell My problem is that the library script appears to be getting cached by Alfred. Changes made to it are not being seen by the script in Alfred. Further, new workflows are only seeing the previously cached version of the library script. Is there a way to force Alfred to see the updated library script. thank you.
  10. Selecting the option to include AppleScripts in Alfred's Default Results does not work as you would expect it to because scripts saved in the standard locations (~/Library/Scripts and ~/Library/Application Scripts) are marked as system files and thus won't be shown in Alfred's default results under any circumstances. That is to say, if you do the most reasonable/logical thing and save your scripts in the standard folders (where other applications, like Mail.app or FastScripts, expect to find them), add the folders to Alfred's Search Scope, and then check the AppleScripts option, no
  11. Hello all- I'm quite new to the var/arg step in Alfred, but what I need to accomplish is this: Keyword to input first query, in this case {first name}. Store first name value as variable. Second input to be stored, in this case {last name}. Store last name value as variable. Pass Alfred variables into NSApplescript to be converted to applescript variables. I understand that you can simply use q as the variable for a single input, but how do you reference multiple Alfred-stored variables in the applescript? Thank you so much.
  12. I was ecstatic when I found a workflow to add the currently playing track any playlist of my choice. So fast and efficient! But, alas, the workflows out there do not seem to work with Apple Music. I have looked at AppleScript API for iTunes (god I hate AS) and the small proof of concepts I have made have failed miserably. Has anybody gotten close to doing this? I am so sick of adding songs to playlists like a mere mortal! Thanks! -Christian
  13. Hi, I hope I make sense here. What I'm trying to do: Workflow that... - uses a keyword + argument - opens a URL - has a delay - runs applescript to do "cmd + f" so I can search the page - (what I haven't figured out) add a step that types out the original query So if I type keyword then "elephant" I eventually want those last workflow steps to do a "cmd + f" on the page then type "elephant". Is this possible?
  14. I created this little workflow a while back and thought somebody else might find it useful. The workflow will grab all tabs from the frontmost Safari window, format them into a Markdown list and copy the list to the clipboard for further use. The list is formatted like this: # URL List from Safari Tabs | Dienstag, 14. Juni 2016 um 12:34:42 * [Alfred App Community Forum](http://www.alfredforum.com/index.php) * [Posting New Topic - Alfred App Community Forum](http://www.alfredforum.com/index.php?app=forums&module=post&section=post&do=new_post&f=3) The code is based on
  15. Hi there! I'm trying to set up a Hide All script for the Remote, effectively hiding every app whose visibility is set to True and opening Home. So far it works every time with ScriptEditor, but when I put it on the System Command as a Open Script command, it works only slightly. Sometimes it just hides Messages, sometimes everything or sometimes it just doesn't care at all. I'm sure there's just something wrong with my coding/app/tech understanding. I'm using Murphy's HideAll tell application "Finder" set visible of every process whose visible is true and name is not "Finder" to false
  16. Hello. Today I've experimented with Safari's windows management through Alfred & AppleScript and encountered with greatly strange issue. As you probably know, every window object in AppleScript has standard properties which are described in Standard Suite: id, name, miniaturized and the like. In Script Editor I can obviously get any of these properties and I thought I can do the same in Script Filter too. However when I try to get miniaturizable and miniaturized properties in a Script Filter's script, the script fails with an error "Safari got an error: Can’t make |miniaturized|
  17. Hello, Some context I often deal with folder structures like this: top_project_folder section1_subfolder1 filename_a.png filename_b.png section1_subfolder2 filename_a.png filename_b.png section2_subfolder1 filename_a.png filename_b.png section2_subfolder2 filename_a.png filename_b.png And I need to transform them into this: top_project folder section1_subfolder filename_a.png filename_b.png filename_c.png
  18. inspired by http://veritrope.com/code/export-all-safari-tabs-to-evernote download https://github.com/cdpath/nvALT usage 1. nvs {query} +---> search in nvALT 2. s2n +---> save safari tabs in nvALT
  19. Hi, I'm posting this in Discussion as it is not technically a bug report (or is it?). I used to start Alfred using AppleScript with tell application "Alfred 2" to launch but this doesn't work anymore. I suspect it's because there is no Standard Suite (with commands such as open, launch, close) in the AppleScript Dictionary for Alfred. Is it possible to bring this suite back in the dictionary? Thanks a lot!
  20. Hi there, I'm absolutely new to applescript and writing alfred workflows. I want to write a workflow to connect to VPN with "Pulse Secure". Therefore I want to select the menu bar icon and select a connection. I managed to get it working when "System Events" is already running: on alfred_script(query) set network to "work network" if query is not "" then set network to query end if ignoring application responses tell application "System Events" to tell process "Pulse Secure" click menu bar item 1 of menu bar 2 end tell end ignoring do shell script "killall System\\
  21. I've been using this applescript for a while: set _message_ to "{query}" tell application "Messages" set _chats_ to get every text chat repeat with _chat_ in _chats_ try set _check_ to updated of _chat_ set _current_ to updated of _recent_ if _check_ > _current_ then set _recent_ to _chat_ end if on error set _recent_ to _chat_ end try end repeat send _message_ to _recent_ end tell But unfortunately with El Capitan it started sending messages to seemingly rando
  22. Hi there, Alfred: 2.8.414 OSX: El Capitan 10.11 when I start an applescript via alfred the alfred window does not disappear. It stays on top until the script is finished. I think I have this issue since El Capitan. Script example: on alfred_script(q) -- ignoring application responses tell application "Keyboard Maestro Engine" do script "03B09142-6947-4304-8F3C-6A4F49CAE859" -- or: do script "egroupware" end tell -- end ignoring end alfred_script Thank You! Greetings, Andy
  23. I've been using the apple reminders app to keep track of a lot of tidbits of info organized into a handful of lists (e.g., Recommendations, To-do, Jokes), and it would be awesome to have a way of skipping straight to a specific list by typing into Alfred, rather than opening reminders, then clicking on the list (hardly difficult I know, but Alfred has me spoiled on speed everywhere else). Thanks for your time - Alex
  24. Hello, I not good at all in Applescripting and I would like to utilize the large text display in Alfred. Also my coding is a bit sloppy... Any suggestions would be great. I am making a workflow to convert a date into roman numeral date. Once done will be posting the finished results.. on alfred_script(q) try tell (current date) set yearInt to its year set monthInt to its month as integer set dayInt to its day end tell set defaultDateString to (dayInt & monthInt & yearInt) as text tell current application set userDateString to text returned of (display dialog
  25. When using the iTunes control keywords "next" and "previous", or the Workflow iTunes Command action for Next track / Previous track, it doesn't work at all when listening to an Apple Music album that's not in my library. Triggering it logs an AppleScript error to the Console: I'm rather curious why it's even trying to get the index of the current track, since iTunes has special AppleScript commands for next / previous track. It also has a separate "back track" command which is preferable to "previous track" because "back track" will rewind to the current track if you're not near the b
×
×
  • Create New...