VBS a proměnné

Oliver Andrasy

VBS a proměnné
« kdy: 20. 03. 2018, 09:13:24 »
Dobry den.
Mam problem s VBS. Potrebujem pozmenit jeden script ale VBS je pre mna spanielska dedina.
Kód: [Vybrat]
dim data_convertor
' Run is called every execution cycle
'
Sub Run
on error resume next
Dim BCType
data_convertor = g_BCRTool.DecodedString
BCType=ThisTool.Data1 'Passes the Barcode type to perform the parsing
If g_BCRTool.GoodScans > 0 Then 'The process will only run if the BCR tool is able to decoded the 1D barcode

                           data_convertor = g_OCVTool.MatchString 'OCV tool get the decoded string from the BCR tool
ThisTool.Pass "Parsing Operation Succeed:" &vbCr&vbLf&data_convertor

Else
ThisTool.Fail "Unreadable Barcode", 1
End if
 

Idea je jednoducha do data_convertor chcem presunut premennu s g_BCRTool.DecodedString a nasledne ju trosku upravit a porovnat s g_OCVTool.MatchString. Ale nechce mi to presunut premennu g_BCRTool.DecodedString do data_convertor. Sedim nad tym od 5-tej a asi je toho na dnes uz vela proste neviem na to prist.
Dakujem za pomoc
« Poslední změna: 20. 03. 2018, 12:30:49 od Petr Krčmář »


Oliver Andrasy

Re:VBS a premenne
« Odpověď #1 kdy: 20. 03. 2018, 09:55:38 »
Kód: [Vybrat]
If data_convertor = g_OCVTool.MatchString Then

                         
ThisTool.Pass "Parsing Operation Succeed:" &vbCr&vbLf&data_convertor

Else
ThisTool.Fail "Unreadable Barcode", 1

Upravil som to takto ale nefunguje to akoby data_convertor nemal ziadnu hodnotu. Aj ked script zbehne v poriadku vypuise to len Parsing Operation Succed ale bez dat s data_convertor.