Jump to content

ctwise

Member
  • Posts

    307
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by ctwise

  1. Vote for this - https://remotedesktop.uservoice.com/forums/287834-remote-desktop-for-mac/suggestions/9280833-allow-the-application-to-be-controlled-with-apples The workflow breaks constantly due to having to script the GUI - Microsoft keeps making GUI changes and throwing up dialog boxes. Until Microsoft makes the app scriptable the workflow will remain buggy.
  2. An argument is the information typed after a keyword. For example: mysuperspecialkeyword does stuff Your keyword here is 'mysuperspecialkeyword'. Your arguments are 'does stuff'. If you create a keyword that shows weather where you live then it won't take any arguments - you type 'weather' and you're done. If you create a keyword that shows weather for a given zip code, you need arguments, 'weather 11223'.
  3. Yeah, since the AppleScript is busted, you have to use the command-line. You can get the connection status of a VPN using this command-line: scutil --nc show "<vpn name>" | grep Disconnected > /dev/null That returns an exit code of zero if the VPN is disconnected, anything else and the VPN is connected. You can start a VPN with this command-line: scutil --nc start "<vpn name>" And stop it with this command-line: scutil --nc stop "<vpn name>" So a Ruby script to toggle the status of a VPN connection would be: vpn_name = ARGV[0] status = system("scutil --nc show \"#{vpn_name}\" | grep Disconnected > /dev/null") if status system("scutil --nc start \"#{vpn_name}\"") else system("scutil --nc stop \"#{vpn_name}\"") end Unfortunately, you can't reliably use the command-line to get a VPN list. It truncates long VPN names. So if you want to get a list of all VPNs, you still need to use AppleScript to pull the list, but then you have to manipulate the VPN connections using the command-line tool.
  4. Thanks to _patrick, I have updated my VPN workflow to work correctly on El Capitan. If you've upgrade to El Capitan and your VPN workflow no longer works - try this one - http://www.packal.org/workflow/vpn-toggle
  5. Ok, that's partially it. Looks like 'scutil --nc list' truncates long VPN names. You need to use AppleScript to get the list of services, then you can use 'scutil --nc start' and 'scutil --nc stop'.
  6. I didn't even know that 'scutil --nc' existed. Yes, that will work perfectly to fix my own workflow. Much appreciated.
  7. Yes, El Capitan broken network service AppleScript.
  8. Looking for info from anyone on this issue. Pulling VPN info using AppleScript appears to be broken in El Capitan. Most services have an empty (null) value for the current configuration. So you can't determine connection status.
  9. Thanks to Alfred's brand new method of triggering, yes, you can do this now. I have a text processing workflow which I'm going to have to update because of this. I didn't even realize it until you brought this up - so, kudos. Here's the script snippet: on alfred_script(q) tell application "System Events" to keystroke "c" using command down delay 0.3 do shell script "pbpaste" end alfred_script This will send the current application a ⌘C to copy whatever text is selected. You need to pause at that point for the app to do the copy and put the text on the pasteboard. After that you can do what you want with the copied text. In the above example I just dump it onto stdout.
  10. I'm very happy with Alfred but I still want more. :-) This is a recap of feature requests I've made in the past. Some of my requests have made it into Alfred (so I'm not repeating them), some are still unfulfilled. Hopefully resurfacing these will help to bump them up. 1. Ability to flag workflows as working with file paths instead of just strings. This would be done to support file path completion in the Alfred bar. 2. Set environment variables to pass various information to Alfred when scripts are run: a) State of the option key, command key, etc. Original query value (_not_ the value passed from the previous workflow stage) 3. Support JSON or XML returned from script. JSON and XML would mirror each other 4. Returned items should optionally include a quicklook URL 5. Provide explicit support for multi-level menus, including calling another script to get the next level down.
  11. It should also be mentioned that this is a problem for _all_ clipboard managers. It's not Alfred-specific.
  12. Known problem - https://youtrack.jetbrains.com/issue/IDEA-114252 -- https://bugs.openjdk.java.net/browse/JDK-8071668 It's a Java issue. You can use the latest JDK (8u60) or their custom JDK they bundle with IntelliJ. There's also a possible workaround in the first link. Basically Java caches the pasteboard when it gets focus. If focus doesn't leave the app it doesn't recognize when the clipboard manager changes the pasteboard.
  13. I need everyone's help. Microsoft's Remote Desktop app is barely scriptable by throwing keystrokes at the app. That works poorly and breaks constantly with updates. We need that app to be scriptable in order to control it reliably. Microsoft doesn't want to implement scripting support. But they have a mechanism to vote for feature requests. Please follow the below link and vote the max (3 votes) for the feature: https://remotedesktop.uservoice.com/forums/287834-remote-desktop-for-mac/suggestions/9280833-allow-the-application-to-be-controlled-with-apples Even if you don't use Remote Desktop I'd appreciate the help.
  14. Try this one - http://www.packal.org/workflow/vpn-toggle- if it is also not working, then something has changed in your setup.
  15. Disk Utility in El Capitan no longer has Repair Permissions. Apple axed it. The repair permissions functionality is supposed to be automatic now.
  16. Short answer: http://www.packal.org/workflow/menu-bar-search Long answer: 1. Use the menudump command in the above workflow to dump the menu structure of the app you're targeting (--help for details) 2. Use the output to determine the Applescript line to target the menu item, e.g., tell menu item "Check For Updates…" of menu "iTerm2" of menu bar item "iTerm2" of menu bar 1 if (it exists) then perform action \"AXPress\" end tell You can look at the execute.scpt file in the above workflow for more details.
  17. This is a simple one. I'd like to be able to use Javascript instead of Applescript for custom shell integration. Right now it only supports Applescript.
  18. This might help - http://www.packal.org/workflow/menu-bar-search
  19. This has been talked about before but it doesn't have direct support from Alfred. I'd like to have scripts run so that Alfred isn't the parent process. I start VM instances using an Alfred workflow. As a result, when I look at energy usage in Activity Monitor, Alfred is near the top. Not because of anything Alfred is doing, but because VMWare is using energy. But it's attributed to Alfred because Alfred is the parent process. I'd like to sever that connection, by, for example, having scripts run as their own parent processes.
  20. The method Alfred uses to run scripts won't return while any sub-processes are still running. If you want something to run in the background you'll have to run it as a separate server that isn't triggered by an Alfred script.
  21. 'pbpaste' is the command-line command that gets the text on the clipboard and outputs it. That said, if you want to act on the currently selected text w/o using pbpaste, you have to create a workflow triggered by a keyboard shortcut and select the argument as the selected text or the contents of the clipboard. The past explanation is that once Alfred displays the input box it becomes the selected application and no longer has access to the previous application's selected text. It's possible this functionality will evolve though.
  22. I'm a little baffled as well, but I bought it to give Andrew a little more money to keep supporting software that I love and use every day and to test workflow integration with Remote. Who knows, maybe I'll find a good use case for it.
  23. I just updated the workflow on Packal to add remote triggers.
  24. I suggest using the new queue setting to terminate the script filter when a new keypress is received. It shaves a few microseconds off when typing, not a big difference but definitely adds a snappier feel.
  25. I personally disabled the merge long ago. Since I'm a developer I use cross-platform Java apps, editors, etc. and it was just too flaky for me.
×
×
  • Create New...