Jump to content
caramen

recursivity - (Moved)

Recommended Posts

Is it normal that AutoIt doesn't have the same recursivity behavior in win 7 and W10 ?


My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

What do you mean by "recursivity behavior"?
How did you notice that it is different between W7 and W1ß?

Edited by water
Fixed typo

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

Do you have a proof of that ?  Sincerely, I use quite a bit of recursive algorithms and I never seen any difference Win7 and Win10.

Edited by Nine

Share this post


Link to post
Share on other sites

Check the AutoIt limits and you will see that recurse limits depend on the bitness.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites
8 hours ago, Nine said:

Do you have a proof of that ?

It is a funny story...If you read my recent helps threads, and I think you did, you already know.

But I'll say all again. I made a tool 10 years ago for one of my customer. One of the customer after I left them thief my sources. And he worked on my tool and changed everything. This should not happen because in France my windows account is my property. It is my data and it remains for 80 years. 

They called me 10 years after to work on automatization of multiple processes. And they told me, bro the tool is buggy on Windows 10 and it was not on win7 could you please check that ?

I what was my surprise when I checked... They modified all my copyrights ... nvm. 

I checked the sources. From my experience recusivity was usable without problems. Without memory saturation etcetera.... But the tool was old And 10 years before I was not coding like now. So the code was ugly but it has a reliability of 100%.

So my mission on this was to debug 4000 lines code from my hold methods. Yesterday. I was gonna fall asleep. And I thought about the recursivity of this script and I removed it. the script is now reliable 100% back even on win10.

 

Here his how it was:

The recursive example

Menu()

Func Menu ()
    While 1
        Sleep ( $Pause3 )
            If _IsPressed(""&$hShordCutKey, $dll) Then
                 _CreationMenu()
            EndIf
    WEnd
EndFunc

Func _CreationMenu()
   While 1
      Switch GUIGetMsg()
         Case $GUI_EVENT_CLOSE
            ExitLoop
         Case $Close
            FuncClose ()
         Case $MasqueSymptome   ;~ Insérer un masque Symptôme
            Func1000 ()
      EndSwitch
    Wend
EndFunc     

Func FuncClose ()
   _CleanAndWait ()
   Menu ()
   ConsoleWrite ("Test"&@CRLF) 
EndFunc

So just above the example is recursive because the menu () func is calling herself. If the $Close is catched by guigetmsg 

Without recursivity ;

While 1

    Menu()

WEnd

Func Menu ()
    _OnDesactiveLaSecu ()
    _OnSecureLesTouches ()
    Sleep(500)
    While 1
        Sleep ( $Pause3 )
            If _IsPressed(""&$hShordCutKey, $dll) Then
                 _CreationMenu()
            EndIf
    WEnd
EndFunc

Func _CreationMenu()
    While 1
      Switch GUIGetMsg()
         Case $GUI_EVENT_CLOSE
            ExitLoop
         Case $Close
            FuncClose ()
            ExitLoop
      EndSwitch
    Wend
EndFunc

Func FuncClose () 
   _CleanAndWait ()
   ConsoleWrite ("test"&@CRLF)
EndFunc

 

 

WIn 7 behavior

The script is doing the create menu function without problem. 

Win 10 

The script is finishing the first Menu () function what ever happen before. The recursivity make the script buggy. 

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
2 hours ago, caramen said:

The recursive example

This is simply bad coding where you never properly end but simply keep on going deeper and deeper in recursion. It will eventually fail in all OSes... just a matter of time and available stacksize..

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
5 hours ago, Jos said:

This is simply bad coding where you never properly end but simply keep on going deeper and deeper in recursion. It will eventually fail in all OSes... just a matter of time and available stacksize..

Jos

I agree with that.


My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
13 hours ago, caramen said:

They called me 10 years after to work on automatization of multiple processes. And they told me, bro the tool is buggy on Windows 10 and it was not on win7 could you please check that ?

Sounds like the customer blew their stack :)


Code hard, but don’t hard code...

Share this post


Link to post
Share on other sites

Not directly related to your example, I'd like to mention that the NTFS file system can offer problems by placing (defective) reparse points.

 

If recursive search loops come across such a reparse point, pointing to it's own parent directory, the logic will "loop-infinitely-into-death".

I mostly have seen this for "ProgramData"  = "Anwendungsdaten" in German Windows installations, both, Windows 7 and Windows 10. Looks like this:

image.thumb.png.f4ece50f03020da31ddae34af44a917a.png

 

This can be resolved using FSUTIL.EXE 

 

C:\Users\All Users>cd "Application Data"
 C:\Users\All Users\Application Data>cd "Application Data"
 C:\Users\All Users\Application Data\Application Data>fsutil hardlink list .
\ProgramData\Application Data
 C:\Users\All Users\Application Data\Application Data>cd ..
 C:\Users\All Users\Application Data>fsutil reparsepoint delete "C:\Users\All Users\Application Data\Application Data"
 C:\Users\All Users\Application Data>cd "Application Data"
system cannot find path specified (German: "Das System kann den angegebenen Pfad nicht finden.")
 C:\Users\All Users\Application Data>

 


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...