Pages: [1]   Go Down
Author Topic: Arduino IDE opens last used file by default  (Read 913 times)
0 Members and 1 Guest are viewing this topic.
Near Rotterdam in Holland
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Ever since I updated to 00022 my Arduino IDE will open the last used file when it starts.
I usually use an external editor that opens the IDE with the filepath of the file I want to upload as startup argument.
Always worked fine for me but now the IDE always opens twice, once with the last used file and once with my desired file.
Maybe someone can tell me if it is possible to disable this apparently new feature???

2nd question, I never bothered looking into it but I wondered if it is possible to automaticly upload using a startup argument for the Arduino IDE?

Best regards,

Alban

www.reptile-addict.nl/arduino
Logged

Best regards,

Alban

P.S. sorry for asking silly questions... I'm a mechanical engineer and not an electronics engineer smiley-wink


www.reptile-addict.nl

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6146
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If I "Quit" the Arduino IDE then I see the same behavior you do.  The last file(s) open on launch.

If I "Close" the last open file, I see a prompt saying the IDE will Quit.  In this case, the last file doesn't open.


So the IDE is trying to open whatever files were Open the last time the IDE exited.  Close all windows/files and they won't re-open.  (This seems to me that it is the same behavior from pre-0022.)
« Last Edit: August 13, 2011, 12:36:39 pm by James C4S » Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I "Quit" the Arduino IDE then I see the same behavior you do.  The last file open on launch.

If I "Close" the last open file, I kept a prompt saying the IDE will Quit.  In this case, the last file doesn't open.


So the IDE is trying to open whatever files were Open the last time the IDE exited.  Close all windows/files and they won't re-open.  (This seems to me that it is the same behavior from pre-0022.)

That's different then I get, close, quit, upper right hand window X, however I close the IDE it always opens with a blank sketch window?

IDE 22, Windows XP pro SP3

Lefty
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6146
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
That's different then I get, close, quit, upper right hand window X, however I close the IDE it always opens with a blank sketch window?
I'm not quite sure what you are saying here.  This statement is difficult to understand.

Trying 0022 on both Windows 7 and OS X, here is what I find.  And again, I feel like this is how the IDE has always worked.  It will re-open any files that were open when the application quit.  (In Windows, the application quits when the last window is closed.  On Mac, you get a prompt asking if you want to quit first.)

Windows:  CTRL-Q or File -> Quit
Mac OS X:  CMD-Q or Arduino -> Quit
Any open files will be re-opened when Arduio IDE is started.


Windows or Mac OS X:  Close Window / File
This file will not be re-opened when the IDE Lauches.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess what I'm saying is that in over 3 years using the arduino IDE, I have never seen it open up with a sketch, always a blank sketch window only, no matter how I closed the last session.

I just tried again, to be sure. Launched the IDE, opened an existing sketch, closed with CTRL-Q. Then launched the IDE again and it opened with a blank sketch as it has always done for me on my machine.


Lefty

Logged

Near Rotterdam in Holland
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe I see a common factor.

I suspected that it had something to do with v22 but at the same time I switched from XP to 7.
If I read the above posts it seems that the XP users have it open a blank window and the 7 and Mac users open last file!?
Logged

Best regards,

Alban

P.S. sorry for asking silly questions... I'm a mechanical engineer and not an electronics engineer smiley-wink


www.reptile-addict.nl

Täby, Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 4
I won't Twitter!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Windows:  CTRL-Q or File -> Quit
Mac OS X:  CMD-Q or Arduino -> Quit
Any open files will be re-opened when Arduio IDE is started.


Windows or Mac OS X:  Close Window / File
This file will not be re-opened when the IDE Lauches.


Thanks for explaining this!
The fact that the IDE occasionally opened with the last sketch, and other times with a blank file has annoyed me for a long time.
Embarassing now to confess that I couldn't figure this out myself -- it is kind of logical, after all.

I'm running Ubuntu with IDE version 0022  and I find the behaviour in this regard is just like you described:
Close the window with its "button", menu option or ctrl-W --> New sketch opens next time.
Quit the IDE program from menu option or ctrl-Q --> Last sketch opens next time (which is usually what I want).

// Martin
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm on Win7 Ultimate, using version 0022 of the IDE.  I have never seen it open with the last sketch used.  Regardless of how I quit it, it always opens up with a blank sketch.
Logged

Pages: [1]   Go Up
Jump to: