How To Get Vbscript To Run When Print Button Pressed S’abonner

0
Avatar
Legacy Poster

Hi, 

 

I am trialing out what BerTender is capable for me,

I have a basic template and entry for with two data entries/labels.

 

As i press print i want to:

1. print the label (Easy)

2. Send a message through VBS to an system so that it knows my label and barcode exists.

 

The VB script is fine my question is how do i get it to run at the same time as i press print on my entry form?

 

Thanks, 

 

Michael

4 commentaires

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Have you tried selecting the "Event Control Scripts" script type and then putting the script into the "OnPostPrompt" event?

0
Avatar
Diego Vazquez
Actions pour les commentaires Permalien

hi, you can try it?

 

CAn you explain my where i need put a scipt to sum 2 variablers when i click a button?

0
Avatar
Pete Thane
Actions pour les commentaires Permalien

Please see the screenshot below for the VB Script.

 

1 If both of the variables to be added come from a Database then skip to 4 below or if one comes from a variable skip step 3.

2. For a none database field use the Change Data Source Name button to give the field a name, I called my two fields InputOne and InputTwo

3. Repeat this process for the other non database field giving this field a different name

4. For your sum field, make the field a Visual Basic Script field with an Event Controlled script type and then press the edit button.

5. Optional, for the On Autoselected Event script you may want to change the Value = "Sample Text" to something more appropriate to say "Value" = 99 for example

6. As shown in the image at the top, in the left hand column click on the OnIdenticalCopies option and in the central box enter the code as shown above. Please note after the ValueX = Int(   instead of typing in the information as above instead click on either the name of the Named Data Source from the column in the right or else the name of the database field  that contains the data as these will appear in this column too when the label is linked to a database. Make sure to add the ) afterwards.

7. Click Close and then you are done.

 

I hope this helps

 

0
Avatar
Diego Vazquez
Actions pour les commentaires Permalien

thanks you so much, this post works great for my!

I can sum variables, but this works when print a job, not when press a button.

I have an idea, use a action when press a putton to save a charecter in a variable. (like %Presed% = S)

and a second action to print the job

 

How i can acces to varaible in VBScript

Vous devez vous connecter pour laisser un commentaire.