dolphins Posted November 9, 2011 Posted November 9, 2011 Hi, I have an AutoIt script that is reading and analysing a text file and then create a PDF of it (with a third party library). This script (.exe / it is compiled) is working fine if I start it in a DOS Box or from the desktop. If I start this script from inside another AutoIt script (I would call this a "subprogram"), I get other results in my PDF. How is that possible? Here is the command to start the script from inside the "main" AutoIt script: ShellExecuteWait($MyBin & "\PDFcreate.exe", "-I -P -AUTO", $PDFPrint & "\", "open", @SW_HIDE) Is it possible that the calling script can influence the called script? Regards Dolphins
water Posted November 9, 2011 Posted November 9, 2011 What do you mean by "I get other results"? Do you get an empty PDF, no PDF at all or an unexpected content? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
dolphins Posted November 9, 2011 Author Posted November 9, 2011 (edited) unexpected content basically 99% is ok ... but about 1% of the info in the PDF is wrong Edited November 9, 2011 by dolphins
water Posted November 9, 2011 Posted November 9, 2011 You could try to run ShellExecuteWait without the @SW_HIDE flag so you can see if there are any error messages. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
kylomas Posted November 9, 2011 Posted November 9, 2011 dolphins, What is the EXACT command from DOS? I do not see where you are passing a filename to "PDFcreate.exe" in the shellexecute command. kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
dolphins Posted November 9, 2011 Author Posted November 9, 2011 Command line from DOS Box is this: c:binpdfcreate.exe -I -P -AUTO So in this command I don't set the working directory. But if I paste this into a desktop link and set the working directory, there is no difference in the result compared to the DOS Box. The name of the files to read come from a text file (that name is defined in a config file). So I don't need to give the name of the input files in the command line, they come from that text file.
kylomas Posted November 9, 2011 Posted November 9, 2011 dolphins, I see...nice problem. You are going to need to identify some pattern to the difference, or see if there is an error anywhere (as water suggested). Good Luck and keep us posted! kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
water Posted November 9, 2011 Posted November 9, 2011 (edited) unexpected contentbasically 99% is ok ... but about 1% of the info in the PDF is wrongCan you post a screenshot of a PDF that is OK versus one in error? Maybe it's an ANSI/ASCII or a code page problem. Edited November 9, 2011 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
dolphins Posted November 9, 2011 Author Posted November 9, 2011 right now I am trying to get the graphical debugger working on my Win 7 Prof 64-bit ... I get some error from a Ribbon MRU Manager. I guess I need to get the debugger running to solve this. Thanks for your help in this thread!
dolphins Posted November 16, 2011 Author Posted November 16, 2011 Hi, I found the reason ... it is not related to AutoIt. It was my mistake. Thanks for your help and support!
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