Sign in to follow this  
Followers 0
kopola

How to add a variable into a full path?

3 posts in this topic

How to add a variable into a full path like that :

$1= game
copy("c:/program files/ $1 [...])

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

example:

$1 = game.exe
Run("C:\Program Files\" & $1)

see if that works for ya

Or

$1 = game.exe
Run(@Programfilesdir & $1)
Edited by Swift

Share this post


Link to post
Share on other sites

example:

$1 = game.exe
 Run("C:\Program Files\" & $1)

see if that works for ya

Or

$1 = game.exe
 Run(@Programfilesdir & $1)

That requires "Quotes"

try this

$Program = "Game.exe" 
If FileExists("C:\Program Files\" & $Program) Then
    Run(FileGetShortName("C:\Program Files\" & $Program))
Else
    MsgBox(0x0, "Error!", "The file was not found    ", 4)
EndIf

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0