mIRC Home    About    Download    Register    News    Help

Print Thread
#162515 19/10/06 04:46 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
so ok, since mirc can use dos prompt to do things...
i wonder can mirc change properties of some file
specificaly compatibility options...

if anyone knows any triggers or command (thru dos p) i would apreciate it


IceCapped
#162516 19/10/06 11:25 AM
Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Not directly, but you can use set to do it in a cmd file (Note: this is not mIRCs /set wink)

Try this
Code:
alias set.compat {
  [color:gray];set the compatabilty layer for the app[/color]
  write -c oldapp.cmd set __COMPAT_LAYER=Win98
  [color:gray]; start the app, the /w switch means to wait for it to end[/color]
  write oldapp.cmd start /w "" $qt($mircexe)
  [color:gray]; delete cmd file after the app closes[/color]
  write oldapp.cmd del $(%0,0)
  [color:gray]; run the cmd. file[/color]
  run -h oldapp.cmd
}

Type this in the second mIRC when it starts //echo -a $os

Heres the codes for the layers
set __COMPAT_LAYER=Win95
set __COMPAT_LAYER=Win98
set __COMPAT_LAYER=Win2000
set __COMPAT_LAYER=NT4SP5
set __COMPAT_LAYER=256Color
set __COMPAT_LAYER=640x480
set __COMPAT_LAYER=DisableThemes
set __COMPAT_LAYER=International

SET __COMPAT_LAYER=LayerName1 [layerName2] [layerName3]...

And to disable the compatibility layer(s) after applying them.
SET __COMPAT_LAYER=
(This isn't needed in this context, but if you were working with a more complex batch file you would use it after running the app.)


Edit:
You can also do this by
Code:
//run -n cmd.exe /c set __COMPAT_LAYER=Win95&& $qt($mircexe)

Last edited by deegee; 19/10/06 11:39 AM.
#162517 19/10/06 02:35 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
so i have to use 2 mirc clients for this to work ?


IceCapped
#162518 19/10/06 02:39 PM
Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
No, I used $mircexe as an example wink
Change $mircexe to the full pathname of the file you want to run, remember to add quotes if theres a space in it.

#162519 19/10/06 03:45 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
now im confused frown

you made

1. alias
2. batch code where you state "Type this in the second mIRC when it starts //echo -a $os"

and 3. another code that mirc can run

so at the end now what :P ?


IceCapped
#162520 19/10/06 08:15 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
1. alias
^ that launches another mirc using what ever compat mode you set it to., replace $mircexe with what eer executable you want to use.

2. batch code where you state "Type this in the second mIRC when it starts //echo -a $os"
^ that was so in that second mirc from (1) you could see that it was infact in that compatability mode.

and 3. another code that mirc can run
^ this was an alternative method of launching an app using a compatability mode.

#162521 19/10/06 09:42 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
oh, just additional questions:

in this:
//run -n cmd.exe /c set __COMPAT_LAYER=Win2000&& $qt(some_file)

can i set for some_file this: $mircdirsystem\something.exe
or i need to specify full path (eg c:\mirc\system\something.exe)

also to ask, how to execute this too:
set __COMPAT_LAYER=DisableThemes

without runing 2 cmd's or its a must do (to run2 cmds) ?

sorry for being boring :P


IceCapped
#162522 19/10/06 11:33 PM
Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Quote:
can i set for some_file this: $mircdirsystem\something.exe
or i need to specify full path (eg c:\mirc\system\something.exe)

They are both the full path, so either will do

Quote:
also to ask, how to execute this too:
set __COMPAT_LAYER=DisableThemes

without runing 2 cmd's or its a must do (to run2 cmds) ?

Syntax is in my first post...
SET __COMPAT_LAYER=LayerName1 [layerName2] [layerName3]...

Code:
//run -n cmd.exe /c set __COMPAT_LAYER=Win2000 DisableThemes&& $qt(some_file)

Or, hiding the cmd window
Code:
//run -[color:green]h[/color] cmd.exe /c set __COMPAT_LAYER=Win2000 DisableThemes&& $qt(some_file)

#162523 19/10/06 11:44 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
unfortunately it doesnt work frown
it only runs the file but doesnt change its compatibility options

i use XP SP1, is this only ment for SP2+ ?


IceCapped

Link Copied to Clipboard