Jump to content

Catch 'Unknown function name' Error


rdr
 Share

Recommended Posts

Hello all,

Is there a way to catch the 'Unknown function name' AutoIt error?

I am getting it in a case that is irrelevant to the message and although I have an error object that triggers my error handling method when com errors occur, I am just getting a pop up message when this error happens. Is there a way to handle it differently?

Thank you,

rdr

//edit: I am using the latest Beta version

Edited by rdr
Link to comment
Share on other sites

  • Moderators

rdr,

The obvious solution is to syntax check your code to make sure you do not have any missing includes - the ususal reason for such errors. If you use the full SciTE4AutoIt3 package you can use Au3Check to do this - and if you run the script from within the editor it happens automatically. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thank you for the reply.

The thing is that I get the error in a very specific case: when a process of the software I am manipulating through AutoIt is left running. In the case were a fresh start of the software is made, the error does not occur. So, could it still be a missing include?

Link to comment
Share on other sites

  • Moderators

rdr,

Why would another app running cause an "unknown function" error in an AutoIt script? :wacko:

Can you post the section of code that calls this "unknown function"? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Heh, I can understand your puzzle, but it looks like it just happens. I am using LibreOffice and I am just calling a method on its API. This is the part of the code:

...

1. $oReturn = $oDesktop.loadComponentFromURL($sURL, "_default", 0, $aoProperties)
2.  If Not IsObj($oReturn) Then
3.       _ErrorNotify("Error", $sFuncName, "", "$_GeneralError")
4.      Return SetError($_OOoCalcStatus_GeneralError, 0, 0)
5.  Else
6.       Return SetSuccess($_OOoCalcStatus_Success)
7.  EndIf

The code never reaches line 2 when a process of LibreOffice is left running. In the other case, it just runs fine. Weird, I know.

Edited by rdr
Link to comment
Share on other sites

  • Moderators

rdr,

I have never used the OpenOffice UDF so I have no idea what is happening, sorry. :(

But as you know that the problem is caused by a particular LibreOffice process, can you not check in your script if the process is active and if necessary kill and/or restart it before continuing? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

So if you know it is being caused by a specific process, check for it first

Edit: Damn Melba's fast fingers :)

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...