/* Auto Hot Key script to trap Ctrl-S pressed in KNIME.exe Gives the user the option of resetting the workflow prior to saving This helps avoid large wait time for saving of large data sets with workflow Script written by @takbb Brian Bates - 18 May 2021 This script is free to use for any use Use at your own risk - There is no cast-iron guarantee that it will always prevent unwanted saving of workflow data but it will hopefully help. To use this script, install AutoHotKey - available from autohotkey.com Place it in same folder as a copy of AutoHotKey.exe rename AutoHotKey.exe as KnimeSaveAfterReset.exe (i.e. the same name, but with .exe extension as this script) and run at either at Windows Startup, or priot to running Knime.exe */ ;TrayTip, AutoHotKey, Looking for KNIME Analytics Platform - Ctrl S press , 16 SetTitleMatchMode 3 ; window title equals loop { #IfWinActive ahk_exe knime.exe ^+s:: MsgBox, 1,"KNIME Ctrl-Shift-S Pressed (detected by AHK script)", "This will save ALL unsaved workflows including data. Are you sure?" ifMsgBox OK { Send ^+s } else { MsgBox 0, "KNIME - AutoHotKey", "Workflow(s) not saved" } return ^s:: MsgBox, 3,"KNIME Ctrl-S Pressed (detected by AHK script)", "Do you want to reset the workflow before saving, to avoid saving data? ifMsgBox Yes { Sleep, 30 Send ^{a} Sleep, 1000 Send {F8} Sleep, 1000 Send ^{s} } else { IfMsgBox No { Send ^{s} } else { MsgBox 0, "KNIME - AutoHotKey", "Workflow not saved" } } return }