Discussion:
does AutoIT support recursion?
Jim Owens
2008-01-25 14:58:05 UTC
Permalink
Some languages I've used, such as Rexx, make a fuss abour supporting
recursion. I have a small project that does require recursion, but I'd
prefer to write it in AutoIT. Can I do it?

The project involves pulling apart or "bursting" some nested XML
nodes, as in:

<concept>

<concept>

<concept>
</concept>

<concept>
</concept>

</concept>

<concept>

One way I could do it is with this pseudocode:

Do until end of file
If you find a concept
call function PROCESS_CONCEPT
End

Function PROCESS_CONCEPT
Do until end of concept
If you find another concept
/* call this function recursively */
call function PROCESS_CONCEPT
End
End
Save the concept as a file
End


I'm also interested in doing this using XML instead of line
processing. I'm looking into _XMLDOMwrapper. Can it be done that way?
Petr Dyntar
2008-01-25 15:14:29 UTC
Permalink
Hi Jim,
go and ask on autoit forums,this email list is abadoned and leaved for spam bots only:)
last 2months noone writed anything here..
Forums is full of peoples,go and ask there.
I dont have experience with XML and personally,iam using the same method like you described in most of my programs.
Petr


-----Original Message-----
From: ***@yahoogroups.com [mailto:***@yahoogroups.com]On Behalf Of Jim Owens
Sent: Friday, January 25, 2008 3:58 PM
To: ***@yahoogroups.com
Subject: [Disarmed] [AutoIt] does AutoIT support recursion?



Some languages I've used, such as Rexx, make a fuss abour supporting
recursion. I have a small project that does require recursion, but I'd
prefer to write it in AutoIT. Can I do it?

The project involves pulling apart or "bursting" some nested XML
nodes, as in:

<concept>

<concept>

<concept>
</concept>

<concept>
</concept>

</concept>

<concept>

One way I could do it is with this pseudocode:

Do until end of file
If you find a concept
call function PROCESS_CONCEPT
End

Function PROCESS_CONCEPT
Do until end of concept
If you find another concept
/* call this function recursively */
call function PROCESS_CONCEPT
End
End
Save the concept as a file
End

I'm also interested in doing this using XML instead of line
processing. I'm looking into _XMLDOMwrapper. Can it be done that way?







[Non-text portions of this message have been removed]
Jim Owens
2008-01-25 16:08:39 UTC
Permalink
Oops -- thanks!

If you can use a function to call itself, then I should be OK with
AutoIT. I think my function will be calling itself a hundred times or
so, on average. I'll have to see how it goes. Thanks again.
Post by Petr Dyntar
Hi Jim,
go and ask on autoit forums,this email list is abadoned and leaved for spam bots only:)
I dont have experience with XML and personally,iam using the same
method like you described in most of my programs.
Post by Petr Dyntar
Petr
Loading...