Basic Script issues

Discuss RoboTask here
Post Reply
tplehman
Posts: 5
Joined: Thu Mar 17, 2005 9:22 am

Basic Script issues

Post by tplehman »

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,
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Basic Script issues

Post by Oleg »

Use the RoboTaskApp object instead of App
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.
Post Reply