×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    1

    Opening URLS in Phones Browser

    Hello,

    This seems to be the place to find some help

    i have been using a script i found to hopefully allow myself to open some URLS from my own pys60 application. I thought my code was correct but its not. I connect ok to the network etc but it wont actually open the URL i give it. How cna i open a page that is supplied by me?? Hope to hear some neat responses!!

    Ken

    Here is the little snippet im using
    Code:
    def display_in_browser(url):
        """
        Launches the browser with the given url 
        """
        import e32
        import sysinfo
        internal_url = '4 '+ url + ' 1'
        b = 'BrowserNG.exe'
        e32.start_exe(b, ' "%s"' %internal_url, 4)
    
    display_in_browser("http:\\www.rte.ie")

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: Opening URLS in Phones Browser

    Quote Originally Posted by KjT View Post
    This seems to be the place to find some help
    Well, you actually need Browsing help, not python, but let's see...

    Quote Originally Posted by KjT View Post
    I connect ok to the network etc but it wont actually open the URL
    Are you using S60 3.0, 3.1 or 3.2 device? There are different web browsers, so you need to know which one you try to use.

    In your code you try to launch the "new" browser and your comments seem to suggest that you managed to launch it? Did you get to Bookmarks view or did you get some error note? What do you mean with "connect ok to network", if your URL wasn't launched?

    In short: what did you try to do, how did you try to do it, what actually happened, what makes you think that it really happened, what did you expect to happen, any ideas about possible reasons for any of this.

    Btw you did download and study the Browser (command line) API document from Forum Nokia beforehands, didn't you

    Wondering,

    --jouni ex-tester and ex-error manager

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    12

    Re: Opening URLS in Phones Browser

    your code has an error. try:
    Code:
        internal_url = '4 '+ url + ' 1'
        b = 'BrowserNG.exe'
        e32.start_exe(b, ' "%s"' %internal_url)
    and it seems to be important, that the homepage you've set in you browser is your bookmarks page, otherwise (at least in my fon) nothing gets opened.

    --u



    Quote Originally Posted by KjT View Post
    Hello,
    Here is the little snippet im using
    Code:
    def display_in_browser(url):
        """
        Launches the browser with the given url 
        """
        import e32
        import sysinfo
        internal_url = '4 '+ url + ' 1'
        b = 'BrowserNG.exe'
        e32.start_exe(b, ' "%s"' %internal_url, 4)
    
    display_in_browser("http:\\www.rte.ie")

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Opening URLS in Phones Browser

    Hi KjT welcome to the Python Discussion boards
    i think you are just asking for opening a URL. then plz check the code below:

    import e32

    apprun = 'z:\\system\\programs\\apprun.exe'
    browser = 'z:\\System\\Apps\\Browser\\Browser.app'
    url = 'name of your url'
    e32.start_exe(apprun, browser + ' "%s"' %url , 1)
    hope this helps give a feedback

Similar Threads

  1. Nokia, do you listen to your customers? Problems of your new phones
    By djprofessork in forum General Development Questions
    Replies: 3
    Last Post: 2007-09-24, 15:15
  2. Wap browser connection opening
    By Mauro_Nokia in forum Mobile Java General
    Replies: 0
    Last Post: 2006-06-05, 10:56
  3. Replies: 1
    Last Post: 2006-05-23, 04:19
  4. Replies: 0
    Last Post: 2002-12-04, 15:46

Posting Permissions

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