RichMove - can I auto-answer "No" in script?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Papoulka
Posts: 455
Joined: 13 Jul 2013 23:41

RichMove - can I auto-answer "No" in script?

Post by Papoulka »

I have a flatten-folders script that very often pops up a RichMove prompt, because of a MoveTo operation. I have to manually click on "No" every time. Is there a way to do this automatically in my script?

I can't use BackupTo instead of MoveTo, for file size reasons. I can probably create a window monitor & answer script in AutoIt, compile it to exe and launch that at the beginning of my XY script. But that's really a kludge and will take time to get running.

I have put in a "Wish" for a flag in MoveTo that will suppress RichMove prompts, but I want something sooner.

Any other ideas?

Thanks

highend
Posts: 14953
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: RichMove - can I auto-answer "No" in script?

Post by highend »

Is there a way to do this automatically in my script?
No, the script is on hold while the message is displayed.
I can probably create a window monitor & answer script in AutoIt, compile it to exe and launch that at the beginning of my XY script. But that's really a kludge and will take time to get running
It's the only way (to use something external) if Don doesn't add a flag to suppress the dialog.
One of my scripts helped you out? Please donate via Paypal

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: RichMove - can I auto-answer "No" in script?

Post by SkyFrontier »

I recall I had similar problems, when started scripting. Feel free to post relevant section so I can take a look at it.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

Papoulka
Posts: 455
Joined: 13 Jul 2013 23:41

Re: RichMove - can I auto-answer "No" in script?

Post by Papoulka »

I went with the AutoIt script for now. It works on my system but will break if any of several small things change due to compiler or toolbox updates, and / or if screen resolutions alter the RichMove window dimensions. Thus, not reliable long-term. But for what it may be worth here is the AutoIt3 script:

Code: Select all

$starttime = TimerInit()
While TimerDiff($starttime) < 5000
  If WinExists("[CLASS:ThunderRT6FormDC; W:600]") Then
    $handle = WinGetHandle("[CLASS:ThunderRT6FormDC; W:600]")
    $rawtext = WinGetText($handle)
    $result = StringInStr($rawtext, "Recreate the source folder structure")
    If $result > 0 Then
      Send("n")
      Exit
    Endif
  Endif 
Wend
I compiled this using the AutiIt2Exe tool, naming the result "XY_RichMove_No.exe". I put that in the XY Scripts folder. Then in my XY folder-flatten script I have the line:

Code: Select all

run <xydata>."\Scripts\XY_RichMove_No.exe";
The result is that when the RichMove prompt appears it quickly gets a "No" response and closes.

Note that the prompt does not respond to "N", only to "n". Also, the AutoIt script exits after 5 sec or after closing one RichMove window since that's all I need in this case.

Thanks for the replies anyway; I'll use this until we get the flag :wink:

[edited to correct script for varying RichMove window heights and 5 sec timer]

Post Reply