mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 3 1 2 3
Re: Auto away script, multi networks [Re: Wims] #220168 06/04/10 05:45 PM
Joined: Dec 2002
Posts: 476
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 476
It still dont turn off away if Im active. Strange if it works for you and not me.

Re: Auto away script, multi networks [Re: Deep3D] #220173 06/04/10 08:13 PM
Joined: Jul 2006
Posts: 3,558
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,558
How are you testing it ? I've just replaced your %var with a number like 15, used something like /timera 0 2 away_sys and typed something in a channel, ~15 seconds later, $idle was > 15 on each network so it put me away, when I broke my idle again, it put me back etc...

I think the problem is that you need to check 'cancel away on activity' in mIRC option (alt + o > IRC > option)


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Auto away script, multi networks [Re: Wims] #220174 06/04/10 08:25 PM
Joined: Dec 2002
Posts: 476
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 476
This is how I test it: I have /timer 0 10 away_sys

And I set the %away.system.auto.check 60

The part that sets me away works great. But not set me back, I find it strange.

Cancel away on activity is unchecked, I dont use it. Then the auto away and the rest of my away system wont work how Id like it to work.

Re: Auto away script, multi networks [Re: Deep3D] #220176 06/04/10 09:00 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
If you are using identifiers like $away and $idle or using them as props you probably need mirc to cancel your away status on activity. Unless you want to write your code to do this.

Re: Auto away script, multi networks [Re: Deep3D] #220178 06/04/10 09:06 PM
Joined: Jul 2006
Posts: 3,558
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,558
What I'm saying is that you need this to be checked for my script to work.
I'm only checking if the value of $away is $false on one server to consider you're not away anymore, that's why you need something to unset your away status on activity, either the mirc option (simple), or a scripted solution but really, no need to use a script when mirc purely do what you want.
Quote:

Then the auto away and the rest of my away system wont work how Id like it to work.
Is your away system not supposed to be the script I'm giving you, that need this option to be checked ?


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Auto away script, multi networks [Re: Wims] #220190 07/04/10 03:12 AM
Joined: Dec 2002
Posts: 476
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 476
The code you wrote is a part of my away system. smile

Code:
away_sys {
  if %away.system == off && %away.system.auto == on {
    set -u %autoaw 1 | set -u %aw | set -u %naw | scon -at1 aw
    if (!$away) && (%autoaw) && (!%aw) {
      scon -at1 away Auto away after $duration(%away.system.auto.check,2) of idle
      echo.mode You have been automatically marked as being away after $duration(%away.system.auto.check,2) of idle
      titlebar - [Away: Auto]
    }
    if (!%autoaw) && (%aw) {
      scon -at1 away
      echo.mode Away has automatically been turned off
      titlebar
    }
  }
}

This is how I ended up. :)

aw {
  if ($idle < %away.system.auto.check) { set -k %autoaw 0 | if ($away) set -k %aw 1 | else set -k %naw 1 }
  if ($idle > %away.system.auto.check) { set -k %autoaw 1 | if ($away) set -k %aw 0 | else set -k %naw 0 }
}

Last edited by Deep3D; 07/04/10 03:44 AM.
Re: Auto away script, multi networks [Re: Deep3D] #220202 07/04/10 03:24 PM
Joined: Jul 2006
Posts: 3,558
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,558
Well, there is a big difference between what was my code and how you used it, I'm not sure why you modified it this way if you don't know what it does.
If you don't want to check the mIRC option, that's your problem, but my code will not work without it.Now it's up to you, I won't spend more time on this.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Auto away script, multi networks [Re: Deep3D] #220218 07/04/10 08:29 PM
Joined: Feb 2009
Posts: 133
C
chacha Offline
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
Originally Posted By: Deep3D
set -u %autoaw 1

set -u <- what??
/help /set

set -uN


WorldDMT
Re: Auto away script, multi networks [Re: chacha] #220223 07/04/10 08:52 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
/set -u unsets the variable after the routine has finished. It's interchangeable with /var in many cases, but not all cases.
A routine may for example be an alias calling several other aliases - you could access a local variable only within each alias itself. It's also handy in $submenu and "begin": you can access the /set -u global variable in all the other $1 values; the var will not unset until the complete submenu was processed.

Edit:
Originally Posted By: help
[...] If you specify a zero for N, the variable is unset when the script finishes.
So he could have put: -u0 smile

Re: Auto away script, multi networks [Re: Horstl] #220224 07/04/10 08:59 PM
Joined: Feb 2009
Posts: 133
C
chacha Offline
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
ok smile


