Jump to content

Recommended Posts

Posted

hello everybody

we know all when we wanna open any file with a specific program we use this script :

for example pdf file with adobe reader

Run("E:\Adobe reader\AcroRd32.exe E:\PDF\file.pdf")

and it works well

something else :

when we wanna open a program or a file is existed in cdrom & don't know the name of drive we use :

$var = DriveGetDrive( "CDROM" )
If not @error Then
For $i = 1 to $var[0]
Run($var[$i] & "\Adobe reader\AcroRd32.exe")
Next
EndIf

also it woks well

but now :

if cdrom has these directories & files :

Adobe reader\AcroRd32.exe

PDF\file.pdf

how can I open file.pdf with AcroRd32.exe ???????

I tried this script but it didn't work :

$var = DriveGetDrive( "CDROM" )
If not @error Then
For $i = 1 to $var[0]
Run($var[$i] & "\Adobe reader\AcroRd32.exe" & $var[$i] & "\pdf\1.pdf")
Next
EndIf

please help meeeeeeeeeeeeeeee ....

Posted (edited)

Run($var[$i] & "\Adobe reader\AcroRd32.exe|<--SPACE-->|" & $var[$i] & "\pdf\1.pdf")

EDIT:

ShellExecute("...\1.pdf")

oh my gad the missed thing is Space !!!!

it works thanks so much

but : what do you mean in : ShellExecute("...\1.pdf") ??

Edited by AlienStar
Posted (edited)

no I don't mean that ..

I put a space as you said and it works very well

do have I to use ShellExecute("E:\pdf\1.pdf") ???

Edited by AlienStar

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...