Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • December 07, 2016, 10:29:14 AM
  • Proudly celebrating 10 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 4596 times)

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Looking for a AutoSave program
« on: September 24, 2009, 06:37:47 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:44 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:12 AM by AndyM »

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • 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:22 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:13 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: 677
    • 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:44 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:10 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: 677
    • 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:04 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:56 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: 36,408
    • 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:28 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,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #9 on: September 24, 2009, 10:18:33 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: 2,927
    • View Profile
    • Donate to Member
Re: Looking for a AutoSave program
« Reply #10 on: September 25, 2009, 03:50:00 PM »
I haven't tried this myself...  from Jimmy the Fork:

Quote
Helmet

   Clicks the save button on any program.

See the author's screenshot below.

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • 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:58 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:04 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