Skip to main content

I am trying to be able to launch script from a .BAT file and am using the script editor to connect to the session, run the script, and then disconnect.

I am able to connect, run through the script, and even disconnect.  The issue is when I try and use EMDisconnectExit instead of EMDisconnect, a promt comes up telling me "There are still connected sessions.  Do you wish to continue?"  Is there a way to make sure this message doesn't show up so I can close out of Rumba smoothly?  Better yet, is there a possible way to run script and communicate with the server without even launching Rumba?

Thanks in advance!

 

Sub Main
 Dim Result as Integer
 EMSetTN5250 {SERVERNAME},23,2, "COLOR"
 EMStartSession "*", "New"
 EMSendKey {USERNAME}
 EMSetCursor 7,53
 EMSendKey {PASSWORD}
 EMSendKey "<Field_Plus>"
 EMSendKey "<Enter>"
 EMSendKey "90"
 EMSendKey "<Field_Plus>"
 EMSendKey "<Enter>"
 SysDelay 1
 EMDisconnectExit "New"
End Sub


#Rumba
#Rumba8.2
#RUMBASCRIPTTIMEOUT

I am trying to be able to launch script from a .BAT file and am using the script editor to connect to the session, run the script, and then disconnect.

I am able to connect, run through the script, and even disconnect.  The issue is when I try and use EMDisconnectExit instead of EMDisconnect, a promt comes up telling me "There are still connected sessions.  Do you wish to continue?"  Is there a way to make sure this message doesn't show up so I can close out of Rumba smoothly?  Better yet, is there a possible way to run script and communicate with the server without even launching Rumba?

Thanks in advance!

 

Sub Main
 Dim Result as Integer
 EMSetTN5250 {SERVERNAME},23,2, "COLOR"
 EMStartSession "*", "New"
 EMSendKey {USERNAME}
 EMSetCursor 7,53
 EMSendKey {PASSWORD}
 EMSendKey "<Field_Plus>"
 EMSendKey "<Enter>"
 EMSendKey "90"
 EMSendKey "<Field_Plus>"
 EMSendKey "<Enter>"
 SysDelay 1
 EMDisconnectExit "New"
End Sub


#Rumba
#Rumba8.2
#RUMBASCRIPTTIMEOUT

To avoid the prompt try to enable the Auto Disconnect option. (Connection ->configure->General).
And disable "Ask to save Session Profile on exit" (Options->Rumba options -> Session Profile)

 Try the EMStartSessionandHide "*", "New"  to hide the Session

cheers


I am trying to be able to launch script from a .BAT file and am using the script editor to connect to the session, run the script, and then disconnect.

I am able to connect, run through the script, and even disconnect.  The issue is when I try and use EMDisconnectExit instead of EMDisconnect, a promt comes up telling me "There are still connected sessions.  Do you wish to continue?"  Is there a way to make sure this message doesn't show up so I can close out of Rumba smoothly?  Better yet, is there a possible way to run script and communicate with the server without even launching Rumba?

Thanks in advance!

 

Sub Main
 Dim Result as Integer
 EMSetTN5250 {SERVERNAME},23,2, "COLOR"
 EMStartSession "*", "New"
 EMSendKey {USERNAME}
 EMSetCursor 7,53
 EMSendKey {PASSWORD}
 EMSendKey "<Field_Plus>"
 EMSendKey "<Enter>"
 EMSendKey "90"
 EMSendKey "<Field_Plus>"
 EMSendKey "<Enter>"
 SysDelay 1
 EMDisconnectExit "New"
End Sub


#Rumba
#Rumba8.2
#RUMBASCRIPTTIMEOUT

Thanks for the quick response aescudero.  

The connection configuration is only available on an established Session.  I am not sure how I can edit and save the settings of the temporart session that is launched each time with this code.  Can I replace the * in EMStartSession "*", "New" with the name of an actual session name?  Does it need to include the entire filepath, or just the name of a session saved to the default folder?


I am trying to be able to launch script from a .BAT file and am using the script editor to connect to the session, run the script, and then disconnect.

