| View previous topic :: View next topic |
| Author |
Message |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Wed Oct 27, 2004 9:05 am Post subject: how to call long file names and run |
|
|
I made my self a Steering Wheel helper and game launcher
Problems:
"Shell open" its not 100% compatible with all games
"run" dont work on long names
i used short LNK files but this is only bypass
Please help...
| Code: | Title Steering Wheel forced refresh
run C:\WINDOWS\system32\control.exe joy.cpl
DIALOG create,Steering Wheel helper,-1,0,300,200,savepos
DIALOG add,gradient,gradient1,0,0,,,white,white,,fit
dialog add,group,group1,-2,210,53,204
Dialog ADD,BITMAP,BITMAP1,10,10,200,200,C:\Backup\Pristav Paket\DEVEL\KODA\wingman.bmp
Dialog ADD,BITMAP,BITMAP2,10,220,32,32,C:\Program Files\EA GAMES\Need for Speed Underground 2 Demo\speed2demo.exe,Need for Speed Underground 2 Demo,CLICK,HAND
Dialog ADD,BITMAP,BITMAP3,60,220,32,32,C:\Program Files\Codemasters\Race Driver 2\RD2.exe,ToCA Race Driver 2,CLICK,HAND
Dialog ADD,BITMAP,BITMAP4,110,220,32,32,C:\Program Files\EA GAMES\Need For Speed Hot Pursuit 2\nfshp2.exe,Need For Speed Hot Pursuit 2,CLICK,HAND
Dialog ADD,BITMAP,BITMAP5,160,220,32,32,C:\Program Files\SCi Games\Richard Burns Rally\RichardBurnsRally.exe,Richard Burns Rally,CLICK,HAND
DiALOG show
:loop
wait event
goto @event()
:bitmap2click
shell open, C:\Program Files\EA GAMES\Need for Speed Underground 2 Demo\speed2demo.exe
goto loop
:bitmap3click
shell open, C:\Program Files\Codemasters\Race Driver 2\RD2.exe
goto loop
:bitmap4click
shell open, C:\Program Files\EA GAMES\Need For Speed Hot Pursuit 2\nfshp2.exe
goto loop
:bitmap5click
shell open, C:\Program Files\SCi Games\Richard Burns Rally\RichardBurnsRally.exe
goto loop
:close |
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Wed Oct 27, 2004 9:17 am Post subject: |
|
|
| thanks |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Wed Oct 27, 2004 9:35 am Post subject: |
|
|
OK i give up
i will use LNK files bypass
"run @shortname" or "shell open" give me the same problems
This commands are not fully compatible with 3d games i see...
The games cant access to sub folder/files
Just a joke...
DOS:
FILES=99
BUFFERS=99
OK bye bye then |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Wed Oct 27, 2004 10:13 am Post subject: |
|
|
I don't have any problems with long filenames. Sometimes you need to put the filename in quotes, like this:
| Code: | | run @chr(34)C:\Program Files\EA GAMES\Need For Speed Hot Pursuit 2\nfshp2.exe@chr(34) |
But this shouldn't be necessary with the shell command because the whole of the second parameter is the filename.
Many programs are poorly tested regarding path handling. The most common failing is that the program expects the current directory to be its own directory. This is not necessarily the case when you run a program from VDS unless to write the code to make it so. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed Oct 27, 2004 5:23 pm Post subject: |
|
|
| filip wrote: | | The games cant access to sub folder/files |
Aha, I think I know your problem. When starting a game from a LNK file, the LNK file sets the running-path to the path in which the game is installed, so it can find the files needed. Because both the run and shell commands don't do this, you have to change it yourself:
| Code: | rem First, put the program's EXE name into a variable, so you don't have to type it twice
%%Program = C:\Program Files\EA GAMES\Need For Speed Hot Pursuit 2\nfshp2.exe
rem The next line changes the path to the one of the game you want to run
directory change,@path(%%Program)
rem And the next line starts/executes it...
run @shortname(%%Program) |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|