mIRC Home    About    Download    Register    News    Help

Print Thread
Closing a open browser window command needed #115852 30/03/05 11:59 PM
Joined: Dec 2002
Posts: 99
M
MDA Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2002
Posts: 99
Greetings,

I'm opening a link and after performing a series of functions I need to close that link browser window automatically thru a mIRC switch command. I haven't been able to locate which mIRC command to use, and I'm hoping someone could reply with the switch command to close the url window open?

alias TCTasker {
;open browser at link
/url -n http://whatever.com
;perform a series of steps
.timer.test2 1 3 /run C:\1Report/4test.wsf
;close browser window
????
}

Thanks
MDA

Re: Closing a open browser window command needed #115853 31/03/05 09:54 AM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Consider this example:

Code:
[color:blue]; Type /step_1 to begin[/color]
 
alias step_1 {
  echo -s <Step 1>
 
  echo -s Opening IE Window...
  .comopen IE InternetExplorer.Application
  !.echo -q $com(IE, Visible, 4, bool, true)
  !.echo -q $com(IE, Navigate, 1, bstr, http://www.mirc.com)
 
  .timer 1 3 step_2
}
 
alias step_2 {
  linesep
  echo -s <Step 2>
 
  echo -s Doing something...
 
  .timer 1 5 step_3
}
 
alias step_3 {
  linesep
  echo -s <Step 3>
 
  echo -s Closing IE Window...
  if $com(IE) {
    !.echo -q $com(IE, Quit, 1)
    .comclose IE
  }
 
  linesep
  echo -s Goodbye!
}


To learn more about using COM objects with mIRC, search the tutorial section of mircscripts.org for the word "COM". For a list of methods and properties available for use with the InternetExplorer object, visit MSDN.

Re: Closing a open browser window command needed #115854 31/03/05 10:01 AM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Another hard-to-find resource is Hammer's introduction to COM and his list of useful objects (both via Google's cache).