Skip to main content

Hello!! Hoping Someone Can Help Currently I'm using the below script to request information "UNIT" AND "UPC" Perform task and then loop back and continue. However the values created in the original MSGASK stay populated after looping and Prompting the MSGASK again, how can i clear the data in the MSGASK once its been used before looping so that the new MSGASK is empty? Below is code currently working with. PLEASEEE HELP!

Sub Main
'Auto Packing Via UPC, With Label Print'
'''''''''''''''''''Paramaters''''''''''''''''''''''''''''''
Dim Data1 As String
Dim RowRes As Integer
Dim ColRes As Integer
Dim Value As String
Dim Password As String
Dim User As String
Dim UPC As String
Dim Unit As String
Dim ELC As String
EMSetTN5250 "***.**.**.**",23,2, "COLOR"
Dim Wave As String
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''Opening 2 Sessions With Login''''''''''''
EMStartSession "*","DC4BRN"
EMConnect "DC4BRN"
MsgAsk "User :",User, 10
MsgAskPassword "Password :",Password,10
EMSendKey User
EMSendKey "<TAB>"
EMSendKeyPassword Password
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMStartSession "*","DC4BRN1"
EMConnect "DC4BRN1"
EMSendKey "BRNVAR10"
EMSendKey "<TAB>"
EMSendKey "BRNVAR10"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
'''''''''''''''''''''''''''Assign Alias''''''''''''''''''''''''''''''''''''
EMAssignAlias "Temporary Session #1", "S1"
EMAssignAlias "Temporary Session #2", "S2"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''MBLD Setup''''''''''''''''''''''''''''''''''''
EMActivate "S1"
MsgAsk "Enter Wave Number :", Wave, 3
EMSetCursor 6,43
EMSendKey "MBLD"
EMSendKey "<Enter>"
EMSetCursor 5,8
EMSendKey Wave
EmSendKey "<Tab>"
EmSendKey "AMANUALBLD15"
EMSendKey "<Enter>"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''Varsity Setup''''''''''''''''''''''''''''''''''
EMActivate "S2"
EMSetCursor 6,43
EMSendKey "PCL"
EMSendKey "<Enter>"
'''''''''''''''''''''''''''Packing Process'''''''''''''''''''''''''''''
LabelPack:
EMActivate "S1"
MsgAsk "Scan Unit :" , Unit, 12
MsgAsk "Scan UPC :" , UPC, 12
EMSendKey UPC
EMSendKey "<Enter>"

'''''''''''''''Need To Add A Check For ELC''''''''''''''''''''''
LabelContinue:
EMSendKey "<Tab>"
EMSendKey "<Tab>"
EMSendKey "1"
EMSendKey "<Enter>"
EMSendKey Unit
EmSendKey UPC
EMSendKey "<Enter>"
'''''''''''''''Need To Add Read Screen For ELC Completion''''''''''''''''
EmSendKey "<PF11>"
EMSendKey "CO1"
EMSendKey "<Enter>"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''Running Varsity For Packed Unit'''''''''''''''''''''
EMActivate "S2"
EMSendKey Unit
EMSendKey "<Enter>"
EMSendKey "<Enter>"
EMSendKey "<PF3>"
Erase Unit
Erase UPC
GoTo LabelPack
LabelStop:
MsgBox "Error"
''''''''''''''''''''Add Read Screen For Packing List/Errors''''''''''''''''''''
''''''''''''''''''''''''Add A Loop To Unitll Wave Complete'''''''''''''''''''''''

 

 

 


End Sub


#Script
#Rumba
#scriptEditor

Hello!! Hoping Someone Can Help Currently I'm using the below script to request information "UNIT" AND "UPC" Perform task and then loop back and continue. However the values created in the original MSGASK stay populated after looping and Prompting the MSGASK again, how can i clear the data in the MSGASK once its been used before looping so that the new MSGASK is empty? Below is code currently working with. PLEASEEE HELP!

Sub Main
'Auto Packing Via UPC, With Label Print'
'''''''''''''''''''Paramaters''''''''''''''''''''''''''''''
Dim Data1 As String
Dim RowRes As Integer
Dim ColRes As Integer
Dim Value As String
Dim Password As String
Dim User As String
Dim UPC As String
Dim Unit As String
Dim ELC As String
EMSetTN5250 "***.**.**.**",23,2, "COLOR"
Dim Wave As String
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''Opening 2 Sessions With Login''''''''''''
EMStartSession "*","DC4BRN"
EMConnect "DC4BRN"
MsgAsk "User :",User, 10
MsgAskPassword "Password :",Password,10
EMSendKey User
EMSendKey "<TAB>"
EMSendKeyPassword Password
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMStartSession "*","DC4BRN1"
EMConnect "DC4BRN1"
EMSendKey "BRNVAR10"
EMSendKey "<TAB>"
EMSendKey "BRNVAR10"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
'''''''''''''''''''''''''''Assign Alias''''''''''''''''''''''''''''''''''''
EMAssignAlias "Temporary Session #1", "S1"
EMAssignAlias "Temporary Session #2", "S2"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''MBLD Setup''''''''''''''''''''''''''''''''''''
EMActivate "S1"
MsgAsk "Enter Wave Number :", Wave, 3
EMSetCursor 6,43
EMSendKey "MBLD"
EMSendKey "<Enter>"
EMSetCursor 5,8
EMSendKey Wave
EmSendKey "<Tab>"
EmSendKey "AMANUALBLD15"
EMSendKey "<Enter>"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''Varsity Setup''''''''''''''''''''''''''''''''''
EMActivate "S2"
EMSetCursor 6,43
EMSendKey "PCL"
EMSendKey "<Enter>"
'''''''''''''''''''''''''''Packing Process'''''''''''''''''''''''''''''
LabelPack:
EMActivate "S1"
MsgAsk "Scan Unit :" , Unit, 12
MsgAsk "Scan UPC :" , UPC, 12
EMSendKey UPC
EMSendKey "<Enter>"

'''''''''''''''Need To Add A Check For ELC''''''''''''''''''''''
LabelContinue:
EMSendKey "<Tab>"
EMSendKey "<Tab>"
EMSendKey "1"
EMSendKey "<Enter>"
EMSendKey Unit
EmSendKey UPC
EMSendKey "<Enter>"
'''''''''''''''Need To Add Read Screen For ELC Completion''''''''''''''''
EmSendKey "<PF11>"
EMSendKey "CO1"
EMSendKey "<Enter>"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''Running Varsity For Packed Unit'''''''''''''''''''''
EMActivate "S2"
EMSendKey Unit
EMSendKey "<Enter>"
EMSendKey "<Enter>"
EMSendKey "<PF3>"
Erase Unit
Erase UPC
GoTo LabelPack
LabelStop:
MsgBox "Error"
''''''''''''''''''''Add Read Screen For Packing List/Errors''''''''''''''''''''
''''''''''''''''''''''''Add A Loop To Unitll Wave Complete'''''''''''''''''''''''

 

 

 


End Sub


#Script
#Rumba
#scriptEditor
Hi Dumbfounded (love the name by the way !!),

If you set the UNIT and UPC variables to empty strings on each iteration of the loop, that should clear the prompt.

so change

LabelPack:
EMActivate "S1"
MsgAsk "Scan Unit :" , Unit, 12
MsgAsk "Scan UPC :" , UPC, 12
EMSendKey UPC
EMSendKey "<Enter>"

to

LabelPack:
EMActivate "S1"
Unit = ""
MsgAsk "Scan Unit :" , Unit, 12
UPC = ""
MsgAsk "Scan UPC :" , UPC, 12
EMSendKey UPC
EMSendKey "<Enter>"

and see if that sorts your issue.

Regards,
Tom

Hello!! Hoping Someone Can Help Currently I'm using the below script to request information "UNIT" AND "UPC" Perform task and then loop back and continue. However the values created in the original MSGASK stay populated after looping and Prompting the MSGASK again, how can i clear the data in the MSGASK once its been used before looping so that the new MSGASK is empty? Below is code currently working with. PLEASEEE HELP!

Sub Main
'Auto Packing Via UPC, With Label Print'
'''''''''''''''''''Paramaters''''''''''''''''''''''''''''''
Dim Data1 As String
Dim RowRes As Integer
Dim ColRes As Integer
Dim Value As String
Dim Password As String
Dim User As String
Dim UPC As String
Dim Unit As String
Dim ELC As String
EMSetTN5250 "***.**.**.**",23,2, "COLOR"
Dim Wave As String
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''Opening 2 Sessions With Login''''''''''''
EMStartSession "*","DC4BRN"
EMConnect "DC4BRN"
MsgAsk "User :",User, 10
MsgAskPassword "Password :",Password,10
EMSendKey User
EMSendKey "<TAB>"
EMSendKeyPassword Password
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMStartSession "*","DC4BRN1"
EMConnect "DC4BRN1"
EMSendKey "BRNVAR10"
EMSendKey "<TAB>"
EMSendKey "BRNVAR10"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
'''''''''''''''''''''''''''Assign Alias''''''''''''''''''''''''''''''''''''
EMAssignAlias "Temporary Session #1", "S1"
EMAssignAlias "Temporary Session #2", "S2"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''MBLD Setup''''''''''''''''''''''''''''''''''''
EMActivate "S1"
MsgAsk "Enter Wave Number :", Wave, 3
EMSetCursor 6,43
EMSendKey "MBLD"
EMSendKey "<Enter>"
EMSetCursor 5,8
EMSendKey Wave
EmSendKey "<Tab>"
EmSendKey "AMANUALBLD15"
EMSendKey "<Enter>"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''Varsity Setup''''''''''''''''''''''''''''''''''
EMActivate "S2"
EMSetCursor 6,43
EMSendKey "PCL"
EMSendKey "<Enter>"
'''''''''''''''''''''''''''Packing Process'''''''''''''''''''''''''''''
LabelPack:
EMActivate "S1"
MsgAsk "Scan Unit :" , Unit, 12
MsgAsk "Scan UPC :" , UPC, 12
EMSendKey UPC
EMSendKey "<Enter>"

'''''''''''''''Need To Add A Check For ELC''''''''''''''''''''''
LabelContinue:
EMSendKey "<Tab>"
EMSendKey "<Tab>"
EMSendKey "1"
EMSendKey "<Enter>"
EMSendKey Unit
EmSendKey UPC
EMSendKey "<Enter>"
'''''''''''''''Need To Add Read Screen For ELC Completion''''''''''''''''
EmSendKey "<PF11>"
EMSendKey "CO1"
EMSendKey "<Enter>"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''Running Varsity For Packed Unit'''''''''''''''''''''
EMActivate "S2"
EMSendKey Unit
EMSendKey "<Enter>"
EMSendKey "<Enter>"
EMSendKey "<PF3>"
Erase Unit
Erase UPC
GoTo LabelPack
LabelStop:
MsgBox "Error"
''''''''''''''''''''Add Read Screen For Packing List/Errors''''''''''''''''''''
''''''''''''''''''''''''Add A Loop To Unitll Wave Complete'''''''''''''''''''''''

 

 

 


End Sub


#Script
#Rumba
#scriptEditor
Hi Dumbfounded (love the name by the way !!),

If you set the UNIT and UPC variables to empty strings on each iteration of the loop, that should clear the prompt.

so change

LabelPack:
EMActivate "S1"
MsgAsk "Scan Unit :" , Unit, 12
MsgAsk "Scan UPC :" , UPC, 12
EMSendKey UPC
EMSendKey "<Enter>"

to

LabelPack:
EMActivate "S1"
Unit = ""
MsgAsk "Scan Unit :" , Unit, 12
UPC = ""
MsgAsk "Scan UPC :" , UPC, 12
EMSendKey UPC
EMSendKey "<Enter>"

and see if that sorts your issue.

Regards,
Tom

Hello!! Hoping Someone Can Help Currently I'm using the below script to request information "UNIT" AND "UPC" Perform task and then loop back and continue. However the values created in the original MSGASK stay populated after looping and Prompting the MSGASK again, how can i clear the data in the MSGASK once its been used before looping so that the new MSGASK is empty? Below is code currently working with. PLEASEEE HELP!

Sub Main
'Auto Packing Via UPC, With Label Print'
'''''''''''''''''''Paramaters''''''''''''''''''''''''''''''
Dim Data1 As String
Dim RowRes As Integer
Dim ColRes As Integer
Dim Value As String
Dim Password As String
Dim User As String
Dim UPC As String
Dim Unit As String
Dim ELC As String
EMSetTN5250 "***.**.**.**",23,2, "COLOR"
Dim Wave As String
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''Opening 2 Sessions With Login''''''''''''
EMStartSession "*","DC4BRN"
EMConnect "DC4BRN"
MsgAsk "User :",User, 10
MsgAskPassword "Password :",Password,10
EMSendKey User
EMSendKey "<TAB>"
EMSendKeyPassword Password
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMStartSession "*","DC4BRN1"
EMConnect "DC4BRN1"
EMSendKey "BRNVAR10"
EMSendKey "<TAB>"
EMSendKey "BRNVAR10"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
EMSendKey "<ENTER>"
'''''''''''''''''''''''''''Assign Alias''''''''''''''''''''''''''''''''''''
EMAssignAlias "Temporary Session #1", "S1"
EMAssignAlias "Temporary Session #2", "S2"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''MBLD Setup''''''''''''''''''''''''''''''''''''
EMActivate "S1"
MsgAsk "Enter Wave Number :", Wave, 3
EMSetCursor 6,43
EMSendKey "MBLD"
EMSendKey "<Enter>"
EMSetCursor 5,8
EMSendKey Wave
EmSendKey "<Tab>"
EmSendKey "AMANUALBLD15"
EMSendKey "<Enter>"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''Varsity Setup''''''''''''''''''''''''''''''''''
EMActivate "S2"
EMSetCursor 6,43
EMSendKey "PCL"
EMSendKey "<Enter>"
'''''''''''''''''''''''''''Packing Process'''''''''''''''''''''''''''''
LabelPack:
EMActivate "S1"
MsgAsk "Scan Unit :" , Unit, 12
MsgAsk "Scan UPC :" , UPC, 12
EMSendKey UPC
EMSendKey "<Enter>"

'''''''''''''''Need To Add A Check For ELC''''''''''''''''''''''
LabelContinue:
EMSendKey "<Tab>"
EMSendKey "<Tab>"
EMSendKey "1"
EMSendKey "<Enter>"
EMSendKey Unit
EmSendKey UPC
EMSendKey "<Enter>"
'''''''''''''''Need To Add Read Screen For ELC Completion''''''''''''''''
EmSendKey "<PF11>"
EMSendKey "CO1"
EMSendKey "<Enter>"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''Running Varsity For Packed Unit'''''''''''''''''''''
EMActivate "S2"
EMSendKey Unit
EMSendKey "<Enter>"
EMSendKey "<Enter>"
EMSendKey "<PF3>"
Erase Unit
Erase UPC
GoTo LabelPack
LabelStop:
MsgBox "Error"
''''''''''''''''''''Add Read Screen For Packing List/Errors''''''''''''''''''''
''''''''''''''''''''''''Add A Loop To Unitll Wave Complete'''''''''''''''''''''''

 

 

 


End Sub


#Script
#Rumba
#scriptEditor

Tom!

Thanks lol at the time of making this it was the perfect name.

This is perfect acts just as i need it too, i'm very new to writing script and Rumba inst always the most helpful! You sir are a life saver!!

Thanks A ton!