mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2014
Posts: 19
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Apr 2014
Posts: 19
Is there a way so that when
Code:
This file has been changed by another application: remote.ini Do you want to reload it?
pops up I can have it automatically say yes?

Joined: Apr 2014
Posts: 191
B
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
Afaik, there is no way to auto say yes for the pops up, but you can script it to auto reload remote.ini file.
Code:
on *:START:.timerscriptcheck -o 0 5 scriptcheck 

alias scriptcheck {
  var %t $calc($timer(scriptcheck).delay / 1000), %i 1
  while $script(%i) {
    var %s $v1
    if $calc($ctime - $file(%s).mtime) < %t { .reload -rs $+ %i $qt(%s) }
    inc %i
  }
}

In order to make this works, you need to turn off monitor file changes (In script editor, press alt+O then untick "monitor file changes" option), otherwise you will still get the pops up.




Joined: Apr 2014
Posts: 19
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Apr 2014
Posts: 19
I've put that in my remote.ini file but it doesn't seem to work... The remote.ini is being modified by DropBox if that affects anything.

Joined: Apr 2014
Posts: 191
B
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
check if timer scriptcheck is active?
If it is not, you may need restart your mIRC to activate it, or you can activate it manually if you know how wink

Joined: Apr 2014
Posts: 19
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Apr 2014
Posts: 19
idk how to check if its active. I've restarted mIRC a few times since i've added it.

Joined: Apr 2014
Posts: 191
B
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
Ok. so that version doesnt work for you. Idk if dropbox affects anything or not. lets try this version.
Code:
on *:START:.timerscriptcheck -o 0 5 scriptcheck 

alias scriptcheck {
  var %i 1
  while $script(%i) {
    var %s $v1, %ft $readini(scriptcheck.ini,scripts,$hash(%s,32)), %ct $file(%s).mtime
    if %ft != %ct { 
      writeini scriptcheck.ini scripts $hash(%s,32) %ct
      echo -agt ( $nopath(%s) ) has been reloaded.
      .reload -rs $+ %i $qt(%s) 
    }
    inc %i
  }
}

Joined: Apr 2014
Posts: 19
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Apr 2014
Posts: 19
That version worked, thanks.


Link Copied to Clipboard