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

HOw to kill/terminate EBMNGR.EXE from attachmate macro

Status
Not open for further replies.

robles74

Programmer
Jan 31, 2014
16
MX
Hi everyone.

For some strange reason a macro runs fine under Attachmate Extra! 6.5, but in Attachmate Extra! Enterprise 7.1 does not.

Digging here (in Tek-Tips) find a solution for some reason the EBMNGR.EXE does not run properly then I have a idea "why not execute the .exe from the macro??" voila that's work, but I look in the task manager and every time the macro runs populates one more instance of the EBMNGR.EXE, the question is how can I terminate the EBMNGR.EXE's before the macro runs again, by the way this macro was assigned to the enter key. Here is my attempt.


Code:
'***Excel Declr*****
        ' Dim xl As Object, xl_workbook As Object, xl_sheet As Object
 '*******************
declare sub gatherinfo(g as integer)


Sub Main
RESET


'--------------------------------------------------------------------------------
' Get the main system object
	Dim Sessions As Object
	Dim System As Object
 
Dim StrtEbm
StrtEbm = Shell("C:\Program Files\Attachmate\E!E2K\ebmngr.exe")
 
 	Set System = CreateObject("EXTRA.System")	' Gets the system object
	If (System is Nothing) Then
		Msgbox "Could not create the EXTRA System object.  Stopping macro playback."
		STOP
	End If
	Set Sessions = System.Sessions

	If (Sessions is Nothing) Then
		Msgbox "Could not create the Sessions collection object.  Stopping macro playback."
		STOP
	End If
'--------------------------------------------------------------------------------
' Set the default wait timeout value
	SettleTime% = 200		' milliseconds
        TOvalue& = 300000
	OldSystemTimeout& = System.TimeoutValue
	If (TOvalue& > OldSystemTimeout) Then
		System.TimeoutValue = TOvalue&
	End If
 ' Get the necessary Session Object
	Dim Sess0 As Object
	Set Sess0 = System.ActiveSession
	If (Sess0 is Nothing) Then
		Msgbox "Could not create the Session object.  Stopping macro playback."
		STOP
	End If

Any help will be really appreciated.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top