topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 6:47 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Looking for a AutoSave program  (Read 9031 times)

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Looking for a AutoSave program
« on: September 24, 2009, 06:37 AM »
I need a program that will send Ctrl+S to designated list of running applications every user specified time interval.

I tried running http://www.atopsoft....m/products/autosave/ and have it like so:

AutoSave.png

But it doesn't do anything at all.

Any other recommendations? AutoHotKey script is welcome.

I tried unsuccessfully to write a macro in MacroExpress:

ME.png
<a href="https://sridharkatakam.com">My blog</a>

AndyM

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 616
    • View Profile
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #1 on: September 24, 2009, 06:56 AM »
Your MacroExpress script won't do anything unless Flexbuilder.exe is focused.  You'd have to activate the window first, which would make the "If Program is focused" line true so the rest of the macro would run.  Having the Flexbuilder.exe window activated/focused would also be necessary for the <Control>s to work.

Try a series of:
  If Window X running
    Activate Window X
    Send Save commands to Window X
  End if
  If Window Y running
    Activate Window Y
    Send Save commands to Window Y
  End if

etc
« Last Edit: September 24, 2009, 06:59 AM by AndyM »

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #2 on: September 24, 2009, 07:45 AM »
I do have Flex Builder open and as the active application. But am not sure why the macro isn't working.

I found http://www.autohotke...p;highlight=autosave which seems to do this..am trying to understand and modify it to suit for FlexBuilder.
<a href="https://sridharkatakam.com">My blog</a>

AndyM

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 616
    • View Profile
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #3 on: September 24, 2009, 07:58 AM »
I didn't look much at the rest of your script, and now that I do I'm not sure it will do what you want.

It looks like you want to hit Ctrl-S in Flex Builder every 2 minutes no matter what you are doing in Flex Builder.  I wouldn't take that approach since you never know what you'll be doing/typing at that very moment.

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #4 on: September 24, 2009, 08:25 AM »
I am using the following AutoHotKey script for the time being. It does interfere with what I am currently doing inside Flex Builder, but that's fine till some elegant solution is found.

#Persistent

SetTimer, AutoSave, 20000  ; Run AutoSave subroutine every 20 seconds.

AutoSave:
IfWinActive ahk_class SWT_Window0
    Send, {Control Down}s{Control Up}
return
<a href="https://sridharkatakam.com">My blog</a>

AndyM

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 616
    • View Profile
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #5 on: September 24, 2009, 08:42 AM »
What happens if you just overtyped something by accident, and then the file autosaves before you correct your mistake?

If I were doing this, I'd save versions so I didn't overwrite saved files.

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #6 on: September 24, 2009, 08:46 AM »
I am only trying to automate pressing of Ctrl+S.

If I have made a mistake and the script sent Ctrl+S keystroke, the project gets saved with the wrong text and that's fine with me. Because I know that the script will save the corrected version after the next execution (within the next 20 seconds during which time I would have corrected the text)
<a href="https://sridharkatakam.com">My blog</a>

AndyM

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 616
    • View Profile
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #7 on: September 24, 2009, 09:10 PM »
I am only trying to automate pressing of CtrlS.

Then your script should work just fine.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #8 on: September 24, 2009, 09:26 PM »
just want to chime in with everyone else who is saying this sounds like a recipe for trouble, accidentally saving something you dont want to.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #9 on: September 24, 2009, 10:18 PM »
just hope that the program has an undo buffer that works even after the file is saved.. :-\

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,199
    • View Profile
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #10 on: September 25, 2009, 03:50 PM »
I haven't tried this myself...  from Jimmy the Fork:

Helmet

   Clicks the save button on any program.

See the author's screenshot below.

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #11 on: September 26, 2009, 03:09 AM »
Thanks rjbull.

But 'Helmet' doesn't have the option to specify save time interval to less than a minute.
<a href="https://sridharkatakam.com">My blog</a>

fiddyschmitt

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 17
    • View Profile
    • www.jimmythefork.com
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #12 on: September 26, 2009, 08:18 PM »
Thanks rjbull.

But 'Helmet' doesn't have the option to specify save time interval to less than a minute.

Hi sri, that's true. I only wrote it for a min of 1 minute. If you're looking for lower than that I think you may have an extremely unstable computer ;-)

Alternatively, you can use an autoit script (which doesn't require the program to be in focus)

;WinTitleMatchMode
;1 = Match the title from the start (default)
;2 = Match any substring in the title
;3 = Exact title match
Opt("WinTitleMatchMode", 2)

while (true)
if WinExists("FlexBuilder") Then
if not WinExists("Save As") Then
WinMenuSelectItem("FlexBuilder", "", "&File", "&Save")

;or.....
;you could send a ctrl+s command to the edit box
;ControlSend("FlexBuilder", "", "[CLASSNN:Edit1]", "^s")
EndIf
EndIf

Sleep(1000)
WEnd