** Edit options Let openProject = GetOpenProject() if Length(openProject)>0 then Let msg = 'Note that all changes will be saved to the current project\\To make global changes, close project first' Hint {msg} endif ** autosave is a special case. We test to see if it changes then ** edit timer appropriately Let autoSaveInterval = GetOption('AutoSaveInterval') OptionsDialog Let newAutoSaveInterval = GetOption('AutoSaveInterval') if autoSaveInterval<>newAutoSaveInterval then Let dir = SystemValuePath('AUTOSAVE_DIR') Let configfile = dir & '/' & SystemValue('SESSION_CONFIG_FILE') if ExistVec('global:autosaveTimerId') then if val(newAutoSaveInterval)<=0 then ** Disable autosave Let res = EditTimer(global:autosaveTimerId, 'kill') Let lockRes = CreateLockFile(configfile, 'unlock') Unlet global:autosaveTimerId ** 23.04.2010 - Minor bug. Need to delete autosave config as won''t get deleted on exit once autosaveTimerId destroyed if existdir(dir) && canopenfile(configFile) then del {configFile} endif else Let res = EditTimer(global:autosaveTimerId, 'interval', newAutoSaveInterval*60000) endif elseif val(newAutoSaveInterval)>0 then Let lockRes = CreateLockFile(configfile, 'lock') if lockRes='success' then Let global:autosaveTimerId = CreateTimer('save_auto /ne', newAutoSaveInterval * 60000) else Echo Echo "*** Warning ***: Schematic auto-save could not be enabled possibly because there is another instance of SIMetrix running" endif endif endif ** Ensure any colour customisations on system widgets is carried out on closing the form WM_UpdateCustomColours *** recreate the javascript variables - simulator mode might have changed - this changes the Welcome Page to the correct simulator mode. do_mru ''