I am able to connect, run through the script, and even disconnect.  The issue is when I try and use EMDisconnectExit instead of EMDisconnect, a promt comes up telling me "There are still connected sessions.  Do you wish to continue?"  Is there a way to make sure this message doesn't show up so I can close out of Rumba smoothly?  Better yet, is there a possible way to run script and communicate with the server without even launching Rumba?

Thanks in advance!

 

Sub Main
 Dim Result as Integer
 EMSetTN5250 {SERVERNAME},23,2, "COLOR"
 EMStartSession "*", "New"
 EMSendKey {USERNAME}
 EMSetCursor 7,53
 EMSendKey {PASSWORD}
 EMSendKey "<Field_Plus>"
 EMSendKey "<Enter>"
 EMSendKey "90"
 EMSendKey "<Field_Plus>"
 EMSendKey "<Enter>"
 SysDelay 1
 EMDisconnectExit "New"
End Sub


#Rumba
#Rumba8.2
#RUMBASCRIPTTIMEOUT

Thanks for the quick response aescudero.  

The connection configuration is only available on an established Session.  I am not sure how I can edit and save the settings of the temporart session that is launched each time with this code.  Can I replace the * in EMStartSession "*", "New" with the name of an actual session name?  Does it need to include the entire filepath, or just the name of a session saved to the default folder?


I am trying to be able to launch script from a .BAT file and am using the script editor to connect to the session, run the script, and then disconnect.

I am able to connect, run through the script, and even disconnect.  The issue is when I try and use EMDisconnectExit instead of EMDisconnect, a promt comes up telling me "There are still connected sessions.  Do you wish to continue?"  Is there a way to make sure this message doesn't show up so I can close out of Rumba smoothly?  Better yet, is there a possible way to run script and communicate with the server without even launching Rumba?

Thanks in advance!

 

Sub Main
 Dim Result as Integer
 EMSetTN5250 {SERVERNAME},23,2, "COLOR"
 EMStartSession "*", "New"
 EMSendKey {USERNAME}
 EMSetCursor 7,53
 EMSendKey {PASSWORD}
 EMSendKey "<Field_Plus>"
 EMSendKey "<Enter>"
 EMSendKey "90"
 EMSendKey "<Field_Plus>"
 EMSendKey "<Enter>"
 SysDelay 1
 EMDisconnectExit "New"
End Sub


#Rumba
#Rumba8.2
#RUMBASCRIPTTIMEOUT

Thanks for the quick response aescudero.  

The connection configuration is only available on an established Session.  I am not sure how I can edit and save the settings of the temporart session that is launched each time with this code.  Can I replace the * in EMStartSession "*", "New" with the name of an actual session name?  Does it need to include the entire filepath, or just the name of a session saved to the default folder?


I am trying to be able to launch script from a .BAT file and am using the script editor to connect to the session, run the script, and then disconnect.

I am able to connect, run through the script, and even disconnect.  The issue is when I try and use EMDisconnectExit instead of EMDisconnect, a promt comes up telling me "There are still connected sessions.  Do you wish to continue?"  Is there a way to make sure this message doesn't show up so I can close out of Rumba smoothly?  Better yet, is there a possible way to run script and communicate with the server without even launching Rumba?

Thanks in advance!

 

Sub Main
 Dim Result as Integer
 EMSetTN5250 {SERVERNAME},23,2, "COLOR"
 EMStartSession "*", "New"
 EMSendKey {USERNAME}
 EMSetCursor 7,53
 EMSendKey {PASSWORD}
 EMSendKey "<Field_Plus>"
 EMSendKey "<Enter>"
 EMSendKey "90"
 EMSendKey "<Field_Plus>"
 EMSendKey "<Enter>"
 SysDelay 1
 EMDisconnectExit "New"
End Sub


#Rumba
#Rumba8.2
#RUMBASCRIPTTIMEOUT

You're right. The best is to use a pre configured Profile.

If the Profile is in the same Location as the script then no path is required.

. For  a Profile stored in a specific location a fully qualified path can be used.

Example: "C:\\My Documents\\Hosts\\RUMBA.rsdm"

Example:

Sub Main

  EMStartSession "c:\\temp\\MyRUMBA.rsdm","SESSION1"

     'Place emulation commands and script code here.

  EMDisconnectExit  "SESSION1"  

End Sub