Results 1 to 2 of 2

Thread: How to read parameters when launched from command-line

  1. #1
    Join Date
    Apr 2011
    Posts
    28

    Question How to read parameters when launched from command-line

    /Applications/Boxee.app/Contents/MacOS/Boxee app://myapp?sect=movies


    If I wanted to read the "sect" parameter in my Boxee app (from within the onload handler in the window), can anyone tell me how it's done.

    I've tried:

    params = mc.GetApp().GetLaunchedWindowParameters()

    and

    params = mc.GetApp().GetLaunchedScriptParameters()

    mc.ShowDialogNotification("params = "+str(params['sect']))

    and both fail.


    Let's say for instance, that I've got a banner ad for my app in the Boxee platform, which is to link to my app in a subpage of the app itself. I need a means of allowing the app://myapp?sect=movies to burrow down into the app and bypass the main menu page and jump straight to movies.

  2. #2
    Join Date
    Feb 2009
    Posts
    427

    Default

    I haven't done this, but it looks like this script is doing it
    http://developer.boxee.tv/Demo_Auth_play.py

    if sys.argv[1]:
    args = cgi.parse_qs(sys.argv[1])
    launch(args)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •