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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP to Attachmate EXTRA! 1

Status
Not open for further replies.

Busby

Programmer
May 18, 2005
2
GB
Morning all,
I have used VBA sucessfully to talk from EXCEL to EXTRA, but am now trying to use a web site to talk to EXTRA. I need to convert the EXCEL VBA script I have to VBscript, I think unless someone has a better idea. I only know Classic ASP not ASP.NET. I cannot get past the connection to the system object. It returns an error when i try to create the session and screen objects. This is the EXCEL VBA code to make the connection......
Set system = CreateObject("EXTRA.System") ' Gets the system object
Set sessions = system.sessions
Dim Sess0 As Object
SessName0$ = "CSS.EDP"
Set Sess0 = system.ActiveSession
If Not Sess0.Visible Then Sess0.Visible = True
Set Screen = system.ActiveSession.Screen
Do
rowText$ = Sess0.Screen.Getstring(1, 35, 4)
If rowText$ <> "MAIN" Then
MsgBox "Please put CSS on MAIN MENU Screen, and try again"
GoTo exithere
Else
Exit Do
End If
Loop
When I put it inside the <%.......%> tags it fails on the second line e=when trying to set the session, so I think I need to re-write what I got on VBA to VBScript.
Any help?
Victor
 
If it works at all, you will need to convert the 'CreateObject' calls to 'Server.CreateObject' calls. You will also need to have Attachmate running on the server, and everyone who uses the web site will use the same copy of Attachmate. It might be possible to make Attachmate run on the local machine if you use '<script language="VBScript">' at the start of your code, and '</script>' at the end. Even this may not work, but it is worth a try.
 
Many thanks Apgmer for your thoughts. Its given me something to work on. I've tried a few tries based on your suggestions, but no luck yet. I'll keep trying. Again many thanks for your time and reply. This must be why I havent found any previous posts on any forum, because its too difficult, or maybe it wont work at all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top