Schlitzgesicht Posted November 5, 2015 Posted November 5, 2015 Hello!I'm using the Windows Photo Printing Wizard in my script. Simplified example:#include <ScreenCapture.au3> #include <File.au3> Local $sTempFile_1 = _TempFile(@TempDir, "~ISO_", ".bmp") Local $sTempFile_2 = _TempFile(@TempDir, "~ISO_", ".bmp") local $GUI = GUICreate("Example", 200, 200) GUISetState(@SW_SHOW) Sleep(250) _ScreenCapture_CaptureWnd($sTempFile_1, $GUI) Sleep(500) _ScreenCapture_CaptureWnd($sTempFile_2, $GUI) If Not @error Then Local $CommDlg = ObjCreate('WIA.CommonDialog') Local $Files = ObjCreate('WIA.Vector') If IsObj($CommDlg) And IsObj($Files) Then $Files.Add($sTempFile_1) $Files.Add($sTempFile_2) $CommDlg.ShowPhotoPrintingWizard($Files) FileDelete($sTempFile_1) FileDelete($sTempFile_2) EndIf EndIfThe script runs fine, but unfortunately Microsoft decided to enable "Fit to Frame" by default and there's apparently no way to turn it off, so it has to be manually disabled each time I start the wizard.The script pauses while the Wizard is showing, so I can't uncheck the checkbox within my script. Is there any way to run $CommDlg.ShowPhotoPrintingWizard($Files) in the background without using a second script? I tried adlibbing, but the script still pauses.
JohnOne Posted November 5, 2015 Posted November 5, 2015 Is there any way to run $CommDlg.ShowPhotoPrintingWizard($Files) in the background without using a second script? I tried adlibbing, but the script still pauses.No.AutoIt scripts run in a single thread, if it is blocked then another script is needed to automate whatever is blocking it. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Schlitzgesicht Posted November 5, 2015 Author Posted November 5, 2015 No.AutoIt scripts run in a single thread, if it is blocked then another script is needed to automate whatever is blocking it.I know, but since ShowPhotoPrintingWizard isn't technically "part of the script", it runs in a seperate thread anyway I assumed, like ShellExecute/ShellExecuteWait.
water Posted November 5, 2015 Posted November 5, 2015 It is technically "part of the script" because the method is called by the AutoIt script. 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
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