Page 1 of 1

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

Posted: 29 Jun 2015 18:32
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

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

Posted: 29 Jun 2015 19:43
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.

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

Posted: 29 Jun 2015 19:57
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.

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

Posted: 29 Jun 2015 20:48
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]