AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Automatic reload of changed script
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
BETLOG



Joined: 27 Nov 2006
Posts: 218
Location: Queensland, Australia

PostPosted: Thu Dec 28, 2006 12:33 pm    Post subject: Re: Reload works Reply with quote

clintster wrote:
I still prefer the traytip so combined your script and his.
Hmm, now that you mention it... so do I! :]
Back to top
View user's profile Send private message
Guest






PostPosted: Tue Jun 05, 2007 4:11 pm    Post subject: Re: Auto Reloading Reply with quote

damn, that is just awesome - just what i was looking for...thanks!!!
Back to top
Fray
Guest





PostPosted: Fri Dec 21, 2007 2:30 pm    Post subject: Reply with quote

Hi,
instead of using a timer and loop to see if any modification was done in the script file, won't be better to create a shortcut in the editor to reload the script when saved?

This is the code I'm using:

Code:

DetectHiddenWindows, On
#IfWinActive, ahk_class TfPSPad
^!r::
  ;save the file in use
  Send ^s
  WinGetTitle, title
  StringReplace, title, title, PSPad - [,
  StringReplace, title, title, ], 
 
  ifWinExist %title% ahk_class AutoHotkey
  {
    Run,  %A_AhkPath% /restart "%title%"
  }
  else
  {
    Run,  %A_AhkPath% "%title%"
  }
Return
Back to top
ilikeahk
Guest





PostPosted: Sat Jan 05, 2008 11:51 am    Post subject: Could someone explain? Reply with quote

Would anyone mind explaining to me how this works? it doesnt seem to be working for me.
Back to top
ManaUser



Joined: 24 May 2007
Posts: 900

PostPosted: Sun Jan 06, 2008 4:03 am    Post subject: Re: Could someone explain? Reply with quote

ilikeahk wrote:
Would anyone mind explaining to me how this works? it doesnt seem to be working for me.

Fray's script appears to be designed to work if (and only if) a certain text editor is open. If you simply want to make a hotkey that causes a script to reload itself, all you need is something like:
Code:
^!r::Reload

which would reload the script when you press Ctrl+Alt+R
Back to top
View user's profile Send private message
Jag02



Joined: 16 Apr 2008
Posts: 28

PostPosted: Sun Apr 20, 2008 6:31 pm    Post subject: Auto saving script Reply with quote

Any way to make this script automatically save after a set time?
Back to top
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 459
Location: MN, USA

PostPosted: Sun Apr 20, 2008 7:54 pm    Post subject: Reply with quote

Code:
#Persistent
StringTrimRight, title, A_ScriptName, 4
SetTimer, AutoSave, 10000   ;every 10 seconds
return

AutoSave:
IfWinExist, %title%
{
 TrayTip, AHK AutoSave
 , '%title%' will save and reload in 3 seconds.`nPress Esc to cancel.,,1
 KeyWait, Esc, D T3
 If ErrorLevel
 {
  ControlSend,, ^s, %title%
  Reload
 }
 TrayTip
}
return

_________________
http://autohotkey.net/~jaco0646/
Back to top
View user's profile Send private message Visit poster's website
infogulch



Joined: 27 Mar 2008
Posts: 64
Location: KC, MO

PostPosted: Sun May 11, 2008 5:03 am    Post subject: Reply with quote

I made a function version of this. Just put it in your library and call it like this:

SDR()

Download. It's thread: SaveDoesReload

... Omg, is this really topic number 135?!?! Shocked Wow, I guess I'm a little late. (yeah, like four years. OMG LOLz Laughing*10)
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group