mIRC Home    About    Download    Register    News    Help

Print Thread
Run -n mistake? #251158 11/02/15 03:06 AM
Joined: Nov 2014
Posts: 79
N
Newbie Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Nov 2014
Posts: 79
Hi! I tried using Run -n to play a list of youtube videos I have written on an ini file. The first time the browser opens its hidden as assigned by the -n switch. However when it goes to open up the second link on the list it creates a tab and makes the browser window the main window (so it's not minimized the second time around). So is this a bug?

Oh and here's the code in question

Code:
alias -l playYT {
  var %file songrequest.ini
  if (!$ini(%file,0)) { return }
  ; -----------------------------------------
  var %song $ini(%file,1)
  run -n www.youtube.com/watch?v= $+ %song
  var %timer $calc($ini(%file,%song,1) + 7)
  remini %file %song
  .timerplayYTcont 1 %timer playYT
}

Last edited by Newbie; 11/02/15 03:07 AM.
Re: Run -n mistake? [Re: Newbie] #251169 11/02/15 12:30 PM
Joined: Dec 2008
Posts: 1,511
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,511
First of all remove -l from the alias because you are running an timer that calling an local alias and timer cannot trigger that alias. also (i am not sure but) try replace /run -n with /url command to see if it solve this, also what mIRC version are you using for?

Last edited by westor; 11/02/15 12:37 PM.
Re: Run -n mistake? [Re: westor] #251178 11/02/15 02:29 PM
Joined: Nov 2014
Posts: 79
N
Newbie Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Nov 2014
Posts: 79
7.38? The new one.
The timer runs fine and I've tested the script so I know the timer works. Unless that affects the run -n?
Run -n does open up the browser window and at first it has the window hidden. When it opens up a second tab (this is whether the first tab has been opened by the script or opened by myself) it pops up. So this is more so an issue of convenience than serious trouble.
And I was using url until I found out that Run -n can minimize the window...well sort of.

Re: Run -n mistake? [Re: Newbie] #251180 11/02/15 04:05 PM
Joined: Dec 2002
Posts: 4,798
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,798
Thanks for your bug report. When you specify -n with /run, mIRC passes the minimize option to the application and it is up to the application to process it. In this case, it looks like if the browser is running for the first time, it processes the option correctly, however if the browser is already running, it ignores the option. This is something the browser developers would need to fix.

Re: Run -n mistake? [Re: Khaled] #251181 11/02/15 04:11 PM
Joined: Nov 2014
Posts: 79
N
Newbie Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Nov 2014
Posts: 79
Thanks for the explanation!

Last edited by Newbie; 11/02/15 04:12 PM.