Inververs Posted October 23, 2014 Share Posted October 23, 2014 Autoit 3.3.9.0 has Changed: Run-time errors on objects no longer fatal (execution of the script is not halted). And it work in 3.3.12.0 But in beta 3.3.13.19 script ended with error The requested action with this object has failed Or maybe this is Script Breaking Changes? $a = ObjCreate('scripting.dictionary') $a.add('x','a') ConsoleWrite(@error & @CRLF) $a.add('x','a') ConsoleWrite(@error & @CRLF) >Running:(3.3.12.0):D:\Program Files\AutoIt3\autoit3.exe "D:\Users\user\Desktop\AutoIt v3 Script (2).au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop 0 -2147352567 +>18:03:05 AutoIt3.exe ended.rc:0 >Running:(3.3.13.19):D:\Program Files\AutoIt3\Beta\autoit3.exe "D:\Users\user\Desktop\AutoIt v3 Script (2).au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop 0 "D:\Users\user\Desktop\AutoIt v3 Script (2).au3" (45) : ==> The requested action with this object has failed.: $a.add('x','a') $a^ ERROR ->18:03:28 AutoIt3.exe ended.rc:1 Link to comment Share on other sites More sharing options...
trancexx Posted October 23, 2014 Share Posted October 23, 2014 Yeah, the change is intentional. Jon had a post about that some time ago giving explanation and basically redefining the word "stupid". However, I hope people that influence Jon these days will be smart, and more importantly eloquent, enough to make him reconsider the decision.I also hope for peace in the world. How big are chances for that? Mugen, jchd and Danyfirex 3 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Moderators Solution Melba23 Posted October 24, 2014 Moderators Solution Share Posted October 24, 2014 Inververs,Other than the intentional nature of the change, I completely refute the version of events in the post above - it is nothing more that the usual bitter and twisted personal attack we have come to expect from that member. >Jon made a design decision - his privilege - and as a matter of fact there was a fair amount of opposition expressed. His argument was basically that AutoIt should not silently accept script errors and so hide their existence from the user. You can get round the problem very easily by creating your own simple error handler like this and registering it every time there might be a problem: $a = ObjCreate('scripting.dictionary') ; There might be a fatal error in the following code, so prepare for it Template_COMErrorRegister() $a.add('x', 'a') ConsoleWrite(@error & @CRLF) $a.add('x', 'a') ConsoleWrite(@error & @CRLF) ; Fatal error section ends, so no further protection required Template_COMErrorUnregister() ; ---------------------------------------------------------------------- Func Template_COMErrorRegister() Global $__g_oTemplateCOMErrorHandler = ObjEvent("AutoIt.Error", "Template_COMErrFunc") EndFunc ;==>Template_COMErrorRegister Func Template_COMErrorUnregister() Global $__g_oTemplateCOMErrorHandler = 0 EndFunc ;==>Template_COMErrorUnregister Func Template_COMErrFunc() ; Do nothing, just check @error after suspect functions. EndFunc ;==>Template_COMErrFuncIn fact the change has already proved useful. We recently discovered by chance that scripting dictionary objects do not accept 64-bit keys - but as in the past AutoIt failed silently on the error, the user was not informed and so got an empty return when using _ArrayUnique. I rewrote the function to get around this problem and I have added an error handler like the one above to cope with the case of an Int64 being passed inadvertently as a key. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 24, 2014 Moderators Share Posted October 24, 2014 trancexx,You have been warned before about making ad hominem attacks when commenting on AutoIt development. By all means disagree with decisions - as many did with the one under discussion - but remember that it was your decision to resign as a developer which means you now have no role in the development process. As you seem incapable of restraining your impulse to make it personal whenever you post rather than applying your undoubted talent to the benefit of the community you will be unable to do either for a while. Unfortunately this means that we all lose - but your actions leave little choice. You cannot expect to remain welcome in a community upon which you so often inflict your vitriolic attacks. >M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Inververs Posted October 24, 2014 Author Share Posted October 24, 2014 trancexx, Melba23, thank you. Clear. I know about ObjEvent ("AutoIt.Error", "func"), but even so, thanks for the example and for the fact that you reply in such detail. 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