mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2007
Posts: 21
M
marco50 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Aug 2007
Posts: 21
in ver. 6.3, the /background command doesn't work as in 6.21
and as described in the help section.
Syntax in help:
/background [options] [window] [filename]

in 6.3, I cannot specify a custom window name. for example:
/background @mywindow mypicture.jpg
will cause the error message
* /background: no such file 'C:\path_to_mirc_directory\@mywindow'

any suggestions?

[added later by marco50:]
I experienced another problem just now:
/hadd does not work any more within events (eg on JOIN, on ACTIVE). It will cause the error msg:
* /hadd: no such table 'wnicks'
although wnicks has been created in on START event

Similar behavior with /toolbar within events. eg:
/toolbar -y100 afk
will cause "/toolbar: no such button 'afk'" - although the afk button does exist.

Last edited by marco50; 21/08/07 05:35 AM.
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
- There is a thread about that background problem, click here smile

- I cannot confirm any problems with the hadd and toolbar commands, I'm using them both on v 6.3 and they're working fine for me.

To check whether or not a hash table exists: if ($hget(name of table)) { ... }
To check whether or not a toolbar item exists: if ($toolbar(name of item)) { ... }

...Try to debug your script with these exemplary conditions. Or maybe you're using some kind of broken syntax?

Joined: Aug 2007
Posts: 21
M
marco50 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Aug 2007
Posts: 21
1) background stuff: I'm sorry to have posted it here. 5 min before u answered my posting I found this item in the bugs section frown

2) hash table:
created it in on START with /hmake -s wconn 10
hadd called in:
on *:ACTIVE:*: { /hadd wconn active $cid }
when I enter "//hadd blabla" manually in a window, it works fine.

3) toolbar:
//echo -a $toolbar(afk)
returns 37.
when I enter "/toolbar -y100 afk" manually in a window, it works fine.

But I found a workaround. look, my 6.21-code was:

Code:
on *:ACTIVE:*: {
  /hadd wconn active $cid
  if ($serverip == 255.255.255.255) { /toolbar -y100 afk }
  else { 
    /toolbar -y255 afk 
    if ($hget(wconn,[ $+($cid,.,away) ]) == no) { 
      /toolbar -pz3 afk v1\ico\afk0.ico
      /toolbar -t afk "AFK setzen" 
    }
    else {
      /toolbar -pz3 afk v1\ico\afk1.ico 
      /toolbar -t afk "AFK zurücknehmen"
    }
  }
}

this code worked in 6.21 but in 6.3 it does not. Now, I moved the hadd to the end of the event (don't ask me why I did so):

Code:
on *:ACTIVE:*: {
  if ( ... ) { ... }
  else { 
      ...
  }
  /hadd wconn active $cid
}

IMO this move doesn't make any sense. but now, surprisingly everything works - hadd and toolbar!
Seems to be a runtime problem.
in 6.21 everything was OK

I have the same problems with another hash table in other events. I'll try to move the hadd lines around. just to see what hapens...

Last edited by marco50; 21/08/07 09:04 AM.
Joined: Aug 2007
Posts: 21
M
marco50 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Aug 2007
Posts: 21
post scriptum
when I wrote the previous posting, I have not noticed that there was still an error message that I did not see because somewhere in the script I had a /clear command for the outpout window.
the complete examination (code stripped to the essential part but still working) is here


Link Copied to Clipboard