Re: Option to always create directory when Synchronized Browsing
Thanks for sharing your solution!
Thanks for your suggestion. Will see if more people ask for this.
; Program: WinSCP
; Issue: Sychronized Browsing - Always "Yes"
; Workaround:
; 1. Wait for WinSCP commander interface window to exist
; 2. Wait for confirmation prompt for creating local folder
; 3. "Click" Yes
DetectHiddenText, off ;will not search hidden window text (faster)
DetectHiddenWindows, off ;will not detect hidden windows (faster)
Loop { ;continue indefinitely
; WinWait* is event-driven hook implementation consuming 0% cpu while process is stored in RAM
; WinTitle=Confirm AND ahk_class=TMessageForm AND Text=&Yes is not unique to WinSCP, so minimize interference by at least wait indefinitely until WinSCP Commander window exists
WinWait, ahk_class TScpCommanderForm
; Wait until confirm prompt window exists and has focus where WinTitle=Confirm and ahk_class=TMessageForm
; Every 10 minutes checks if WinSCP Commander GUI is still running
WinWaitActive, Confirm ahk_class TMessageForm, &Yes, 600
; Default answer is Y, therefore "Send {Enter}" would work, also "Send y"
; For accuracy, we will press specific mapped button of matched window in case focus was lost (such as may happen with mouseover-focus and zero focus-delay)
; TMessageButton3=&Yes TMessageButton2=&No TMessageButton1=&Help
ControlSend, TMessageButton3, {Enter}, ahk_class TMessageForm
}
}