Jump to content

COM Error Number 80020009


Recommended Posts

Ok. I've got a weird one. run the folowing it runs just fine on all computers

#include <IE.au3>
Dim $oIE
$oIE = _IECreate("http://ncat3420a/CatWeb/ImportCenter/ImportCenterPge.aspx", 0, 0, 1, 1)

Sleep(5000)

_IEQuit($oIE)

This simple test opens a web page waits 5 seconds and closes

When I run it in my main program it bombs on any computer I try it on.

The error I see is:

### COM Error ! Number: 80020009 ScriptLine: -1 Description:

I would post my whole script but it's 5700 lines and only runable on our host system software. (That is it looks for a paticular program to be running and controls that program)

If need be I'll post it.

Thanks for the help.

Here is the main routing that launches this code:

#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\Icons\Iconshock_tiny_animals_vista_icons\ico\parrot.ico
#AutoIt3Wrapper_Run_Tidy=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Misc.au3>
#include <GUIConstants.au3>
#include <Date.au3>
#include <file.au3>
#include <GuiConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
#include <LibCsv2.au3>
#include <Process.au3>
#include <IE.au3>
#include <GuiButton.au3>
#include <GuiEdit.au3>
#include <Sound.au3>
#include <ScreenCapture.au3>
#include <_sql.au3>
Opt('MustDeclareVars', 1)
;
;make sure only one is running on local computer at a time!
;
If _Singleton("HACUXP2", 1) = 0 Then
    MsgBox(0, "Warning", "An occurence of HACUXP is already running. Exiting.")
    Exit
EndIf
Dim $oIE3, $oIE4

;
;
; Set windows to familar names
;
Const $winxpmain = "XP/Win Navigator"
Const $winDCCM = "XP/Win - Console Monitor"
Const $winRWDB = "XP/Win - RWDB - RW-Database Maint"
Const $winDV = "XP/Win - Document Viewer"
Const $winBatch = "XP/Win - Display Batch Ctl Files"
Const $winPrintQueue = "XP/Win - Print Queue Control"
Const $winPrintControl = "XP/Win - Print Control - Queues"
Const $winDCCO = "XP/Win - Current Operators"
Const $winDCAR = "XP/Win - Audio Response Status"
Const $winDCJC = "XP/Win - Journal COntrol"
Const $winDCPH = "XP/Win - Processing History"
Const $winDCBFPost = "XP/Win - DCBF - POST EFT FILES"
Const $winHACUXPUtility = "HACU XP Utility"
;
;other variables

;##################################
; EMAIL Variables
;##################################
Global $oMyRet[2]
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
Dim $SmtpServer, $FromAddress, $FromName, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl, $HexNumber
$SmtpServer = "any.smtp.server" ; address for the smtp-server to use - REQUIRED
$FromName = "MIS" ; name from who the email was sent
$FromAddress = "info@uinfo.com" ; address from where the mail should come
$ToAddress = "info@uinfo.com" ; destination address of the email - REQUIRED
$Subject = "Notification" ; subject from the email - can be anything you want it to be
$Body = "" ; the messagebody from the mail - can be left blank but then you get a blank mail
$AttachFiles = "" ; the file you want to attach- leave blank if not needed
$CcAddress = "" ; address for cc - leave blank if not needed
$BccAddress = "" ; address for bcc - leave blank if not needed
$Importance = "Normal" ; Send message priority: "High", "Normal", "Low"
$Username = "info@uinfo.com" ; username for the account used from where the mail gets sent - REQUIRED
$Password = "info@uinfo.com" ; password for the account used from where the mail gets sent - REQUIRED
$IPPort = 25 ; port used for sending the mail
$ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS
;~ $IPPort=465                          ; GMAIL port used for sending the mail
;~ $ssl=1                               ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS

