Automate Save As
Automate Save As
Is there any way to automate this with a hotkey (using a script extension):
File-Save As->Microsoft XAML->Save->Silverlight compatible = true->Ok->Overwrite = yes, don't ask.
Perhaps some code to get me started? That would be awesome.
File-Save As->Microsoft XAML->Save->Silverlight compatible = true->Ok->Overwrite = yes, don't ask.
Perhaps some code to get me started? That would be awesome.
Re: Automate Save As
Hello,
It seems it's a hard question!!
I confess that I don't have enough information about that. but I 'm afraid it's not possible right now.
You could however, found usefull this information:
http://tavmjong.free.fr/INKSCAPE/MANUAL ... dLine.html
There are also options for keyboard shortcuts
http://tavmjong.free.fr/INKSCAPE/MANUAL ... -Shortcuts
I remember vaguely some one talked about a third party program which can record clicks on buttons and other stuff similar. I don't know even how to search it in google... record mouse clicks perhaps?
... well, one that seems intersting doing that search:
http://sourceforge.net/projects/minimousemacro/
At the end... better call the developers!
It seems it's a hard question!!
I confess that I don't have enough information about that. but I 'm afraid it's not possible right now.
You could however, found usefull this information:
http://tavmjong.free.fr/INKSCAPE/MANUAL ... dLine.html
There are also options for keyboard shortcuts
http://tavmjong.free.fr/INKSCAPE/MANUAL ... -Shortcuts
I remember vaguely some one talked about a third party program which can record clicks on buttons and other stuff similar. I don't know even how to search it in google... record mouse clicks perhaps?
... well, one that seems intersting doing that search:
http://sourceforge.net/projects/minimousemacro/
At the end... better call the developers!
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: Automate Save As
Hi.
If you are on windows you can use the python sendkeys to "automate" nearly all programs.
I have used this to prevent computers going to sleep when company policy have prevented changing the time for the screensaver to "kick in"
by sending a keypress to notepad every five minutes.
If you are on windows you can use the python sendkeys to "automate" nearly all programs.
I have used this to prevent computers going to sleep when company policy have prevented changing the time for the screensaver to "kick in"
by sending a keypress to notepad every five minutes.
Last edited by ragstian on Sat Feb 28, 2015 3:23 am, edited 1 time in total.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: Automate Save As
I apologize for my curiosity but if someone would spend 2 words on explaining this I would be grateful
We are in an Inkscape forum and I presume that we are talking about overwriting a file with Autosave - but I'm sure it's not that simple reading the replies.
We are in an Inkscape forum and I presume that we are talking about overwriting a file with Autosave - but I'm sure it's not that simple reading the replies.
Re: Automate Save As
Hi
Janne, when you have the autosave turned on Inkscape will save your work every X minutes,
I have set mine to autosave every 10 minutes.
This has saved my butt more than one time as if I do a serious mistake I can grab the autosaved version and never lose more than 10 minutes work.
Another thing to be aware of is that Inkscape saves your work (most of the times) when crashing as well, normally you would think that when Inkscape crashes your work will be gone but it's saved with a "timestamp" in the filename like this; inkscape-autosave-0-2015_02_12_13_12_15-001.svg
Janne, when you have the autosave turned on Inkscape will save your work every X minutes,
I have set mine to autosave every 10 minutes.
This has saved my butt more than one time as if I do a serious mistake I can grab the autosaved version and never lose more than 10 minutes work.
Another thing to be aware of is that Inkscape saves your work (most of the times) when crashing as well, normally you would think that when Inkscape crashes your work will be gone but it's saved with a "timestamp" in the filename like this; inkscape-autosave-0-2015_02_12_13_12_15-001.svg
Last edited by ragstian on Sat Feb 28, 2015 3:23 am, edited 1 time in total.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: Automate Save As
Hi Ragnar, yes, I think that you taught me about Autosave a couple of months ago and it comes in very handy.
It was this sentense ( plus the replies ) that made me curious:
"File-Save As->Microsoft XAML->Save->Silverlight compatible = true->Ok->Overwrite = yes, don't ask."
Thank you for your information on saved files on crash - I think that I have a couple of them
It was this sentense ( plus the replies ) that made me curious:
"File-Save As->Microsoft XAML->Save->Silverlight compatible = true->Ok->Overwrite = yes, don't ask."
Thank you for your information on saved files on crash - I think that I have a couple of them
Re: Automate Save As
@ elecman
AutoIT (Win) might help on automating it.
@hulf2012
That mini is a very nice mouse ,)
@ Janne
When saving file in MS XAML format, additional pop-up related with Silverlight shows up, so the Save As procedure is extended for that extra step (in comparison with Save as .svg where user is asked just for the destination and file name). Additional replies were related to automating all of those steps.
AutoIT (Win) might help on automating it.
@hulf2012
That mini is a very nice mouse ,)
@ Janne
When saving file in MS XAML format, additional pop-up related with Silverlight shows up, so the Save As procedure is extended for that extra step (in comparison with Save as .svg where user is asked just for the destination and file name). Additional replies were related to automating all of those steps.
Re: Automate Save As
I don't think Auto Save will work, because I work with an SVG file, but need to export it to XAML. If I work with the XAML file, the auto save will work, but I will use all inkscape specific data (guides etc). Besides, I want to save on demand, and with Auto Save, I have to wait for the next save, which defeats the purpose.
I use the XAML file in a game engine (Unity, using NoesisGUI), so my workflow is: Edit in Inkscape->Try in game->Rinse, repeat.
I will have a look AutoIT.
I use the XAML file in a game engine (Unity, using NoesisGUI), so my workflow is: Edit in Inkscape->Try in game->Rinse, repeat.
I will have a look AutoIT.
Re: Automate Save As
Janne, he's talking about writing a script that will do this Save As automatically, from a keystroke. I don't understand anything about doing that, which is why I haven't replied. I think of script writing as a more advanced computer skill. At least it's a skill I don't have!
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Automate Save As
Thanks for the AutoIt hint. I made a script which does exactly what I want. This is such a time saver!
Code: Select all
;Set an option so that we can always find the window, regardless of the file name in use.
AutoItSetOption ("WinTitleMatchMode", 2)
;Get a handle to the main window.
Local $hWndMain = WinGetHandle(" - Inkscape", "");
;If we can't find the main window, bail out.
If @error Then
Exit
;The main window is found, continue
Else
;Focus the main window in case it isn't.
WinActivate($hWndMain)
;"Save a Copy" keyboard shortcut.
Send("{SHIFTDOWN}{CTRLDOWN}{ALTDOWN}s")
Send("{SHIFTUP}{CTRLUP}{ALTUP}")
;Wait for the save window to show up.
Local $hWndSave = WinWait("[CLASS:#32770]")
;Focus the save window in case it isn't.
WinActivate($hWndSave)
;Click on the "Save as Type" selection box.
ControlClick($hWndSave, "","[CLASS:ComboBox; INSTANCE:3]")
;Select the xaml option in the selection box, and press Enter.
ControlCommand($hWndSave, "", "[CLASS:ComboBox; INSTANCE:3]", "SelectString", "Microsoft XAML (*.xaml)")
Send("{ENTER}")
;Shortcut key for "Save".
Send("{ALTDOWN}s")
Send("{ALTUP}")
;A popup box will appear which asks if you want the output to be compatible with Silverlight.
;You have to tick the box manually once, without using this script. After that, the setting is remembered.
Local $hWndSilverlight = WinWait("XAML Output", "")
WinActivate($hWndSilverlight)
;Shortcut key for "OK" on the Silverlight message box.
Send("{ALTDOWN}o")
Send("{ALTUP}")
;If the file already exists, overwrite the it by pressing Enter.
Local $hWndOverwrite = WinGetHandle("");
If @error Then
Exit
Else
WinActivate($hWndOverwrite)
Send("{ENTER}")
EndIf
EndIf
Last edited by elecman on Sat Feb 14, 2015 8:40 pm, edited 1 time in total.
Re: Automate Save As
You`re welcome! Keep it rocking ,)
Re: Automate Save As
brynn wrote:Janne, he's talking about writing a script that will do this Save As automatically, from a keystroke. I don't understand anything about doing that, which is why I haven't replied.
My not-so-clever question gave me valuable information about saving on crashes.
And thank you, Maestral, for your explanation.
Re: Automate Save As
Off topic:
I for one don't use autosave.Have been working with large svg-s lately -6,8 MB without any embedded images, and another one mostly made from raster parts in 175 MB-, the worse experience was when inkscape crashed while saving, resulting in a corrupted svg with most of the work lost.
Re: Automate Save As
You guys make me laugh - by the way also this is OFF TOPIC