Jump to content
Sign in to follow this  
Pao

Relative paths problem with function Run

Recommended Posts

Pao

Hello, I cannot run a program contained in a subfolder (it needs to be there)

I tried this:

#include <File.au3>

$apppath = _PathFull (@ScriptDir & "..\subfolder\")

Run("$apppath & program")

What's wrong?

Can anyone help me?

Share this post


Link to post
Share on other sites
MHz

Double periods are up a folder, so your not finding the subfolder

@ScriptDir & "\..\folder\" ; Up one directory level, then continue path to folder.
@ScriptDir & "\subfolder\" ; Path to subfolder

:)

Share this post


Link to post
Share on other sites
Pao

Oh hello again Mhz.

You're right about "\subfolder\".

The command doesn't work yet however.. is this right?

Run("$apppath & program")

Share this post


Link to post
Share on other sites
November

Oh hello again Mhz.

You're right about "\subfolder\".

The command doesn't work yet however.. is this right?

Run("$apppath & program")

Hi

Run($apppath & "program.exe")

Cheers

Edited by november

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Share this post


Link to post
Share on other sites
Pao

It works now.

Thank you November

Share this post


Link to post
Share on other sites
November

It works now.

Thank you November

Glad to ear!

Cheers mate... have a nice scripting day :)


Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

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  

×