;
; Reference number = $ REF, Boolean test for success DCCM = $booDCCM
;
Dim $ref, $booDCCM, $booBCTL, $booDOCNumber, $userInput, $DOCNumber, $todayMMDD, $todayMMDDYY, $BCTL, $okAnswer, $1000step2boo, $CNTC, $DNTC, $firstline, $secondline, $counterFromBottom
Dim $CatFileList, $iecorrect, $iecorrect2, $scriptStatus, $muteAudio, $HACUXP, $inputRefNumber, $lblRefNumber, $Button1, $inputToday, $Graphic1, $label2, $lblTodayMMDD, $lblMMDD, $btnChangeDate, $lblLog, $lblDOCText
Dim $oReportPageResultHost, $oReportJobHost, $oFoundJobIDHost, $whilex, $ListViewDocs, $btnDocs, $lbLog, $btndocRefresh, $pbar, $nMsg, $currCtrl, $currVal, $aItem1, $sDir, $sFile, $FileList
Dim $errorboo, $errorboo2, $errorboo3, $fc, $oIE, $oForm, $oSelect, $oSelectedm, $FileList3, $ncatboo, $oText, $oCheckValue, $rc, $tTime, $element, $calc, $foundfirst, $foundlast, $oSelected
Dim $oIE2, $NCATCounter, $oReportViewStatusPage, $oReportTest, $oFindReportID, $fsize, $CatSwitchFile, $ftime, $NCATReportCounter, $CatEODFileList, $audioMutedBoo, $iMsgBoxResult, $MBPID1
Dim $1300File, $1300Boo, $1300count, $1300line, $1500count, $1500File, $1500logfile, $6050Filename, $6400Filename, $6400boo, $ProxyMasterPC, $sCommand, $startRefNumber, $finishRefNumber, $i
Dim $CatMNTHFileList, $MBRandom, $logtext, $5750MergeFile, $5750OpenFile, $5750fileout, $dccmcheck
Dim $5900array, $5900data, $5900FileList, $5900filename, $5900fileoutput, $5900filepath, $5900WinTitle, $5900sHTML, $5900link1, $5900oIE, $5900new
Dim $5050Backupdir, $5050LogDir, $5050aRecords, $ButtonRefresh, $driveg, $ButtonScreenCapture, $ButtonmoveNotices
Dim $1750filename, $OTGBackupFilename, $OTGrejectarray, $OTGtempFilename, $OTGOrigFile, $1750PrevDayFile, $1750CurrSeq, $1750PrevSeq, $OTGfilenameImport, $OTGlogarray, $OTGficheNumber, $1700ficheFileNumber
Dim $CS_filelocation, $CS_Description, $CS_ReferenceNumber, $CS_size, $CaptureCB, $btnCapture, $msg, $UpdateWinList_Array
Dim $DLL, $LAST, $1600AcquirerFileName, $1600AcquirerDeviceID, $1600IssuerFileName, $1600IssuerDeviceID, $whatref
Local $aiResult, $FNNresult
Dim $sleep1, $sleepingi, $sleepingj, $sleepprogress
Dim $iIndex, $5050boolean, $1350failed
Dim $upper, $FirstlineArray, $LastlineArray, $lineArray, $newArray[1], $FileList
$DLL = DllOpen('user32.dll')
;
;find os type 32 or 64 bit
;
Dim $OSType, $64bit
$OSType = @OSArch
If $OSType = "X64" Then
    $64bit = True
