mIRC Home    About    Download    Register    News    Help

Print Thread
#204110 08/09/08 07:38 PM
D
DaMaSTeR
DaMaSTeR
D
Hello.

I am using the same thing that he wanted in this topic: https://forums.mirc.com/ubbthreads.php?ubb=showflat&Number=200651&page=1#Post200651

But there is a problem. I did my command like this:

[url=hello://world][url=hello://world][url=hello://world]hello://world[/url][/url][/url]

And I successfuly started my program (e.g test.exe)

But my program gets all of the line as a parameter. I just want world part of the command. But it sends me all of the line ; [url=hello://world][url=hello://world][url=hello://world]hello://world[/url][/url][/url]

Can't I get just the first, second etc. param.? Like:

if the address: [url=hello://one/two/three][url=hello://one/two/three][url=hello://one/two/three]hello://one/two/three[/url][/url][/url]

I want to take :

param1=one
param2=two
param3=three

not the other parts of the address.

Can you help me?

Last edited by DaMaSTeR; 08/09/08 07:39 PM.
#204137 09/09/08 04:06 PM
Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
If you have specific requirements as to what part of your URL you need, you need to parse those out yourself with your program. Windows can't guess what parts of the URL you need.

However, re-reading the documentation I posted makes me realize that it is slightly inaccurate:

Quote:
By adding these settings to the registry, attempts to navigate to URLs such as "alert:Hello%20World" would attempt to launch alert.exe and pass Hello World in the command-line.


The above text should tell you that it will pass "alert:Hello World" to the command line, not only hello world. You will always be given the fully qualified URL. What and how you deal with it is your responsibility, not Windows'.

#204142 09/09/08 05:07 PM
D
DaMaSTeR
DaMaSTeR
D
Well, the program that I want to send parameters is not coded by me. Its a game. I want to use this system to let players connect servers by clicking its link.

If you start the executable file of the game like this, you automaticly connect that server :

Code:
C:\game.exe +connect game1.server.com


So my link should be;

Code:
.. href="conn://game1.server.com">Click to connect</a>


Of course the game will not accept that data.

game.exe +connect [url=conn://game1.server.com][url=conn://game1.server.com][url=conn://game1.server.com]conn://game1.server.com[/url][/url][/url] ====> %1

I think I have to make my own program that gets and parses argument %1, and starting the game using it.

Thanks for helps man.


Link Copied to Clipboard