| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Wed Mar 03, 2004 7:00 am Post subject: command or fuction nested to deeply error help :( |
|
|
hello all
i get this "command or fuction nested to deeply error" i have tried it diff ways and i still get this error
any ideas how to fix it?
thanks
| Code: |
:EVLOOP
WAIT EVENT,.01
goto @event()
:timer
%%TaskName = @taskkiller(iexplore.exe)
:Taskkiller
list create,29
list tasklist,29,|NI
if @match(29,|%1|)
parse ";%%TaskName",@item(29)
killtask %%TaskName
list close,29
list create,29
list tasklist,29,|NI
if @match(29,|%1|)
list close,29
exit
else
list close,29
exit KILLED
end
else
list close,29
end
goto evloop
|
_________________ Have a nice day  |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Wed Mar 03, 2004 9:26 am Post subject: |
|
|
How about adding a REPEAT UNTIL loop ? _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed Mar 03, 2004 9:28 am Post subject: |
|
|
You get the error because you call the :Taskkiller label with the @taskkiller() function, but after that, the code will just continue to execute the function again, after which it will go to the Evloop again. You can solve it like this:
| Code: | :EVLOOP
WAIT EVENT,.01
goto @event()
:timer
%%TaskName = @taskkiller(iexplore.exe)
goto evloop
:Taskkiller
list create,29
list tasklist,29,|NI
if @match(29,|%1|)
parse ";%%TaskName",@item(29)
killtask %%TaskName
list close,29
list create,29
list tasklist,29,|NI
if @match(29,|%1|)
list close,29
exit
else
list close,29
exit KILLED
end
else
list close,29
end
exit |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Wed Mar 03, 2004 11:03 am Post subject: |
|
|
I always try to avoid EXITs and GOTOs from within IF,ELSE,END statements as Error 10s can get raised very quickly. I tend to use something like this to avoid them:-
| Code: |
IF @ASK(In any case it is advisable to shut down. OK?)
%%ENDIF = CLOSE
ELSE
%%ENDIF = EvLoop
END
GOTO %%ENDIF
|
_________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Wed Mar 03, 2004 11:44 pm Post subject: |
|
|
thanks guys
Skit3000 - that code seems to work
arcray - i think i follow what you mean BUT i'am not sure how to added it to the coded i posted
thanks again _________________ Have a nice day  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|