forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


how to call long file names and run

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Wed Oct 27, 2004 9:05 am    Post subject: how to call long file names and run Reply with quote

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
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Wed Oct 27, 2004 9:11 am    Post subject: Reply with quote

How about combining the run command and the @shortname() function? Smile

Code:
run @shortname(C:\Program Files\EA GAMES\Need For Speed Hot Pursuit 2\nfshp2.exe)

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Wed Oct 27, 2004 9:17 am    Post subject: Reply with quote

thanks
Back to top
View user's profile Send private message Send e-mail
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Wed Oct 27, 2004 9:35 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Wed Oct 27, 2004 10:13 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Wed Oct 27, 2004 5:23 pm    Post subject: Reply with quote

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... Smile
run @shortname(%%Program)

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group