WorldDMT
Re: Auto away script, multi networks [Re: Wims] #220241 08/04/10 11:54 AM
Joined: Dec 2002
Posts: 476
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 476
I modify your code into how I'd like it. And It works perfect, and Im greatfull that you spend your time on it. If you didn't I wouldn't have the script. So thank you.

I didn't want to use the mirc option because how the rest of my away system works.

Can you guys see any problem with how I edit the script?

Last edited by Deep3D; 08/04/10 12:08 PM.
Re: Auto away script, multi networks [Re: Deep3D] #220244 08/04/10 03:44 PM
Joined: Jul 2006
Posts: 3,558
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,558
my 'aw' alias was written to work in an specific way : with the mirc option 'cancel away on activity', if you don't want to use this option, you have to write a long script that will do the 'cancel away on activity' part.
If you have a problem with this then there's probably something wrong somewhere


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Auto away script, multi networks [Re: Wims] #220261 09/04/10 12:51 AM
Joined: Dec 2002
Posts: 476
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 476
Well, I made it work without mirc option 'cancel away on activity'.

In my away system if you get auto away it now cancel away on activity, and not with mirc option, it's scripted. If I choose to set myself away with the Away System I dont want cancel away on activity.

BUT, there is 1 fault in the script (anyone tell me if they see any others).
If I get disconnected from server without using /quit (in this case: [10053] Software caused connection abort) and when the script connects again it sets me away 10 +/- times and then everything is ok (problem is just while reconnecting). Its annoying to get all the echos and the fact that there is actually a fault in the script. smile

Code:
away.system.auto {
  if %away.system == off && %away.system.auto == on {
    set -u %autoaw 1 | set -u %aw | set -u %naw | scon -at1 aw
    if (!$away) && (%autoaw) && (!%aw) {
      scon -at1 away %away.system.auto.message
      echo.mode You have been automatically marked as being away after $duration(%away.system.auto.check,2) of idle
      titlebar - [Away: Auto]
    }
    if (!%autoaw) && (%aw) {
      scon -at1 away
      echo.mode Away has automatically been turned off
      titlebar
    }
  }
}


Code:
aw {
  if ($idle < %away.system.auto.check) { set -k %autoaw 0 | if ($away) set -k %aw 1 | else set -k %naw 1 }
  if ($idle > %away.system.auto.check) { set -k %autoaw 1 | if ($away) set -k %aw 0 | else set -k %naw 0 }
}

Last edited by Deep3D; 09/04/10 01:36 AM.
Re: Auto away script, multi networks [Re: Deep3D] #220290 10/04/10 05:56 AM
Joined: Dec 2002
Posts: 476
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 476
no? smile

Re: Auto away script, multi networks [Re: Deep3D] #220293 10/04/10 08:38 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
No errors that I can see, but here's a suggestion
Code:
aw {
  set -k %autoaw $iif($idle < %away.system.auto.check,0,1)
  if $away {
    set -k $iif(%autoaw,%aw,%naw) 1
    set -k $iif(%autoaw,%naw,%aw) 0
  }
}


Re: Auto away script, multi networks [Re: RusselB] #220306 10/04/10 04:23 PM
Joined: Dec 2002
Posts: 476
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 476
Thank you. smile (EDIT: Your suggestion did not turn off away when I typed in channel)

As I explained earlier.

If I get disconnected (not on purpose), and when reconnecting script sets me away +/- 10 times in the connecting progress, how to stop that? It's just so I dont get annoying echos.

Want me to write more in detail or is this understandable?

Last edited by Deep3D; 10/04/10 04:26 PM.
Re: Auto away script, multi networks [Re: Deep3D] #220307 10/04/10 05:27 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
If you don't use mirc's internal system to turn off away then you are douing it with scripted events. Show your events.

Re: Auto away script, multi networks [Re: DJ_Sol] #220325 11/04/10 05:08 AM
Joined: Dec 2002
Posts: 476
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 476
If events is code I have posted it twice above.

Re: Auto away script, multi networks [Re: Deep3D] #220335 11/04/10 11:59 AM
Joined: Feb 2009
Posts: 133
C
chacha Offline
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
to auto return you have to do it with ON INPUT event something like
Code:
on *:input:*:if (away condition) <return code>


WorldDMT
Re: Auto away script, multi networks [Re: chacha] #220488 15/04/10 07:07 PM
Joined: Jul 2006
Posts: 248
B
bwuser Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Jul 2006
Posts: 248
Originally Posted By: chacha
to auto return you have to do it with ON INPUT event something like
Code:
on *:input:*:if (away condition) <return code>

not really, mIRC resets $idle counter to 0 before triggering on INPUT, so original version with comparisons will work

Page 2 of 3 1 2 3