Page 1 of 1
File save on loss of focus
Posted: Mon Mar 26, 2012 7:53 pm
by ianbryant
Does zeus support file save on loss of focus ?
i.e. If i am editing files in zeus and am running them in another window e.g. CYGWIN can i set zeus to autosave the files as I move the mouse to the other window - I keep forgetting to click on file save and end up running on the previous version of the file
Posted: Tue Mar 27, 2012 1:38 am
by jussij
Does zeus support file save on loss of focus ?
Unfortunately not.
i.e. If i am editing files in zeus and am running them in another window
When you say you are running the files is that through bash or some other shell
Why don't you run the file in CYGWIN through Zeus
For example add a Zeus tool that looked something like this:
Code: Select all
c:\cygwin\bin\bash --login "c:\some-bash-script.sh"
I keep forgetting to click on file save and end up running on the previous version of the file
The Zeus tool feature does have a
save file on run option for exactly this reason
Cheers Jussi
Posted: Thu May 03, 2012 2:49 pm
by ianbryant
I found the save feature when using macros or compile within Zeus,
I used CYGWIN as simple example. I also use ModelSim a lot for Verilog development, and have its GUI open for running and debugging, and Zeus for editing.
It has now almost become habit to click on save when moveing from Zeus to ModelSim - but occasionally I forget - a save on loss of focus would be very helpfull for this sort of environment.
(This was a feature on CodeWright that I recently migrated to Zeus from)
Posted: Fri May 04, 2012 4:12 am
by jussij
It has now almost become habit to click on save when moveing from Zeus to ModelSim - but occasionally I forget - a save on loss of focus would be very helpfull for this sort of environment.
Why not create a macro to activate the ModelSim from inside Zeus
Then bind that macro to the keyboard, to the menu or to the popup menu. That macro would also do the file save.
As an example here is a simple macro that will activate or start the calc.exe utility.
Code: Select all
'
' The Calc.vbs script will start or activate the Calculator application
'
' Save the current file
zeus.FileSave()
' Actvate or run the calc.exe utility (change to suit)
Set Wsh = CreateObject("WScript.Shell")
SET Wmi = GetObject("winmgmts:\\.\root\cimv2")
' Look for the running process calc.exe (change to suit)
Set items = Wmi.ExecQuery("Select * from Win32_Process where name='calc.exe'")
' Detail found in the Win32_Process structure:
' http://msdn.microsoft.com/en-us/library/windows/desktop/aa394372(v=vs.85).aspx
if items.Count <> 0 then
' Activate the Calculator application(change to suit)
Wsh.AppActivate "Calculator"
else
' Start the calc.exe (change to suit)
Wsh.Run "Calc.exe"
end if
Cheers Jussi