Home Download Buy Blog Forum Support

Save command cannot be called from code?

Save command cannot be called from code?

Postby FalconNL on Mon Jan 31, 2011 9:01 pm

Problem: In a few of my scripts, I used to save the current file before running it through external tools. However, this no longer appears to work.

Steps to reproduce: Create a new file. Type something in so the file is modified. Open a console. Type window.run_command('save') and press enter. Nothing happens.

If you replace save with save_all it does work correctly, but for the sake of safety I'd prefer only saving the current file. Strangely, the ctrl+s keyboard shortcut works just fine, even though it calls the exact same command. Is this a bug or is there an alternate way to save files from code?
FalconNL
 
Posts: 67
Joined: Thu May 29, 2008 8:17 pm

Re: Save command cannot be called from code?

Postby jps on Mon Jan 31, 2011 9:36 pm

I'll put this on the todo list to implement; there isn't a way to access it from plugins yet.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 28 guests