Solved

Converting Attachmate X-tra to Reflection 14 within Powerbuilder 10.5 (getstring?)

Posted on 2009-05-18
4
706 Views
Last Modified: 2013-12-20
I am trying to convert my Powerbuilder application from using OLE Attachmate Extra to Reflection 14.  I noticed that I cannot use the same script that I've used before.  I've found equivalent functions that can replace my other functions.  Unfortunately, I can't find anything to replace the GETSTRING().  IF lole_session.GetString(1,73,4) <> "FMSP" does not work.  Can anyone assist? I've attached a brief code snipet below.
I get "Error calling external object function getstring" on the getstring() calls.
lole_session = CREATE uos_oleobject
IF lole_session.ConnectToObject(lstr_fms_fname) <> 0 THEN
	fpub_got_error("COW0190059", "fpvt_access_fms", "")
	return -1
END IF
 
IF NOT lole_session.IsAlive() THEN
//IF NOT lole_session.Visible THEN
   // FMS session does not exist. Show message to the user that they need to login	
	fpub_got_error("COW0190053", "fpvt_access_fms", "")
	lole_session.Visible = TRUE
	Return -1
END IF
//lole_screen =  lole_session.GetActiveSession()
//lole_screen = fpub_uos_oleobject(lole_session.Screen)
 
//Make sure user is on a valid menu
IF lole_session.GetString(1,73,4) <> "FMSP" AND &
	lole_session.GetString(1,25,12) <> "NVi/TPX MENU" AND &
	lole_session.GetString(1,26,22) <> "DMS/VS SECURITY SYSTEM" THEN
	// Show message to the user that they need to login
   fpub_got_error("COW0190060", "fpvt_access_fms", "")
   Return -1
END IF
 
//Get to the main menu if not there
//IF lole_screen.GetString(1, 25, 12) <> "NVi/TPX MENU" THEN
IF lole_session.GetString(1, 25, 12) <> "NVi/TPX MENU" THEN
	lole_session.TransmitTerminalKey(277)
	lole_session.TransmitANSI( "cssf logoff")
	lole_session.TransmitTerminalKey(289)
//	lole_screen.SendKeys("<Clear>")
//	lole_screen.SendKeys("cssf logoff<Enter>")
END IF

Open in new window

0
Comment
Question by:rtgreen79
  • 2
  • 2
4 Comments
 
LVL 14

Expert Comment

by:sandeep_patel
ID: 24414184
I think getstring is trying to read data from excel. You must need to find similar function or approach in reflection. Without that it will not work because GetString is perticular OLE function not the PB function.

Regards,
Sandeep
0
 

Author Comment

by:rtgreen79
ID: 24414308
Thank you for the response.  I am trying to access an IBM 3270 reflection session from within a powerbuilder oleobject.  The code worked for an Attachmate Extra session.  I am trying to convert the code to access an attachment reflection 14 session.  I could not find any really good documentation on the topic of reading the screen with reflection 14.  

I believe you are right.  The getstring is not valid for the reflection session.  I am looking for an equivalent function.
0
 
LVL 14

Assisted Solution

by:sandeep_patel
sandeep_patel earned 20 total points
ID: 24415216
You should be able to see all the functions, events and properties of Reflection OLE under PB's object browser > OLE Tab

Check if you see something similar there....

Regards,
Sandeep
0
 

Accepted Solution

by:
rtgreen79 earned 0 total points
ID: 24415400
Thank you for your help.  I found the function that I was looking for GetDisplayText(Reflection) can be used in place of GetString(Extra).
.GetDisplayText(1, 1, .DisplayColumns * .DisplayRows)
      
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
youtube.com - search 3 118
Reference external folders in Visual Studio 4 81
Java Help 2 84
Recommendation vb6 to vb.net or others 14 142
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now