DigDeep Posted May 1, 2015 Share Posted May 1, 2015 (edited) I am trying to add the code that will check if the process gets terminated while some functions are running then a LogPath would be written.Say, during Step 1 SplashTextOn are the functions and activities going on. If the process is terminated from task manager or get closed for any reason, then a log path would be written.I have already assigned all the log path process which is working fine and I have given some paths below. I just need to get the logpath added somewhere which will do the termination work.Say my log path line would be:_FileWriteLog($InstallEvent, "Process Cancelled.") expandcollapse popup#Region #AutoIt3Wrapper_Run_Tidy=y #EndRegion #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region $Form1 = GUICreate("Form1", 388, 241, 750, 360) $Step1 = GUICtrlCreateLabel("Step 1", 32, 40, 42, 20) $Step2 = GUICtrlCreateLabel("Step 3", 216, 40, 42, 20) $Step3 = GUICtrlCreateLabel("Step 2", 120, 40, 42, 20) $Step4 = GUICtrlCreateLabel("Step 4", 312, 40, 42, 20) $Input_Text = GUICtrlCreateInput("", 48, 104, 289, 24) $OK = GUICtrlCreateButton("OK", 152, 176, 75, 25) GUISetState(@SW_SHOW) #EndRegion $Log = 0 Func Log() If $Log = 0 Then ; Creating Logs Global $Directory = ; Create the Log file in this folder Global $InstallEvent = $InstallFolder & "\" & "Process.log" _FileCreate($InstallEvent) If FileExists($InstallEvent) Then ; Check we have created the install log file before writing to it $Log = 1 EndIf EndIf EndFunc While 1 $nMsg = GUIGetMsg() $aInfo = GUIGetCursorInfo($Form1) If $aInfo[2] Then If $aInfo[4] = $Input_Text Then GUICtrlSetData($Input_Text, "") EndIf Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $OK Select Case GUICtrlRead($Input_Text) = '1' $verify = MsgBox(68, "", "Do you want to proceed with Step 1?") Select Case $verify = '6' Exit Case $verify = '7' ; Cancel Exit EndSelect MsgBox(0, "", "step1") ; Running multiple functions SplashTextOn("Step 1", "Running multiple functions under Step 1.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() Log() _FileWriteLog($InstallEvent, "Step 1 completed.") Case GUICtrlRead($Input_Text) = '2' MsgBox(0, "", "step2") ; Running multiple functions SplashTextOn("Step 2", "Running multiple functions under Step 2.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() Log() _FileWriteLog($InstallEvent, "Step 2 completed.") Case GUICtrlRead($Input_Text) = '3' MsgBox(0, "", "step3") ; Running multiple functions SplashTextOn("Step 3", "Running multiple functions under Step 3.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() Log() _FileWriteLog($InstallEvent, "Step 3 completed.") Case GUICtrlRead($Input_Text) = '4' MsgBox(0, "", "step4") ; Running multiple functions SplashTextOn("Step 3", "Running multiple functions under Step 3.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() Log() _FileWriteLog($InstallEvent, "Step 4 completed.") EndSelect EndSwitch WEnd Edited May 1, 2015 by sunshinesmile84 Link to comment Share on other sites More sharing options...
water Posted May 1, 2015 Share Posted May 1, 2015 Is OnAutoItExitRegister() what you are looking for? 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...
DigDeep Posted May 1, 2015 Author Share Posted May 1, 2015 Thanks water.With the remarks mentioned for OnAutoItExitRegister(), I would say Yes.0Natural closing.1close by Exit function.2close by clicking on exit of the systray.3close by user logoff.4close by Windows shutdown.Could you please help me to get this added here? Link to comment Share on other sites More sharing options...
water Posted May 1, 2015 Share Posted May 1, 2015 The example in the help file pretty good describes how to use the function, doesn't it? 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...
DigDeep Posted May 1, 2015 Author Share Posted May 1, 2015 I tried via multiple ways but nothing works out. One of the way was:expandcollapse popup#Region #AutoIt3Wrapper_Run_Tidy=y #EndRegion #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region $Form1 = GUICreate("Form1", 388, 241, 750, 360) $Step1 = GUICtrlCreateLabel("Step 1", 32, 40, 42, 20) $Step2 = GUICtrlCreateLabel("Step 3", 216, 40, 42, 20) $Step3 = GUICtrlCreateLabel("Step 2", 120, 40, 42, 20) $Step4 = GUICtrlCreateLabel("Step 4", 312, 40, 42, 20) $Input_Text = GUICtrlCreateInput("", 48, 104, 289, 24) $OK = GUICtrlCreateButton("OK", 152, 176, 75, 25) GUISetState(@SW_SHOW) #EndRegion OnAutoItExitRegister($Form1) $Log = 0 Func Log() If $Log = 0 Then ; Creating Logs Global $Directory = ; Create the Log file in this folder Global $InstallEvent = $InstallFolder & "\" & "Process.log" _FileCreate($InstallEvent) If FileExists($InstallEvent) Then ; Check we have created the install log file before writing to it $Log = 1 EndIf EndIf EndFunc Func Process_Terminated() Switch @error ;Case 0 ; _FileWriteLog($InstallEvent, "Natural closing.") Case 1 _FileWriteLog($InstallEvent, "close by Exit function.") ;MsgBox(0, "", "Process Cancelled") Case 2 _FileWriteLog($InstallEvent, "close by clicking on exit of the systray.") ;MsgBox(0, "", "Process Cancelled") Case 3 _FileWriteLog($InstallEvent, "close by user logoff.") Case 4 _FileWriteLog($InstallEvent, "close by Windows shutdown.") ;MsgBox(0, "", "Process Cancelled") EndSwitch EndFunc ;==>Process_Terminated While 1 $nMsg = GUIGetMsg() $aInfo = GUIGetCursorInfo($Form1) If $aInfo[2] Then If $aInfo[4] = $Input_Text Then GUICtrlSetData($Input_Text, "") EndIf Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $OK Select Case GUICtrlRead($Input_Text) = '1' $verify = MsgBox(68, "", "Do you want to proceed with Step 1?") Select Case $verify = '6' Exit Case $verify = '7' ; Cancel Exit EndSelect MsgBox(0, "", "step1") Process_Terminated() ; Running multiple functions SplashTextOn("Step 1", "Running multiple functions under Step 1.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() Log() _FileWriteLog($InstallEvent, "Step 1 completed.") Case GUICtrlRead($Input_Text) = '2' MsgBox(0, "", "step2") Process_Terminated() ; Running multiple functions SplashTextOn("Step 2", "Running multiple functions under Step 2.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() Log() _FileWriteLog($InstallEvent, "Step 2 completed.") Case GUICtrlRead($Input_Text) = '3' MsgBox(0, "", "step3") Process_Terminated() ; Running multiple functions SplashTextOn("Step 3", "Running multiple functions under Step 3.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() Log() _FileWriteLog($InstallEvent, "Step 3 completed.") Case GUICtrlRead($Input_Text) = '4' MsgBox(0, "", "step4") Process_Terminated() ; Running multiple functions SplashTextOn("Step 3", "Running multiple functions under Step 3.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() Log() _FileWriteLog($InstallEvent, "Step 4 completed.") EndSelect EndSwitch WEnd Link to comment Share on other sites More sharing options...
water Posted May 1, 2015 Share Posted May 1, 2015 expandcollapse popup#Region #AutoIt3Wrapper_Run_Tidy=y #EndRegion #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region $Form1 = GUICreate("Form1", 388, 241, 750, 360) $Step1 = GUICtrlCreateLabel("Step 1", 32, 40, 42, 20) $Step2 = GUICtrlCreateLabel("Step 3", 216, 40, 42, 20) $Step3 = GUICtrlCreateLabel("Step 2", 120, 40, 42, 20) $Step4 = GUICtrlCreateLabel("Step 4", 312, 40, 42, 20) $Input_Text = GUICtrlCreateInput("", 48, 104, 289, 24) $OK = GUICtrlCreateButton("OK", 152, 176, 75, 25) GUISetState(@SW_SHOW) #EndRegion OnAutoItExitRegister("_Terminate") $Log = 0 Func Log() If $Log = 0 Then ; Creating Logs Global $Directory = ; Create the Log file in this folder Global $InstallEvent = $InstallFolder & "\" & "Process.log" _FileCreate($InstallEvent) If FileExists($InstallEvent) Then ; Check we have created the install log file before writing to it $Log = 1 EndIf EndIf EndFunc Func Process_Terminated() Switch @error ;Case 0 ; _FileWriteLog($InstallEvent, "Natural closing.") Case 1 _FileWriteLog($InstallEvent, "close by Exit function.") ;MsgBox(0, "", "Process Cancelled") Case 2 _FileWriteLog($InstallEvent, "close by clicking on exit of the systray.") ;MsgBox(0, "", "Process Cancelled") Case 3 _FileWriteLog($InstallEvent, "close by user logoff.") Case 4 _FileWriteLog($InstallEvent, "close by Windows shutdown.") ;MsgBox(0, "", "Process Cancelled") EndSwitch EndFunc ;==>Process_Terminated While 1 $nMsg = GUIGetMsg() $aInfo = GUIGetCursorInfo($Form1) If $aInfo[2] Then If $aInfo[4] = $Input_Text Then GUICtrlSetData($Input_Text, "") EndIf Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $OK Select Case GUICtrlRead($Input_Text) = '1' $verify = MsgBox(68, "", "Do you want to proceed with Step 1?") Select Case $verify = '6' Exit Case $verify = '7' ; Cancel Exit EndSelect MsgBox(0, "", "step1") Process_Terminated() ; Running multiple functions SplashTextOn("Step 1", "Running multiple functions under Step 1.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() Log() _FileWriteLog($InstallEvent, "Step 1 completed.") Case GUICtrlRead($Input_Text) = '2' MsgBox(0, "", "step2") Process_Terminated() ; Running multiple functions SplashTextOn("Step 2", "Running multiple functions under Step 2.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() Log() _FileWriteLog($InstallEvent, "Step 2 completed.") Case GUICtrlRead($Input_Text) = '3' MsgBox(0, "", "step3") Process_Terminated() ; Running multiple functions SplashTextOn("Step 3", "Running multiple functions under Step 3.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() Log() _FileWriteLog($InstallEvent, "Step 3 completed.") Case GUICtrlRead($Input_Text) = '4' MsgBox(0, "", "step4") Process_Terminated() ; Running multiple functions SplashTextOn("Step 3", "Running multiple functions under Step 3.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() Log() _FileWriteLog($InstallEvent, "Step 4 completed.") EndSelect EndSwitch WEnd Func _Terminate() _FileWriteLog($InstallEvent, "Script terminated.") EndFunc 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...
DigDeep Posted May 1, 2015 Author Share Posted May 1, 2015 This not running...I don't see you have called your Func _Terminate() anywhere.Do I have to remove the Func Process_Terminated() and replace Process_Terminated() with _Terminate() Link to comment Share on other sites More sharing options...
water Posted May 1, 2015 Share Posted May 1, 2015 I "called" function _Terminate inOnAutoItExitRegister("_Terminate") 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...
water Posted May 1, 2015 Share Posted May 1, 2015 If you want to check the exit method you need to check @exitMethod not @error. 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...
water Posted May 1, 2015 Share Posted May 1, 2015 I had to change a few lines because I got syntax errors and missing includes:expandcollapse popup#Region #AutoIt3Wrapper_Run_Tidy=y #EndRegion #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <File.au3> #Region $Form1 = GUICreate("Form1", 388, 241, 750, 360) $Step1 = GUICtrlCreateLabel("Step 1", 32, 40, 42, 20) $Step2 = GUICtrlCreateLabel("Step 3", 216, 40, 42, 20) $Step3 = GUICtrlCreateLabel("Step 2", 120, 40, 42, 20) $Step4 = GUICtrlCreateLabel("Step 4", 312, 40, 42, 20) $Input_Text = GUICtrlCreateInput("", 48, 104, 289, 24) $OK = GUICtrlCreateButton("OK", 152, 176, 75, 25) GUISetState(@SW_SHOW) #EndRegion OnAutoItExitRegister("Process_Terminated") CreateLog() ; Set up Log file While 1 $nMsg = GUIGetMsg() $aInfo = GUIGetCursorInfo($Form1) If $aInfo[2] Then If $aInfo[4] = $Input_Text Then GUICtrlSetData($Input_Text, "") EndIf Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $OK Select Case GUICtrlRead($Input_Text) = '1' $verify = MsgBox(68, "", "Do you want to proceed with Step 1?") Select Case $verify = '6' Exit Case $verify = '7' ; Cancel Exit EndSelect MsgBox(0, "", "step1") Process_Terminated() ; Running multiple functions SplashTextOn("Step 1", "Running multiple functions under Step 1.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() ;_FileWriteLog($InstallEvent, "Step 1 completed.") Case GUICtrlRead($Input_Text) = '2' MsgBox(0, "", "step2") Process_Terminated() ; Running multiple functions SplashTextOn("Step 2", "Running multiple functions under Step 2.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() ;_FileWriteLog($InstallEvent, "Step 2 completed.") Case GUICtrlRead($Input_Text) = '3' MsgBox(0, "", "step3") Process_Terminated() ; Running multiple functions SplashTextOn("Step 3", "Running multiple functions under Step 3.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() ;_FileWriteLog($InstallEvent, "Step 3 completed.") Case GUICtrlRead($Input_Text) = '4' MsgBox(0, "", "step4") Process_Terminated() ; Running multiple functions SplashTextOn("Step 3", "Running multiple functions under Step 3.", 275, 100, -1, -1, "Verdana") Sleep(10000) SplashOff() ;_FileWriteLog($InstallEvent, "Step 4 completed.") EndSelect EndSwitch WEnd Func CreateLog() ; Creating Logs Local $InstallFolder = @ScriptDir ; Create the Log file in this folder Local $InstallEvent = $InstallFolder & "\" & "Process.log" _FileCreate($InstallEvent) EndFunc ;==>CreateLog Func Process_Terminated() Switch @exitMethod Case 0 ;_FileWriteLog($InstallEvent, "Natural closing.") MsgBox(0, "", "Natural closing.") Case 1 ;_FileWriteLog($InstallEvent, "close by Exit function.") MsgBox(0, "", "close by Exit function.") Case 2 ;_FileWriteLog($InstallEvent, "close by clicking on exit of the systray.") MsgBox(0, "", "close by clicking on exit of the systray.") Case 3 ;_FileWriteLog($InstallEvent, "close by user logoff.") Case 4 ;_FileWriteLog($InstallEvent, "close by Windows shutdown.") MsgBox(0, "", "close by Windows shutdown.") EndSwitch EndFunc ;==>Process_Terminated 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...
DigDeep Posted May 1, 2015 Author Share Posted May 1, 2015 sorry to bug u bro... but this is still giving UNKNOWN MACRO error and creating the log file as either "Natural Closing" or "Close by Exit Function". Link to comment Share on other sites More sharing options...
water Posted May 1, 2015 Share Posted May 1, 2015 You mean @exitMethod?If yes, which version of autoIt do you run? 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...
DigDeep Posted May 1, 2015 Author Share Posted May 1, 2015 Version 3.4.4 Link to comment Share on other sites More sharing options...
DigDeep Posted May 1, 2015 Author Share Posted May 1, 2015 is there an upgraded version than this? I don't see any though... Link to comment Share on other sites More sharing options...
water Posted May 1, 2015 Share Posted May 1, 2015 That is the version of ScIte.What do you get when you runMsgBox(0, "", @AutoItVersion) 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...
DigDeep Posted May 1, 2015 Author Share Posted May 1, 2015 3.3.12.0 Link to comment Share on other sites More sharing options...
water Posted May 1, 2015 Share Posted May 1, 2015 I run the same version of Autoit and do not get the Unknown Macro error.Can you please post the content of the SciTE output pane after having pressed Ctrl+F5 (Syntax Check)? 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...
DigDeep Posted May 1, 2015 Author Share Posted May 1, 2015 (edited) I haven't changed anything from your code. When I run as F5, it gives me no error but then closes out after every button action. When I run from the exe, I get the attached error. Edited May 1, 2015 by sunshinesmile84 Link to comment Share on other sites More sharing options...
water Posted May 1, 2015 Share Posted May 1, 2015 The problem is caused by calling function "Process_Terminated()" directly from your code.Remove all those lines from the "Select" loop. 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...
DigDeep Posted May 1, 2015 Author Share Posted May 1, 2015 I think it should work... I have removed all the Process_Terminated() from the Select loop.Will let you know in sometime with the result.And thanks for all your help. 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