EndIf
;
;specific values (May change in script)
;
$iMsgBoxResult = 0
;
;Speech const
;
Const $SpeechDir = "G:\AutoIT_Production\Speech\"
$audioMutedBoo = True ; audio is turned off by default
;
;Dates
;
Dim $MyDate, $Today, $todayName, $MyTime, $dd, $yy, $mm, $yesterdaydd, $yesterdaydate, $dateyyyymmdd, $dateprevyyyymmdd, $NCATPrevDate, $dateThreeDaysAgo, $dateThreeDaysAgoDD, $dateThreeDaysAgoMM, $dateThreeDaysAgoYY
Dim $yesterdayMM, $yesterdayYY, $dateTwoDaysAgo, $dateTwoDaysAgoDD, $dateTwoDaysAgoMM, $dateTwoDaysAgoYY, $twoweeksago, $twoweeksagoYYYYMMDD, $dateFourDaysAgo, $dateFourDaysAgoDD, $dateFourDaysAgoMM, $dateFourDaysAgoYY
Dim $yesterdayMMDDYY, $dateThreeDaysAgoMMDDYY
$Today = _NowCalcDate()
_DateTimeSplit($Today, $MyDate, $MyTime)
$todayMMDDYY = StringFormat("%02i%02i%s", $MyDate[2], $MyDate[3], StringRight($MyDate[1], 2))
$todayMMDD = StringFormat("%02i%02i%s", $MyDate[2], $MyDate[3])
;
$dd = @MDAY
$yy = StringRight(@YEAR, 2)
$mm = @MON
$yesterdaydate = _DateAdd('d', -1, _NowCalcDate())
$yesterdaydd = StringRight($yesterdaydate, 2)
$yesterdayMM = StringMid($yesterdaydate, 6, 2)
$yesterdayYY = StringMid($yesterdaydate, 3, 2)
$yesterdayMMDDYY = $yesterdayMM & $yesterdaydd & $yesterdayYY
;
;Two days ago (Used for Monday where you need saturday's date)
;
$dateTwoDaysAgo = _DateAdd('d', -2, _NowCalcDate())
$dateTwoDaysAgoDD = StringRight($dateTwoDaysAgo, 2)
$dateTwoDaysAgoMM = StringMid($dateTwoDaysAgo, 6, 2)
$dateTwoDaysAgoYY = StringMid($dateTwoDaysAgo, 3, 2)
;
;Three days ago (Used for Monday where you need last business day of Friday)
;
$dateThreeDaysAgo = _DateAdd('d', -3, _NowCalcDate())
$dateThreeDaysAgoDD = StringRight($dateThreeDaysAgo, 2)
$dateThreeDaysAgoMM = StringMid($dateThreeDaysAgo, 6, 2)
$dateThreeDaysAgoYY = StringMid($dateThreeDaysAgo, 3, 2)
$dateThreeDaysAgoMMDDYY = $dateThreeDaysAgoMM & $dateThreeDaysAgoDD & $dateThreeDaysAgoYY
;
;Four days ago (Used for Monday Holidays where you need last business day of Friday)
;
$dateFourDaysAgo = _DateAdd('d', -4, _NowCalcDate())
$dateFourDaysAgoDD = StringRight($dateFourDaysAgo, 2)
$dateFourDaysAgoMM = StringMid($dateFourDaysAgo, 6, 2)
$dateFourDaysAgoYY = StringMid($dateFourDaysAgo, 3, 2)
;
$dateyyyymmdd = @YEAR & @MON & @MDAY
$dateprevyyyymmdd = StringLeft($yesterdaydate, 4) & StringMid($yesterdaydate, 6, 2) & StringRight($yesterdaydate, 2)
;
;two weeks ago
;
$twoweeksago = _DateAdd('d', -14, _NowCalcDate())
$twoweeksagoYYYYMMDD = StringLeft($twoweeksago, 4) & StringMid($twoweeksago, 6, 2) & StringRight($twoweeksago, 2)
;
; Setup holidays 2008
;
; #FUNCTION# ;=========================================================================================
; Name...........: _DateGetFloatingHoliday
; Description ...: Returns the date of a floating holiday for a given year/month/weekday/weeknumber.
; Syntax.........: _DateGetFloatingHoliday($iYear = @YEAR, $iMonth = @MON, $iWkDay = 0, $iNthWk = 0)
; Parameters ....: $iYear  - A valid year in format YYYY
;                  $iMonth - A valid month in format MM
;                  $iWkDay - A valid weekday in format: 1 to 7 (Sunday to Saturday)
;                  $iNthWk - A valid week of month number in format: 1 to 5
; Return values .: Success - Date of holiday
;                  Failure - Returns 0 and @error is set
;Holidays
;
Local $NewYearsDay = "0101" & $yy
Local $MLKbirthday = "01" & _DateGetFloatingHoliday(@YEAR, 1, 2, 3) & $yy
Local $PresidentsDay = "02" & _DateGetFloatingHoliday(@YEAR, 2, 2, 3) & $yy
Local $MemorialDay = "05" & _DateGetFloatingHoliday(@YEAR, 5, 2, 4) & $yy
Local $IndependenceDay = "0704" & $yy
Local $LaborDay = "090" & _DateGetFloatingHoliday(@YEAR, 9, 2, 1) & $yy
Local $ColumbusDay = "10" & _DateGetFloatingHoliday(@YEAR, 10, 2, 2) & $yy
Local $VeteransDay = "1111" & $yy
Local $ThanksgivingDay = "11" & _DateGetFloatingHoliday(@YEAR, 11, 5, 4) & $yy
Local $ChristmasDay = "1225" & $yy
Dim $HolidayYesterday, $Holidays[10]
$HolidayYesterday = False
$Holidays[0] = $NewYearsDay
$Holidays[1] = $MLKbirthday
$Holidays[2] = $PresidentsDay
$Holidays[3] = $MemorialDay
$Holidays[4] = $IndependenceDay
$Holidays[5] = $LaborDay
$Holidays[6] = $ColumbusDay
$Holidays[7] = $VeteransDay
$Holidays[8] = $ThanksgivingDay
$Holidays[9] = $ChristmasDay
;
; Test if yesterday was a holiday.
;
For $x = 0 To 9
    If $yesterdayMMDDYY = $Holidays[$x] Then
        $HolidayYesterday = True
    EndIf
Next
;
; If it's a monday we need to check to see if Friday was a holiday.
;
If @WDAY = 2 Then
    For $x = 0 To 9
        If $dateThreeDaysAgoMMDDYY = $Holidays[$x] Then
            $HolidayYesterday = True
        EndIf
    Next
EndIf
;

Select
    Case @WDAY = 1
        $todayName = "Sunday"
    Case @WDAY = 2
        $todayName = "Monday"
    Case @WDAY = 3
        $todayName = "Tuesday"
    Case @WDAY = 4
        $todayName = "Wednesday"
    Case @WDAY = 5
        $todayName = "Thursday"
    Case @WDAY = 6
        $todayName = "Friday"
    Case @WDAY = 7
        $todayName = "Saturday"
EndSelect
;
;CAPS LOCK
;

LED(1, 1, 0)

;
; ######  ########  ########    ###    ######## ########     ######   ##     ## ####
;##    ## ##     ## ##         ## ##      ##    ##          ##    ##  ##     ##  ##
;##       ##     ## ##        ##   ##     ##    ##          ##        ##     ##  ##
;##       ########  ######   ##     ##    ##    ######      ##   #### ##     ##  ##
;##       ##   ##   ##       #########    ##    ##          ##    ##  ##     ##  ##
;##    ## ##    ##  ##       ##     ##    ##    ##          ##    ##  ##     ##  ##
; ######  ##     ## ######## ##     ##    ##    ########     ######    #######  ####
;
;
;
;
;find size of current desktop
;
Opt("WinTitleMatchMode", 4)
Dim $pos[4]
$pos = WinGetPos("classname=Shell_TrayWnd")
$pos[3] = @DesktopHeight - ($pos[3] + 32)

;
;create gui
;
#Region ### START Koda GUI section ### Form=c:\program files\autoit3\gui\forms\hacuxp.kxf
$HACUXP = GUICreate("HACU XP Utility", 971, 447, $pos[2] - 972, $pos[3] - 447)
$inputRefNumber = GUICtrlCreateInput("", 137, 13, 137, 21)
$lblRefNumber = GUICtrlCreateLabel("Enter Reference Number:", 7, 15, 125, 17)
$Button1 = GUICtrlCreateButton("Go", 280, 13, 85, 20, 0)
$Today = GUICtrlCreateLabel("Today (MMDDYY):", 7, 55, 94, 17)
$inputToday = GUICtrlCreateInput("", 108, 53, 144, 21)
$label2 = GUICtrlCreateLabel("Script Running:", 576, 14, 182, 33)
GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
$lblTodayMMDD = GUICtrlCreateLabel("Today (MMDD):", 264, 55, 80, 17)
$lblMMDD = GUICtrlCreateLabel("mmdd", 352, 55, 32, 17)
$btnChangeDate = GUICtrlCreateButton("Change Date", 152, 80, 81, 25, 0)
$lbLog = GUICtrlCreateList("", 8, 120, 761, 318)
$lblLog = GUICtrlCreateLabel("Log:", 8, 88, 25, 17)
$lblDOCText = GUICtrlCreateLabel("Today's Documents", 808, 112, 98, 17)
$ListViewDocs = GUICtrlCreateListView("", 776, 165, 185, 273)
$btnDocs = GUICtrlCreateButton("Open", 896, 136, 65, 25, 0)
$ButtonRefresh = GUICtrlCreateButton("Refresh Log", 240, 80, 105, 25, 0)
$btndocRefresh = GUICtrlCreateButton("Refresh", 776, 136, 65, 25, 0)
;
;Capture screen button
;
$ButtonScreenCapture = GUICtrlCreateButton("Capture", 380, 13, 85, 20, 0)
;
;Multiple move notices button
;
$ButtonmoveNotices = GUICtrlCreateButton("Multi-Notices", 470, 13, 85, 20, 0)

$pbar = GUICtrlCreateProgress(520, 72, 433, 17, $WS_BORDER)

GUICtrlSetColor(-1, 0x00FF00)
$scriptStatus = GUICtrlCreateLabel(" NO", 776, 16, 45, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFF0000)
$muteAudio = GUICtrlCreateButton("Audio Off", 360, 80, 73, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

;
; set dates on GUI
;
GUICtrlSetData($lblMMDD, StringLeft($todayMMDDYY, 4))
;
; ######   ##     ## ####    ##        #######   ######      ######## #### ##       ##
;##    ##  ##     ##  ##     ##       ##     ## ##    ##     ##        ##  ##       ##
;##        ##     ##  ##     ##       ##     ## ##           ##        ##  ##       ##
;##   #### ##     ##  ##     ##       ##     ## ##   ####    ######    ##  ##       ##
;##    ##  ##     ##  ##     ##       ##     ## ##    ##     ##        ##  ##       ##
;##    ##  ##     ##  ##     ##       ##     ## ##    ##     ##        ##  ##       ##
; ######    #######  ####    ########  #######   ######      ##       #### ######## ########
;
Const $logfilelocation = "G:\AutoIT_Production\Logs\" & _DateToMonth(@MON) & "-" & @YEAR & "\" & $todayMMDDYY & "\Log_" & $todayMMDDYY & ".log"
Dim $CS_filelocation = "G:\AutoIT_Production\Logs\" & _DateToMonth(@MON) & "-" & @YEAR & "\" & $todayMMDDYY & "\"
Dim $logline
If Not FileExists($logfilelocation) Then
    FileOpen($logfilelocation, 9)
    FileClose($logfilelocation)
Else
    ;File found lets fill our log on the gui in reverse order! (Chronologically)
    FileOpen($logfilelocation, 0)
    Dim $logfilelinecount = _FileCountLines($logfilelocation)
    _GUICtrlListBox_BeginUpdate($lbLog)
    For $i = $logfilelinecount To 1 Step -1
        $logline = FileReadLine($logfilelocation, $i)
        _GUICtrlListBox_InsertString($lbLog, $logline, -1)
    Next
    _GUICtrlListBox_UpdateHScroll($lbLog)
    _GUICtrlListBox_EndUpdate($lbLog)
EndIf
;
; ######   ##     ## ####    ########   #######   ######     ######## #### ##       ##
;##    ##  ##     ##  ##     ##     ## ##     ## ##    ##    ##        ##  ##       ##
;##        ##     ##  ##     ##     ## ##     ## ##          ##        ##  ##       ##
;##   #### ##     ##  ##     ##     ## ##     ## ##          ######    ##  ##       ##
;##    ##  ##     ##  ##     ##     ## ##     ## ##          ##        ##  ##       ##
;##    ##  ##     ##  ##     ##     ## ##     ## ##    ##    ##        ##  ##       ##
; ######    #######  ####    ########   #######   ######     ##       #### ######## ########
;
;  Currently too many files int he L:\ drive. Way to slow to sort 13,000 files. Will think about this one.
;
;
GUICtrlSetBkColor($Graphic1, 0x00FF00)
GUICtrlSetData($pbar, "10")
Dim $filecount, $doctodayfile, $line, $lineArray, $linearray2
$doctodayfile = "G:\AutoIT_Production\DocScan\doclisttoday.txt"
#Region --- CodeWizard generated code Start ---
_GUICtrlListView_InsertColumn($ListViewDocs, 0, "Name", 100)
_GUICtrlListView_InsertColumn($ListViewDocs, 1, "Time", 100)
GUICtrlSetBkColor($Graphic1, 0xC0C0C0)
GUICtrlSetData($pbar, "0")
;EndSelect
#EndRegion --- CodeWizard generated code Start ---

;
; check to make sure we are connected to G:
;
$driveg = DriveMapGet("G:")
If @error = 1 Then
    MsgBox(48, "No mapped drive!", "You need to have G:\ mapped to the MIS directory. Program will halt until fixed.")
    Exit
EndIf
If $driveg <> "\\2003fs1\shared\MIS" Then
    MsgBox(48, "Wrong mapped drive!", "G: is mapped to another location. You need to have G:\ mapped to the MIS directory (//2003fs1/shared/MIS). Program will halt until fixed.")
    ;MsgBox(0, "1", $driveg)
    Exit
EndIf
;
;Other misc:
;
xpload()
sleeping(200)

WinActivate($winHACUXPUtility)

GUICtrlSetData($pbar, "0")

;
;
;##     ##    ###    #### ##    ##    ##     ## ######## ##    ## ##     ##
;###   ###   ## ##    ##  ###   ##    ###   ### ##       ###   ## ##     ##
;#### ####  ##   ##   ##  ####  ##    #### #### ##       ####  ## ##     ##
;## ### ## ##     ##  ##  ## ## ##    ## ### ## ######   ## ## ## ##     ##
;##     ## #########  ##  ##  ####    ##     ## ##       ##  #### ##     ##
;##     ## ##     ##  ##  ##   ###    ##     ## ##       ##   ### ##     ##
;##     ## ##     ## #### ##    ##    ##     ## ######## ##    ##  #######
;
;
;

WinActive($winHACUXPUtility)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $HACUXP
        Case $inputRefNumber
        Case $lblRefNumber
        Case $Today
        Case $inputToday
        Case $Graphic1
        Case $label2
        Case $lblTodayMMDD
        Case $lblMMDD
        Case $muteAudio
            If $audioMutedBoo = False Then
                $audioMutedBoo = True
                _GUICtrlButton_SetText($muteAudio, "Audio Off")
            Else
                $audioMutedBoo = False
                _GUICtrlButton_SetText($muteAudio, "Audio On")
            EndIf
        Case $Button1
            cleanupWindows()
            $ref = GUICtrlRead($inputRefNumber, 1)
            GUICtrlSetData($inputRefNumber, "")
            Go()
        Case $ButtonScreenCapture
            CaptureScreenAsk()
        Case $ButtonmoveNotices

        Case $ButtonRefresh
            RefreshLogFile()
        Case $btnChangeDate
            ; date check - it only checks for six digit date not a valid date.
            $currCtrl = ControlGetFocus($HACUXP)
            $currVal = ControlGetText($HACUXP, "", $currCtrl)
            ; Check to make sure it's a six digit date
            If StringLen($todayMMDDYY) <> 6 Then
                MsgBox(0, "", "You need to use a six digit date. Try Again.")
            Else
                ;date is okay we will set it.
                $todayMMDDYY = GUICtrlRead($inputToday, 1)
                GUICtrlSetData($lblMMDD, StringLeft($todayMMDDYY, 4))
                MsgBox(64, "Information", "The new date was set.")
            EndIf
        Case $btnDocs
            $aItem1 = _GUICtrlListView_GetSelectedIndices($ListViewDocs, False)
            ;MsgBox(0,$linearray[$aItem1][0],$linearray[$aItem1][0])
            _RunDOS("C:\Progra~1\Crimso~1\notepad.exe L:\" & $lineArray[$aItem1][0])
        Case $btndocRefresh
            refreshDOCList()
            ;Case $btnCapture
            ;CaptureScreenAsk()
            ;UpdateWinList()
    EndSwitch

    If @HOUR = 01 Then
        Exit
    EndIf

WEnd
Exit
; ######    #######     ########  ##     ## ######## ########  #######  ##    ##
;##    ##  ##     ##    ##     ## ##     ##    ##       ##    ##     ## ###   ##
;##        ##     ##    ##     ## ##     ##    ##       ##    ##     ## ####  ##
;##   #### ##     ##    ########  ##     ##    ##       ##    ##     ## ## ## ##
;##    ##  ##     ##    ##     ## ##     ##    ##       ##    ##     ## ##  ####
;##    ##  ##     ##    ##     ## ##     ##    ##       ##    ##     ## ##   ###
; ######    #######     ########   #######     ##       ##     #######  ##    ##
;
;######## ##     ## ##    ##  ######  ######## ####  #######  ##    ##  ######
;##       ##     ## ###   ## ##    ##    ##     ##  ##     ## ###   ## ##    ##
;##       ##     ## ####  ## ##          ##     ##  ##     ## ####  ## ##
;######   ##     ## ## ## ## ##          ##     ##  ##     ## ## ## ##  ######
;##       ##     ## ##  #### ##          ##     ##  ##     ## ##  ####       ##
;##       ##     ## ##   ### ##    ##    ##     ##  ##     ## ##   ### ##    ##
;##        #######  ##    ##  ######     ##    ####  #######  ##    ##  ######
;
;
;

Func Go()
    GUICtrlSetBkColor($Graphic1, 0x00FF00)
    $booDCCM = False
    xpload()
    Switch $ref
        Case "1"
            startRef($ref, StringUpper("***** " & $ref & " Started Template"))
            ;test area:
            DCCM("B,S", False)
            ;CaptureScreen($ref, "CaptureScreen")
            finishRef($ref, StringUpper("***** " & $ref & " Completed Template"))
        Case "2"
            $oIE3 = _IECreate("http://ncat3420a/CatWeb/ImportCenter/ImportCenterPge.aspx", 0, 1, 1, 1)

            Sleep(5000)

            _IEQuit($oIE3)
            
                    Case Else
            GUICtrlSetBkColor($Graphic1, 0x00FF00)
            _MsgBox(4096, "Unkown Reference Number", "Reference number is not known. Try again.", 'OK', 'Cancel', '', 0, 1, 1)
    EndSwitch
EndFunc
    GUICtrlSetBkColor($Graphic1, 0xC0C0C0)
Link to comment
Share on other sites

  • Developers

Start using the Com Error handler to capture these type of errors and get more/better information as to what the problem is.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Start using the Com Error handler to capture these type of errors and get more/better information as to what the problem is.

Jos

I tried this COM handler:

Func MyErrFunc()
    $HexNumber = Hex($oMyError.number, 8)
    MsgBox(0, "", "We intercepted a COM Error !" & @CRLF & _
            "Number is: " & $HexNumber & @CRLF & _
            "Windescription is: " & $oMyError.windescription)

    $g_eventerror = 1 ; something to check for when this function returns
EndFunc

and it returned pretty much the same information:

We intercepted a COM Error !

Number is: 80020009

WinDescription is: Unspecified error

Link to comment
Share on other sites

  • Developers

try running it from SciTE and check also on the source line nbr. That should give you an indication what line is causing the error.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

try running it from SciTE and check also on the source line nbr. That should give you an indication what line is causing the error.

Whats weird is I changed to this com handler and it's running fine??!?!?!?

Func MyErrFunc()
    $HexNumber = Hex($oMyError.number, 8)
    $oMyRet[0] = $HexNumber
    $oMyRet[1] = StringStripWS($oMyError.description, 3)
    ConsoleWrite("### Com Error !  Number: " & $HexNumber & "   ScriptLine: " & $oMyError.scriptline & "   Description:" & $oMyRet[1] & @LF)
    SetError(1); something to check for when this function returns
    Return
EndFunc   ;==>MyErrFunc

I'll do some more testing

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