Link to home
Start Free TrialLog in
Avatar of pratigan
pratiganFlag for United States of America

asked on

open a URL within lotus script

I am attempting to open a URL form within a lotus script pop up window from within a navigator page.
I have the lotus script structure set, just need the urlopen command format for use within lotus script.
Here is the current code:

Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim rc  As Integer
Dim Tranlink As Variant
     
Dim tempList(11) As String
tempList(0) = "DB2 SQL Error Codes v6"
tempList(1) = "DB2 v6 Messages and Codes"
templist(2) = "DB2 SQL Error Codes v6"
templist(3) = "DB2 SQL Wait Values v6"
templist(4) = "DB2 SQL Error Codes v7"
templist(5) = "DB2 v7 Messages and Codes"
templist(6) = "DB2 SQL Error Codes v7"
templist(7) = "DB2 Wait Values v7"
templist(8) = "MVS Abend Codes"
templist(9) = "File Status Keys plus VSAM Extended File Status Keys"
templist(10) = "IBM Bookmgr Bookshelf Manuals on VSAM"
templist(11) = "Just Enough SQL/QMF/SPUFI"
     
Tranlink  = workspace.Prompt( PROMPT_OKCANCELLIST,"Lookups", "Please Select a Reference Lookup from the list below or cancel ", "", tempList )
     
If Tranlink = "DB2 SQL Error Codes v6" Then
@URLOPEN("http://whatever")    
If Tranlink = "etc." Then
@OpenURL ................
End if
end if
end sub

Thank You !
Paul

                                   
Avatar of HemanthaKumar
HemanthaKumar

Check URLOpen method in NotesUIWorkspace object

Syntax
Call notesUIWorkspace.URLOpen( Url$, reload%, urlList%, charset$, webusername$, webpassword$, proxywebusername$, proxywebpassword$, notesRetriever )


Parameters
Url$
String. Optional. The URL for the Web page you want to open, for example, http://www.acme.com/. If you omit this parameter, you see the Open URL dialog box where the user can enter the URL for the Web page.
reload%
Integer. Optional. Enter 1 (True) to reload the page from its Internet server. Enter 0 (False) to load the page from the Internet only if it is not already in the Web Navigator database. Enter 2 to reload the page only if it has been modified on its Internet server. The default value is 0.
urlList%
Integer. Optional. Web pages can contain URL links to other Web pages. This value specifies that the Web Navigator should save the URLs in a field called URLLinksn in the document.  (The Web Navigator creates a new URLLinksn field each time the field size reaches 64K.  For example, the first URLLinks field would be URLLinks1, the second would be URLLinks2, and so on.)
If you save the URLs, you can use them in agents; for example, you could create an agent that opens Web pages in the Web Navigator database and then loads all the Web pages saved in each of the URLLinksn field(s).
charset$
String. Optional.  Enter the MIME character set (for example, ISO-2022-JP for Japanese or ISO-8859-1 for United States) that you want the Web Navigator to use when processing the Web page.  Only use this parameter when the Web Navigator misdetects the correct MIME character set of the URL contents.
webusername$
String. Optional.  Some Internet servers require you to obtain a username before you can access their pages.  This parameter allows you to enter the username that you previously obtained from the Internet server.
webpassword$
String. Optional.  Some Internet servers require you to obtain a password before you can access their pages.  This parameter allows you to enter the password that you previously obtained from the Internet server.
proxywebusername$
String. Optional.  Some proxy servers require that you specify a username in order to connect through them.  This parameter allows you to enter the username for the proxy server. See your administrator for the username required by the proxy.
proxywebpassword$
String. Optional.  Some proxy servers require that you specify a password in order to connect through them.  This parameter allows you to enter the password for the proxy server. See your administrator for the password required by the proxy.
notesRetriever
Boolean. Optional. If set to False or omitted, the default browser opens the URL. If present, or set to True, the Notes Web Navigator opens the URL.

~Hemanth
Hi Paul,

One cannot directly write Formula language within the script. you will have to include it within an Evaluate. What i am not sure about is whether evaluate would evaluate this function successfully :)

u can try the @Prompt functionality instead. Bulid a list separated by colons - "DB2 SQL Error Codes v6:DB2 v6 Messages and Codes..." etc and then write the if conditions to evaluate ur URL.

Code:
--------------
res1:=@Prompt([OkCancelCombo];"Title";"Message to select";"DB2 SQL Error Codes v6"; "DB2 SQL Error Codes v6":"DB2 v6 Messages and Codes":"DB2 SQL Error Codes v6")

@If (Res1="DB2 SQL Error Codes v6"; @URLOpen("http://yahoo.com");Res1="DB2 v6 Messages and Codes";@URLOpen("http://hotmail.com");"")

-------------

Hope this helps.

- Jyoti.
Hello Jyoti,

What is happening with your Transaction processing question ?

As a friendly note, don't block a question by proposing an answer. This will categorize this question to Locked Question so that the question is lost. Most of experts see only QAA and skip this unless there is someone who has patience to dig thru this LQ pile.

