studio close all windows

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

WinAVR and Studio

Each time I run AVRstudio, it opens the 15 or so source code files for whom the windows were not all closed when last I exited Studio.

Is there a way to either
1) Close all on exiting Studio
2) Close all upon mouse command
3) Open none on startup of Studio?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

stevech wrote:
WinAVR and Studio

Each time I run AVRstudio, it opens the 15 or so source code files for whom the windows were not all closed when last I exited Studio.

Is there a way to either
1) Close all on exiting Studio
2) Close all upon mouse command
3) Open none on startup of Studio?


Anyone?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I read it the first time you posted. I know of no "official" way to do it.

The extremely BF&I (Brute Force and Ignorance (tm)) method is to hack the project file. It's in an HTML-like format. It wouldn't be hard to write a cygwin/bash script to strip out the files that are "up".

The following is a bash script I hacked to "prettify" an AVR Studio project file (*.aps):

# 
#
cat $1 |

sed -e '
/>]*>//
    /^<.*/>/
    p
    bloop
    :done
    }'				|

sed -e 's/^[ 	]*//'		| 


awk 'BEGIN {nexti=0;indent=0;}
/<[^\/]/ {nexti++;}
/<[^\/].*\/>/ {nexti--;}
/^<\//   {indent--;}
/<\//    {nexti--;}
         {str="";
	  for (i = 0; i < indent; i++)
	      str = str "    ";
	  print str, $0
	  indent = nexti;
	}'

I believe you will find that the displayed files are at the end of the file, with the format:

         
             00000
             MPB.c
             259
         
         
             00001
             MPB.h
             257
         

Sorry, that's the only idea I have.

Stu

Engineering seems to boil down to: Cheap. Fast. Good. Choose two. Sometimes choose only one.

Newbie? Be sure to read the thread Newbie? Start here!