Code Monkey home page Code Monkey logo

Comments (6)

gharlan avatar gharlan commented on July 28, 2024

Please open terminal and test the following command:

osascript <<END
tell application "Alfred 2"
  activate
  set alfredPath to (path to application "Alfred 2")
  set alfredIcon to path to resource "appicon.icns" in bundle (alfredPath as alias)
  display dialog "Test input:" with title "GitHub Login" buttons {"OK"} default button "OK" default answer "" with icon alfredIcon with hidden answer
  set answer to text returned of result
end tell
END

Does it open a dialog box or do you get an error message?

from alfred-github-workflow.

axelav avatar axelav commented on July 28, 2024

That worked. I got a dialog box. http://cl.ly/O3q8

from alfred-github-workflow.

gharlan avatar gharlan commented on July 28, 2024

Hmm ok. Then please test another command in terminal:

php <<CODE
<?php

echo exec('osascript <<END
tell application "Alfred 2"
  activate
  set alfredPath to (path to application "Alfred 2")
  set alfredIcon to path to resource "appicon.icns" in bundle (alfredPath as alias)
  display dialog "Test password:" with title "GitHub Login" buttons {"OK"} default button "OK" default answer "" with icon alfredIcon with hidden answer
  set answer to text returned of result
end tell
END');
CODE

If this also opens a dialog box, please insert some text and click "OK". Is this text printed to the terminal window?

from alfred-github-workflow.

axelav avatar axelav commented on July 28, 2024

Figured it out. I had renamed "Alfred 2" to just plain "Alfred". Switched it back & this all works now. I wonder if there's a way to workaround for others who might do the same?

Appreciate you taking the time to look at this for me.

from alfred-github-workflow.

gharlan avatar gharlan commented on July 28, 2024

Good point. I will search for a workaround…

from alfred-github-workflow.

gharlan avatar gharlan commented on July 28, 2024

With OS 10.8.3 it works for me if I rename the app to plain "Alfred". The process is still named "Alfred 2" in Activity Monitor (I killed the process before renaming and restarting the app), so tell application "Alfred 2" still works.
Maybe the behavior in Lion is different, but I will close this issue for now because it seems to be a rare edge case.

from alfred-github-workflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.