Jump to content

AutoITX3 and @error


lgodfrey
 Share

Recommended Posts

In AutoIT, if you use a function like ControlGetText, it returns the text, but returns a null string if there is an error plus sets @error to 1.

Is @error accessable from AutoITX3 for the same funtions? I think I need it to differentiate between a blank string in the "button" field as opposed to the button field not existing for my error trapping logic.

Regards

Larry

I'm, Lovin' IT, X

Link to comment
Share on other sites

  • 4 weeks later...

NO.

Function Failure:

Approximately 95% of the functions return a numeric 0 and the rest a blank string (""). You can use these values in your error trapping but you will have to test each function to see the return first since there is no documentation yet.

Link to comment
Share on other sites

Thanks, I thought so.

I get the impression as I use it more it must be pretty difficult to set things up so that AutoITX can return anything but a single variant type value. I quess I can see why that might be.

However, it seems to be very stable for me, although I an in no way a "power user". ( I only use half dozen methods so far, but I literally execute them millions of times a week :ph34r: ).

It has made my life a lot easier,

Thanks

"I'm, Lovin' IT, X"

Larry

I'm, Lovin' IT, X

Link to comment
Share on other sites

Thanks, I thought so.

I get the impression as I use it more it must be pretty difficult to set things up so that AutoITX can return anything but a single variant type value.  I quess I can see why that might be. 

However, it seems to be very stable for me, although I an in no way a "power user".  ( I only use half dozen methods so far, but I literally execute them millions of times a week  :ph34r:  ).

It has made my life a lot easier,

Thanks

"I'm, Lovin' IT, X"

Larry

me too!

Just now getting into vbscript to use with hta menus. I've shared a few scripts if you have anything I'd love to see it

rick

Link to comment
Share on other sites

  • 2 weeks later...
  • Administrators

In AutoIT, if you use a function like ControlGetText, it returns the text, but returns  a null string if there is an error plus sets @error to 1.

Is @error accessable from AutoITX3 for the same funtions?  I think I need it to differentiate between a blank string in the "button" field as opposed to the button field not existing for my error trapping logic.

Regards

Larry

I'm going to add another function called Error() or GetLastError() or something that will be the eqivalent of the AutoIt @Error value.
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...