×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to open Attachmate using notepad file

How to open Attachmate using notepad file

How to open Attachmate using notepad file

(OP)
I like to open an Excel file and Attachmate mainframe using notepad. Is this possible?

Thanks

RE: How to open Attachmate using notepad file

HI,

Could you explain?

Whatever code you might write in Notepad, needs to either be compiled in an appropriate compiler or run in an interpreter.

???

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: How to open Attachmate using notepad file

(OP)
For example, i put this code below in notepad and saved the file as "Testing.vbs". Now when i double click on this file, excel application and the workbook testA.xlsm opens. I would like to do the same for Mainframe.


Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("C:\testA.xlsm")
objExcel.Application.DisplayAlerts = False
objExcel.Application.Visible = True

RE: How to open Attachmate using notepad file

So do you have Attachmate!Extra or some other terminal emulator?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: How to open Attachmate using notepad file

(OP)
Attachmate!Extra

RE: How to open Attachmate using notepad file

(OP)
Not quite understanding it :(

RE: How to open Attachmate using notepad file

Attachmate HELP is your friend.

I don't have the answer at hand, but I've done this from Excel in the murky past.

1) find the path to your Attachmate!Extra application.

2) find the EB syntax for Open.

So after setting the System object (as per the FAQ) open the application. Then set the Session object. Screen is a property of the Session object.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: How to open Attachmate using notepad file

Okay, IMNSHO, using VB Script in this instance, that is opening Attachmate AND Excel, is a poor choice.

In my experience, I was not a big emulator user except for scraping screens for some of my users. And since I was scraping screens, the target for my scraped data was ALWAYS Excel. Consequently, I ran ALL by screen scrapes from a single Excel workbook, in which I built a system for scraping screens. In that way, that is running in Excel VBA, I could load the Attachmate Object Library. Here are some snippets from the code from my Attachmate module in that workbook...

CODE

Option Explicit
'you must have a reference set for Attachmate EXTRA! n.m Object Library
'runs with Form ufmPassword
'declare Public variables

Public oSystem As ExtraSystem
Public oSessions As ExtraSessions
Public oSess As ExtraSession
Public oScrn As ExtraScreen
Public vPassword
Public sCurrentScreenName As String 

CODE

Sub IMS_Login()

    Dim result, bLogin As Boolean
    
    Set oSystem = CreateObject("Extra.System")
    
    If oSystem.Sessions.Count = 0 Then
        Set oSess = oSystem.Sessions.Open("C:\Program Files\E!PC\Sessions\Mainframe.edp")
        ufmPassword.Show
        bLogin = True
    Else
        Set oSess = oSystem.ActiveSession
        bLogin = False
    End If
'....
'other stuff
End Sub 

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: How to open Attachmate using notepad file

(OP)
Thanks SkipVought, that makes more sense. Let me give this a try

RE: How to open Attachmate using notepad file

(OP)
Hey Skip, i have this code below. however, when it tries to close it, there is a pop up box asking me if i want to disconnect sessions Mainframe. I just want it to close without having to click on yes or no.


Sub test()
Set oSystem = CreateObject("Extra.System")
Set oSess = oSystem.Sessions.Open("C:\EXTRABAK\SSL - Mainframe.edp")
oSess.Visible = True
oSess.Close
End Sub

RE: How to open Attachmate using notepad file

Have you checked EB HELP?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: How to open Attachmate using notepad file

(OP)
sorry skip but what do u mean?

RE: How to open Attachmate using notepad file

Extra Basic HELP. Lots of good stuff including code examples.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: How to open Attachmate using notepad file

(OP)
Looking but cant seem to find what im looking for. even looked under Macros. dont have any examples

RE: How to open Attachmate using notepad file

(OP)
got it :)

just turned off the prompts under Options | Global Preferences

RE: How to open Attachmate using notepad file

Did you find and open HELP?

What search term did you use?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close