AlienStar Posted August 22, 2009 Share Posted August 22, 2009 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 EndIfalso it woks wellbut now :if cdrom has these directories & files :Adobe reader\AcroRd32.exePDF\file.pdfhow 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 EndIfplease help meeeeeeeeeeeeeeee .... Link to comment Share on other sites More sharing options...
Yashied Posted August 22, 2009 Share Posted August 22, 2009 (edited) Run($var[$i] & "\Adobe reader\AcroRd32.exe|<--SPACE-->|" & $var[$i] & "\pdf\1.pdf")EDIT:ShellExecute("...\1.pdf") Edited August 22, 2009 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
AlienStar Posted August 22, 2009 Author Share Posted August 22, 2009 (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 August 22, 2009 by AlienStar Link to comment Share on other sites More sharing options...
Yashied Posted August 22, 2009 Share Posted August 22, 2009 (edited) but : what do you mean in : ShellExecute("...\1.pdf") ??For example, ShellExecute("E:\pdf\1.pdf") Edited August 22, 2009 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
AlienStar Posted August 22, 2009 Author Share Posted August 22, 2009 (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 August 22, 2009 by AlienStar Link to comment Share on other sites More sharing options...
Yashied Posted August 22, 2009 Share Posted August 22, 2009 no I don't mean that .. I put a space as you said and it works very well do have I use ShellExecute("E:\pdf\1.pdf") ???You will not need to write the path to Adobe Acrobat. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
AlienStar Posted August 22, 2009 Author Share Posted August 22, 2009 thanks so so so much Yashied for help I love Autoit Forum >_< Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now