Jump to content

Line 1500: Error: The requested action with this object has failed


fopetesl
 Share

Go to solution Solved by fopetesl,

Recommended Posts

Complete and utter newb here :)

I have considerable experience writing 'C' and Assembler but my first steps into AutoIT and it looks good.

However I have an immediate problem :(

I am using a basic .au3, (not BASIC), program which monitors input from a serial USB port donated by a kind fellow for me to improve.

I have installed AutoIT3 and ScITe 3.3.

Load the program and Compile or Bulid it then try to run the exe I get:

AutoIT_Error.jpg

Last line number in file is 235 !

RTFM (briefly) but don't see any clues.

The most powerful number in the Universe.  Zero.

Link to comment
Share on other sites

Welcome to AutoIt and the forum!

Most of the time this error message is caused by a COM error.

I suggest to use a COM error handler to get detailed error information.

Function ObjEvent in the help file describes how to do.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

welcome to the AutoIt forum,

run your code directly from SciTe (without compiling), you will see much more details and specific location of the error.

do not be alarmed by the line number, you will easily see where it comes from.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

  • Solution

welcome to the AutoIt forum,

run your code directly from SciTe (without compiling), you will see much more details and specific location of the error.

do not be alarmed by the line number, you will easily see where it comes from.

Thanks guys.

Nice trick. Didn't know we can run the script directly from ScITe :)

Came up with this

F:\Program Files\AutoIt3\Chrony\testbox.au3 (18) : ==> The requested action with this object has failed.:

$MsComm.PortOpen = 1

$MsComm.PortOpen = 1^ ERROR

So from the code above

$MsComm = ObjCreate("MSCOMMLib.MsComm.1")

$MsComm.CommPort = 4

$MsComm.Settings = "4800,N,8,1"

$MsComm.Handshaking = 1

$MsComm.InBufferSize = 1024

$MsComm.InputLen = 1

;Connect

It's clear I don't have the respective COM4 on this machine.

Thanks for the tips.  Now I can forge ahead :thumbsup:

The most powerful number in the Universe.  Zero.

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...