mIRC Home    About    Download    Register    News    Help

Print Thread
#62744 03/12/03 06:29 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
If i want to open a file that arent identifyed by windows.. like config.cfg .. can i use a switch that let mirc (or windows) know i want to open it in notepad? smile i cant give the path to notepad.exe by default.. i have people from other countrys using my script, that means that the path to notepad can be diffrent.. for sweden its "program", not "program files" .. :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#62745 03/12/03 07:23 PM
Joined: Apr 2003
Posts: 414
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 414
On the first start you can search the notepad.exe..
Also you can look at HKEY_CLASSES_ROOT\Applications\Notepad.exe\shell\edit\command at that key..
But in some situation(i think) the key can missed.. You can check the registry key.. If is empty.. Start search manualy the notepad.exe..


mIRC Chm Help 6.16.0.3 Full Anchored!
#62746 03/12/03 07:40 PM
Joined: Nov 2003
Posts: 22
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Nov 2003
Posts: 22
i think the command line is:
"C:\windows\notepad.exe C:\path\to\config.cfg"
that should work u need to edit the stuff in red

#62747 03/12/03 08:07 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I know where i have notepad.exe . but i wanted a command like in windows, there u can add a shortcut to notepad.exe in "send to" then use that and open what file you want, it even opens *.exe files if u sedn that to notepad.. but the prob is that notepad arent located at the same place on all OS, windows XP have diffrent path to notepad.exe then what win2k have.. and windows98 also have a diffrent path.. smirk so i want to like //run path/file.cfg(notepad) just send it to notepad..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#62748 03/12/03 09:37 PM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
try /run notepad path/file.cfg


I refuse to engage in a battle of wits with an unarmed person. wink
#62749 03/12/03 11:38 PM
Joined: Nov 2003
Posts: 33
Ameglian cow
Offline
Ameglian cow
Joined: Nov 2003
Posts: 33
YES, /run notepad works

i tried JUST /run notepad, and it worked and opened notepad, so i assume that it would work with a file


--------------------
I may be insane, but I enjoy it!
#62750 04/12/03 01:27 PM
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
notepad / mspaint / winword

and alot of other programs have their default paths stored in windows so you can /run those without using their full path...

if you want to use this with other programs you could first test if it works using the "run" options in your start menu (windowsbutton+R)


If it ain't broken, don't fix it!

Link Copied to Clipboard