Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any way to fire an Extra! macro from a web page?

Status
Not open for further replies.

RussellJNile

Programmer
Mar 10, 2006
3
US
We would like to be able to embed a link in a web page that actually can start up a macro. Ideally the macro can open up a window, login and then navigate to the appropriate screen. Any ideas on how we could to that?
 
Depends on your skill level. It can be done. What part specifically are you asking for help with? What language are you writing the macro in? Are you going to run the login macro serverside or client side? If client side, this is the right Forum for your Macro (this forum covers vb vba and eb interaction with attachmate/extra) but there are Forums more appropriate for html hta questions, so you'll want to decide what your questions are specifically and then decide where to ask them.

We would like to be able to embed a link in a web page that actually can start up a macro. Ideally the macro can open up a window, login and then navigate to the appropriate screen.

This can be done through VBS or Java on your web page, or through VB EB or other language shelled through by your web page. Have you got a start on any of this?
 
Skip using EB for this. You'll have the same, if not more, functionality using VB or JavaScript and you don't have to link to an outside file.

If all of your users are using IE, then use VB. It has a shorter learning curve, it's very similar to EB, and some things can be done in fewer lines of code than it takes in JavaScript.

If some of your users use a browser other than IE, you'll want to code only in JavaScript.

Here's a vbscript to get you started.
Code:
<script type="text/vbscript">
Sub Window_OnLoad
set objExtra = CreateObject("Extra.System")
set objSess = objExtra.ActiveSession
If objSess is Nothing then
    MsgBox "No session available.",0,"Program Halted"
Else
    set objScreen = objSess.Screen
    objScreen.PutString "Text to input",1,1
End If
Set objScreen = Nothing
Set objSess = Nothing
Set objExtra = Nothing
End Sub</script>

This will run when the page loads. You could set it to run at a different time by using a different event to trigger it.
 
Folks,

Thanks both of you for the prompt reply. These will be web pages that we emit from a Websphere portal and, because I don't want to be locked in to IE I'd like to pursue the Javascript option if possible.

We have not even started on this yet so we have all the flexibility we need.

Any Javascript examples would be very helpful...
 
Oh; I forgot; these macros will be running on the client side. It (hopefully) will enable us to embed links in our pages so they can just click and it will get the to the appropriate green screen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top