rsn Posted July 8, 2022 Share Posted July 8, 2022 Hi all, Is there a way to not have my AutoIt script pause when the last line of the following is run? It seems to behave like a MsgBox but I need it to not. $objOutlook = ObjCreate("Outlook.Application" ) $oDialog = $objOutlook.Session.GetSelectNamesDialog() $oDialog.Display rsn Link to comment Share on other sites More sharing options...
water Posted July 8, 2022 Share Posted July 8, 2022 Not that I know of. You have to wait until the user has done his selection. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
rsn Posted July 8, 2022 Author Share Posted July 8, 2022 (edited) Curses. I was hoping for some way to call that dialog asynchronously so that the script could do something/anything. Heck, even exiting would be workable under the circumstances. I thank you for the info, @water. I'm humbled that the author of the Outlook UDFs answered my little question. Peace and victory, rsn Edited July 11, 2022 by rsn Link to comment Share on other sites More sharing options...
Solution jugador Posted July 8, 2022 Solution Share Posted July 8, 2022 You can try this UDF True AutoIt multi-threading!not tested so do reply if it work or not...... #include 'N.au3' NMain('main') Func main() Local $objOutlook = ObjCreate("Outlook.Application" ) If Not IsObj($objOutlook) Then Return ConsoleWrite("> Outlook.Application failed" & @CRLF) Local $o_ThreadA = NLocal() $o_ThreadA.Obj = $objOutlook NRun('task', $o_ThreadA) Sleep(100) ;.... ;.... Endfunc Func task($o_Obj) ConsoleWrite("> ThreadA started" & @CRLF) Local $o_Object = $o_Obj.Obj Local $oDialog = $o_Object.Session.GetSelectNamesDialog() $oDialog.Display ;.... ;.... Endfunc Link to comment Share on other sites More sharing options...
rsn Posted July 8, 2022 Author Share Posted July 8, 2022 Using the multi-thread, I was able to get it to work! @jugador: I wasn't able to use your code as written but after moving stuff around I came up with the minimum viable code below: #include <N.au3> NMain("main") Func main() $t = NRun("task") WinWait("Select Names:") ;... Endfunc Func task( ) $objOutlook = ObjCreate("Outlook.Application") $oDialog = $objOutlook.Session.GetSelectNamesDialog() $oDialog.Display Endfunc rsn Link to comment Share on other sites More sharing options...
jugador Posted July 9, 2022 Share Posted July 9, 2022 I haven't used that UDF. anyway if my hint solve your requirement that's good. if @Jon / @jpm can comment on this UDF ( True AutoIt multi-threading! ) will be great . 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