bazinguuh Posted June 14, 2013 Share Posted June 14, 2013 Hi @all, The script I have am working on is scanning file with .pdf file types. If it scanned a pdf, it should be opened. So far, this is the code I have tried: Dim $FolderName = "C:\Users\AJ\Desktop\AUTOIT" ScanFolder($FolderName) Func ScanFolder($SourceFolder) $Search = FileFindFirstFile($SourceFolder & "\*.pdf") Run($Search) EndFunc Link to comment Share on other sites More sharing options...
x001z Posted June 14, 2013 Share Posted June 14, 2013 Maybe this could help Run(@ComSpec & " /c start " & $search) Link to comment Share on other sites More sharing options...
Danyfirex Posted June 14, 2013 Share Posted June 14, 2013 (edited) Hi. use: ShellExecute($Search) regards Edited June 14, 2013 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
TheSaint Posted June 14, 2013 Share Posted June 14, 2013 (edited) Have a closer reading of the Help file for FileFindFirstFile command and associated. Also throw in a MsgBox before the Run line to see what the return is. MsgBox(4096, "Result", $Search) Remember, you require two elements. [1] A full path to the pdf file. [2] An associated program to open the pdf file - either using that program (full path + space + pdf path) with the Run command or just use ShellExecute (with pdf path) for your system default. P.S. You may need to provide quotes (") for your paths too. Edited June 14, 2013 by TheSaint Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) 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