Can you enlighten me on why I am getting the following error:0
Method or property not found. Line 12 Col 14 ""
as a result of running the following Basic Script as a Task with nothing else in it:
Sub Main
Dim FileName As String
Dim TempString As String
FileName = "C:\test.tsk"
Open FileName For Input As #1
While Not EOF(1)
Line Input #1, S$
If InStr(S$,"Name=STRING|") Then
TempString = Mid(S$,14,)
If Mid(TempString,8,) = "no_auto_" Then
Else
App.SetUserVariable("TASK_NAME_FROM_ FILE",TempString)
MsgBox "Set TASK_NAME_FROM_FILE = " & TempString
End If
End If
Wend
Close #1
End Sub
The script runs fine in the Sax Basic IDE, and it doesn't seem to matter whether the script is internal or external.
Thanks,
Basic Script issues
Basic Script issues
Use the RoboTaskApp object instead of App
Write it so:
RoboTaskApp.SetUserVariable("TASK_NAME_FROM_ FILE",TempString)
Write it so:
RoboTaskApp.SetUserVariable("TASK_NAME_FROM_ FILE",TempString)
Last edited by Oleg on Tue Mar 22, 2005 4:46 am, edited 1 time in total.