Paul, if you are not satisfied with proposed ans you can reject the answer, so that it reappears on the top of the list.
Avatar of pratigan

ASKER

I had checked this out and this was what I was coming up with.  Thats why I was wondering if there was some formatting problem that I was not aware of.
::)
I'm getting a message not a sub or function name for NOTESUIWORKSPACE. ?!?!?!  Any ideas.

Sub Click(Source As Button)
     Dim workspace As New NotesUIWorkspace
     Dim rc  As Integer
     Dim Tranlink As Variant
     
     
     Dim tempList(9) As String
tempList(0) = "DB2 SQL Error Codes v6"
tempList(1) = "DB2 v6 Messages and Codes"
templist(2) = "DB2 SQL Wait Values v6"
templist(3) = "DB2 SQL Error Codes v7"
templist(4) = "DB2 v7 Messages and Codes"
templist(5) = "DB2 Wait Values v7"
templist(6) = "MVS Abend Codes"
templist(7) = "File Status Keys plus VSAM Extended File Status Keys"
templist(8) = "IBM Bookmgr Bookshelf Manuals on VSAM"
templist(9) = "Just Enough SQL/QMF/SPUFI"
     
Tranlink  = workspace.Prompt( PROMPT_OKCANCELLIST,"Lookups", "Please Select a Reference Lookup from the list below or cancel ", "", tempList )
     
If Tranlink = "DB2 SQL Error Codes v6" Then
Call notesUIWorkspace.URLOpen("http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dsnmc0g2/2.1.6")
     Else    
If Tranlink = "DB2 v6 Messages and Codes" Then
     Call notesUIWorkspace.URLOpen("http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dsnmc0g3/CCONTENTS")    
     Else
If Tranlink = "DB2 SQL Wait Values v6" Then
     Call notesUIWorkspace.URLOpen("http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dsnmc0g2/APPENDIX1.3.1")          
     Else    
If Tranlink = "DB2 SQL Error Codes v7" Then
Call notesUIWorkspace.URLOpen("http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/DSNMCH11/2.1.6?SHELF=dsnshha2&DT=20010718150520")    
                    Else
                         If Tranlink = "DB2 v7 Messages and Codes" Then
                              Call notesUIWorkspace.URLOpen("http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/DSNMCH11/CCONTENTS?SHELF=dsnshha2&DN=GC26-9940-01&DT=20010718150520")    
                         Else
                              If Tranlink = "DB2 Wait Values v7" Then
                                   Call notesUIWorkspace.URLOpen("http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/DSNMCH11/APPENDIX1.3.1?SHELF=dsnshha2&DT=20010718150520")    
                              Else
                                   If Tranlink = "MVS Abend Codes" Then
                                        Call notesUIWorkspace.URLOpen("http://www.touniteamerica.com/programming/abend-codes.html")    
                                   Else
                                        If Tranlink = "File Status Keys plus VSAM Extended File Status Keys" Then
                                             Call notesUIWorkspace.URLOpen("http://www.simotime.com/vsmfsk01.html")    
                                        Else
                                             If Tranlink = "IBM Bookmgr Bookshelf Manuals on VSAM" Then
                                                  Call notesUIWorkspace.URLOpen("http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/FINDBOOK?filter=vsam")    
                                             Else
                                                  If Tranlink = "Just Enough SQL/QMF/SPUFI" Then
                                                       Call notesUIWorkspace.URLOpen("http://www.touniteamerica.com/doc/jeqmfsql.doc")    
                                                  Else
                                                       
                                                  End If
                                             End If                        
                                        End If                    
                                   End If              
                              End If    
                         End If
                    End If
               End If
          End If
     End If
     
End Sub
The current code above open up a second box already that I would like to keep.  I will attempt this approach as well.  But I would like to field other options first before selecting an answer.
*:)
Thanks !!
ASKER CERTIFIED SOLUTION
Avatar of zvonko
zvonko

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Those redim was not ok.
Take this loop:
i = 0
Forall url In urls
  Redim Preserve tempList(i)
  tempList(i) = Listtag(url)
  i = i + 1
End Forall

As always Zvonko,
You are excellent.  I have applied your version and it works exactly as I wanted.
I Thank you very much.
As Always... your a truely valued resource.
Thanks Again !!
Paul

<:)
Thanks for the points and for the feedback Paul :-)

...but take care not to overpraise me :)

Paul, What is so different about Zvo's comment. I believe my comment was the answer.

Better evaluate the comment fully before you can grade the question.
You could apply for a patent about reading Designer help, then you would not miss even this fifty points <|:)

You shut up.
I Shot The Sheriff... <|:)

Hi paul,
Looks like ive missed quite a discussion here :) its good that ur queries have been met.

Thanks hemanth ill keep it in mind not to suggest an answer. since i dont frequent this site unless in need i was not aware of the locking condition.

my question is still a doubt since a lot of people we know are still suggesting that we stick to notes environment alone saying that it will be able to handle this information. as this is also a customer decesion we have put them thru to some people at IBM. lets see what turns out. meanwhile iam trying to pick up on my DECS and LEI skills :)

cheers,
Jyoti