Jump to content

ITaskbarList3


wraithdu
 Share

Recommended Posts

This builds off the ITaskbarList example from the AutoItObject project, but just shows how easy it is to work with COM objects that don't have the AutoIt preferred IDispatch interface now thanks to them.

This example (eventually I'll UDF it to some extent) shows how to create progress bars in the taskbar in Windows 7.

Windows 7 ONLY!!!

#NoTrayIcon
#include <AutoItObject.au3>
#include <WinAPI.au3>

Global Const $TBPF_NOPROGRESS = 0
Global Const $TBPF_INDETERMINATE = 0x1
Global Const $TBPF_NORMAL = 0x2
Global Const $TBPF_ERROR = 0x4
Global Const $TBPF_PAUSED = 0x8

Global $goflag = False

; register to receive the message that our button is ready
GUIRegisterMsg(_WinAPI_RegisterWindowMessage("TaskbarButtonCreated"), "_TaskbarReady")

; register error handler and startup AIO
Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc")
_AutoItObject_StartUp()

; get interfaces
Global $CLSID_TaskBarlist = _AutoItObject_CLSIDFromString("{56FDF344-FD6D-11D0-958A-006097C9A090}")
; ITaskbarList3:  http://msdn.microsoft.com/en-us/library/dd391692(VS.85).aspx
Global $IID_ITaskbarList3 = _AutoItObject_CLSIDFromString("{ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf}")

; create the ITaskbarList3 interface instance
Global $pTB3
_AutoItObject_CoCreateInstance(DllStructGetPtr($CLSID_TaskBarlist), 0, 1, DllStructGetPtr($IID_ITaskbarList3), $pTB3)
If Not $pTB3 Then
    MsgBox(16, "Error", "Failed to create ITaskbarList3 interface, exiting.")
    _AutoItObject_Shutdown()
    Exit
EndIf

; setup AIO wrapper for the interface
Global $tagInterface = _
        "QueryInterface long(ptr;ptr;ptr);" & _
        "AddRef ulong();" & _
        "Release ulong();" & _
        "HrInit long();" & _
        "AddTab long(hwnd);" & _
        "DeleteTab long(hwnd);" & _
        "ActivateTab long(hwnd);" & _
        "SetActiveAlt long(hwnd);" & _
        "MarkFullscreenWindow long(hwnd;int);" & _
        "SetProgressValue long(hwnd;uint64;uint64);" & _
        "SetProgressState long(hwnd;int);" & _
        "RegisterTab long(hwnd;hwnd);" & _
        "UnregisterTab long(hwnd);" & _
        "SetTabOrder long(hwnd;hwnd);" & _
        "SetTabActive long(hwnd;hwnd;dword);" & _
        "ThumbBarAddButtons long(hwnd;uint;ptr);" & _
        "ThumbBarUpdateButtons long(hwnd;uint;ptr);" & _
        "ThumbBarSetImageList long(hwnd;ptr);" & _
        "SetOverlayIcon long(hwnd;ptr;wstr);" & _
        "SetThumbnailTooltip long(hwnd;wstr);" & _
        "SetThumbnailClip long(hwnd;ptr);"
; create the AIO object using the wrapper
Global $oTB3 = _AutoItObject_WrapperCreate($pTB3, $tagInterface)
If Not IsObj($oTB3) Then
    MsgBox(16, "Error", "Something has gone horribly awry...")
    _AutoItObject_Shutdown()
    Exit
EndIf
; call the HrInit method to initialize the ITaskbarList3 interface
$oTB3.HrInit()

Global $gui = Number(GUICreate("Toolbar Progress", 250, 80))
Global $b1 = GUICtrlCreateButton("Start Progress Bar", 10, 10)
GUISetState()

While 1 <> 2
    Switch GUIGetMsg()
        Case $b1
            _GoProgressTest()
        Case -3
            ExitLoop
    EndSwitch
WEnd

$oTB3 = 0
_AutoItObject_Shutdown()

Func _GoProgressTest()
    While Not $goflag
        Sleep(10)
    WEnd
    ConsoleWrite("here we go..." & @CRLF)
    ; go through various states and progress
    $oTB3.SetProgressState($gui, $TBPF_INDETERMINATE)
    Sleep(3000)
    For $i = 0 To 33
        $oTB3.SetProgressValue($gui, $i, 100)
        Sleep(50)
    Next
    $oTB3.SetProgressState($gui, $TBPF_PAUSED)
    For $i = 34 To 66
        $oTB3.SetProgressValue($gui, $i, 100)
        Sleep(50)
    Next
    $oTB3.SetProgressState($gui, $TBPF_ERROR)
    For $i = 67 To 100
        $oTB3.SetProgressValue($gui, $i, 100)
        Sleep(50)
    Next
    $oTB3.SetProgressState($gui, $TBPF_NORMAL)
    Sleep(1500)
    $oTB3.SetProgressState($gui, $TBPF_NOPROGRESS)
EndFunc

Func _TaskbarReady($hWnd, $msg, $wParam, $lParam)
    Switch $hWnd
        Case $gui
            ; the taskbar button is ready
            ConsoleWrite("taskbar button ready" & @CRLF)
            $goflag = True
    EndSwitch
EndFunc

Func _ErrFunc()
    ConsoleWrite("! COM Error !  Number: 0x" & Hex($oError.number, 8) & "   ScriptLine: " & $oError.scriptline & " - " & $oError.windescription & @CRLF)
    Return
EndFunc   ;==>_ErrFunc
Edited by wraithdu
Link to comment
Share on other sites

Aw Hell Ya! Ive been trying to make this since AutoItObject was released. Great Job wraithdu!! :mellow:

Link to comment
Share on other sites

Cool, I'll need to try that :mellow:

Do you think it will be possible to also create taskbar overlay icons?

Yes. You have to get the HICON-handle (r.g. LoadImage with IMAGE_ICON or ExtractIconEx) and then call SetOverlayIcon from ITaskbarlist3.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

wraithdu,

This is awesome! I've been looking for this and have been working on a none AutoItObject (I had lots of massive fails) version of this.

Such beauty deserves a good use in my current project! Posted Image

Also... I've just realised Posted Image that AutoIt Object creates the methods automatically based on the tags you provide. ZOMG I did not know this.

James

Edited by JamesBrooks
Link to comment
Share on other sites

Thanks :mellow: But really the credit goes to the AutoItObject team for creating a seriously awesome wrapper.

I also did a 'normal' AutoIt version of ITaskbarList a long time ago for hiding the taskbar button, but it is messy and painful. You have to get the interface, manually create the vTable, then use another UDF to call the functions by pointer. AIO rolls all this into one place, making it very easy to create these interfaces and very easy to use them.

Link to comment
Share on other sites

  • 4 weeks later...

Hi to everybody

As I'm not good in Autoit I took a chance getting something done from above example by wraithdu

I think this is near to UDF but I'm not so good.

Taskbar_UDF.au3

;#NoTrayIcon
#include 'AutoItObject.au3'
#include <WinAPI.au3>

Global Const $TBPF_NOPROGRESS = 0
Global Const $TBPF_INDETERMINATE = 0x1
Global Const $TBPF_NORMAL = 0x2
Global Const $TBPF_ERROR = 0x4
Global Const $TBPF_PAUSED = 0x8

Global $goflag = False

; register to receive the message that our button is ready
GUIRegisterMsg(_WinAPI_RegisterWindowMessage("TaskbarButtonCreated"), "_TaskbarReady")

; register error handler and startup AIO
Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc")
_AutoItObject_StartUp()

; get interfaces
Global $CLSID_TaskBarlist = _AutoItObject_CLSIDFromString("{56FDF344-FD6D-11D0-958A-006097C9A090}")
; ITaskbarList3:[url="[url="http://msdn.microsoft.com/en-us/library/dd391692%5B/url%5D"]http://msdn.microsoft.com/en-us/library/dd391692%5B/url%5D[/url]"][url="http://msdn.microsoft.com/en-us/library/dd391692%5B/url%5D"]http://msdn.microsoft.com/en-us/library/dd391692[/url][/url](VS.85).aspx
Global $IID_ITaskbarList3 = _AutoItObject_CLSIDFromString("{ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf}")

; create the ITaskbarList3 interface instance
Global $pTB3
_AutoItObject_CoCreateInstance(DllStructGetPtr($CLSID_TaskBarlist), 0, 1, DllStructGetPtr($IID_ITaskbarList3), $pTB3)
If Not $pTB3 Then
 MsgBox(16, "Error", "Failed to create ITaskbarList3 interface, exiting.")
    _AutoItObject_Shutdown()
    Exit
EndIf

; setup AIO wrapper for the interface
Global $tagInterface = _
 "QueryInterface long(ptr;ptr;ptr);" & _
        "AddRef ulong();" & _
        "Release ulong();" & _
     "HrInit long();" & _
        "AddTab long(hwnd);" & _
 "DeleteTab long(hwnd);" & _
        "ActivateTab long(hwnd);" & _
        "SetActiveAlt long(hwnd);" & _
     "MarkFullscreenWindow long(hwnd;int);" & _
     "SetProgressValue long(hwnd;uint64;uint64);" & _
     "SetProgressState long(hwnd;int);" & _
        "RegisterTab long(hwnd;hwnd);" & _
        "UnregisterTab long(hwnd);" & _
    "SetTabOrder long(hwnd;hwnd);" & _
        "SetTabActive long(hwnd;hwnd;dword);" & _
        "ThumbBarAddButtons long(hwnd;uint;ptr);" & _
        "ThumbBarUpdateButtons long(hwnd;uint;ptr);" & _
        "ThumbBarSetImageList long(hwnd;ptr);" & _
        "SetOverlayIcon long(hwnd;ptr;wstr);" & _
        "SetThumbnailTooltip long(hwnd;wstr);" & _
        "SetThumbnailClip long(hwnd;ptr);"
Func _Taskbar_UDF_Start()
    ; create the AIO object using the wrapper
 $oTB3 = _AutoItObject_WrapperCreate($pTB3, $tagInterface)
    If Not IsObj($oTB3) Then
        MsgBox(16, "Error", "Something has gone horribly awry...")
        _AutoItObject_Shutdown()
        Exit
 EndIf
    ; call the HrInit method to initialize the ITaskbarList3 interface
    $oTB3.HrInit()
EndFunc ;==>_Taskbar_UDF_Start

$oTB3 = 0
;~ _AutoItObject_Shutdown()

Func _GoProgressTest($gui, $progress, $start = 0, $stop = 0)
    While Not $goflag
     Sleep(10)
    WEnd
    If Not IsNumber($gui) Then $gui = Number($gui)
    ConsoleWrite("here we go..." & @CRLF)
    If $start > $stop Then
        $step = '-1'
    Else
     $step = '+1'
    EndIf
    ; go through various states and progress
    Switch $progress
        Case 1
         $oTB3.SetProgressState($gui, $TBPF_NOPROGRESS)
        Case 2
    $oTB3.SetProgressState($gui, $TBPF_INDETERMINATE)
     Case 3
        $oTB3.SetProgressState($gui, $TBPF_NORMAL)
        For $i = $start To $stop Step $step
             ConsoleWrite($i & @CRLF)
             $oTB3.SetProgressValue($gui, $i, 100)
            Sleep(50)
        Next
        Case 4
         $oTB3.SetProgressState($gui, $TBPF_PAUSED)
            For $i = $start To $stop Step $step
                ConsoleWrite($i & @CRLF)
                $oTB3.SetProgressValue($gui, $i, 100)
        Sleep(50)
            Next
        Case 5
     $oTB3.SetProgressState($gui, $TBPF_ERROR)
            For $i = $start To $stop Step $step
                ConsoleWrite($i & @CRLF)
                $oTB3.SetProgressValue($gui, $i, 100)
        Sleep(50)
            Next
    EndSwitch
    Shut()
EndFunc ;==>_GoProgressTest

Func _TaskbarReady($hWnd, $msg, $wParam, $lParam)
    Switch $hWnd
        Case $hWnd
            ; the taskbar button is ready
            ConsoleWrite("taskbar button ready" & @CRLF)
            $goflag = True
    EndSwitch
EndFunc ;==>_TaskbarReady

Func _ErrFunc()
    ConsoleWrite("! COM Error ! Number: 0x" & Hex($oError.number, 8) & " ScriptLine: " & $oError.scriptline & " - " & $oError.windescription & @CRLF)
    Return
EndFunc ;==>_ErrFunc

Func Shut()
 _AutoItObject_Shutdown()
    ConsoleWrite("Shutdown done" & @CRLF)
EndFunc ;==>Shut

and an example here

;~ #include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
;~ #include <WindowsConstants.au3>
; include Taskbar_UDF.au3
#include 'Taskbar_UDF.au3'
#include-once
; add this function
_Taskbar_UDF_Start()

#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 625, 443, -1, -1)
$Button1 = GUICtrlCreateButton("Button1", 104, 104, 75, 25)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
 Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    Case $Button1
            ; example 1
         _GoProgressTest($Form1, 2)
            Sleep(4500)
         _GoProgressTest($Form1, 1)
            Sleep(1500)
            ; example 2
            _GoProgressTest($Form1, 3, 0, 100)
    _GoProgressTest($Form1, 3, 100)
         _GoProgressTest($Form1, 1)
            Sleep(1500)
            ; example 3
            _GoProgressTest($Form1, 4, 0, 100)
    _GoProgressTest($Form1, 4, 100)
         _GoProgressTest($Form1, 1)
            Sleep(1500)
            ; example 4
            _GoProgressTest($Form1, 5, 0, 100)
    _GoProgressTest($Form1, 5, 100)
         _GoProgressTest($Form1, 1)
            Sleep(1500)
            ; example 5
            _GoProgressTest($Form1, 3, 0, 33)
        _GoProgressTest($Form1, 2)
            Sleep(1500)
     _GoProgressTest($Form1, 4, 33, 66)
         _GoProgressTest($Form1, 2)
            Sleep(1500)
         _GoProgressTest($Form1, 5, 66, 100)
         _GoProgressTest($Form1, 2)
            Sleep(1500)
         _GoProgressTest($Form1, 1)
            Sleep(1500)
            ; example 6
            _GoProgressTest($Form1, 3, 100, 66)
    _GoProgressTest($Form1, 2)
            Sleep(1500)
     _GoProgressTest($Form1, 4, 66, 33)
         _GoProgressTest($Form1, 2)
            Sleep(1500)
         _GoProgressTest($Form1, 5, 33, 0)
             _GoProgressTest($Form1, 2)
            Sleep(1500)
             _GoProgressTest($Form1, 1)
        Sleep(1500)
    EndSwitch
WEnd
Link to comment
Share on other sites

  • 5 months later...

Is there any other way (lighter) to use ItaskBarList3 interface in AutoIT without using AutoITObject ?

I try Dllcalls directly on ExplorerFrame.dll but it's not working (please not that i'm a newbie on DLLcalls).

My goal would be to use ItaskBarList in my project to show the progress bar and set the state of the taskbar. I only need 2 functions for that and I would like to avoid overloading the code of my software (already quite big) just for these two functions.

--------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] ---------------------

Link to comment
Share on other sites

  • 2 months later...

@Fantastic. Awesome UDF. But it won't work if the main script is using #RequireAdmin. If I fixed it, I'll post it here.

That's because TaskbarButtonCreated message is never received since it's send from non-elevated process. To make it work you have to call ChangeWindowMessageFilterEx for that message and your window.
;...
If IsAdmin() Then _ChangeWindowMessageFilterEx($Form1, $WM_TASKBUTT_CREATED, 1)

GUISetState(@SW_SHOW)
;...




Func _ChangeWindowMessageFilterEx($hWnd, $iMsg, $iAction)
    Local $aCall = DllCall("user32.dll", "bool", "ChangeWindowMessageFilterEx", _
            "hwnd", $hWnd, _
            "dword", $iMsg, _
            "dword", $iAction, _
            "ptr", 0)
    If @error Or Not $aCall[0] Then Return SetError(1, 0, 0)
    Return 1
EndFunc

$WM_TASKBUTT_CREATED is the return value of _WinAPI_RegisterWindowMessage("TaskbarButtonCreated").

edit: same goes for taskbar buttons and $WM_COMMAND.

Edited by trancexx

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

  • 6 months later...

Sounds awesome but i cannot for the life of me figure out how to actually use it.

the closed i came was when i copied my script and replaced the section with the guictrlceate() to the end of the While loop with my script, and and moved the functions to function block of my pasted script.

The result was a console spewing

taskbar button ready

here we go...

! COM Error ! Number: 0x000000A9 ScriptLine: 165 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 168 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 171 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 173 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 176 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 178 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 181 - Variable must be of type 'Object'.

! COM Error ! Number: 0x000000A9 ScriptLine: 183 - Variable must be of type 'Object'.

when running the "_GoProgressTest()" function.

Lines 165, 168,171,173,176,178,181, and 183 all call $oTB3.SetProgressState(blah) Or $oTB3.SetProgressValue(Blah)

I'm wondering if its because the $oPB3 = 0, or the .setblahblah,or if its from

Global $gui = Number(GUICreate("Blah", "width", "height"))

The only difference between your posted script, witch runs perfectly, and my script, is my script in the middle.

I also tried #including you script with the gui-loop part commented out, but no luck their either.

any idea what could possibly cause this error!? I would absolutely love to have the task bar progress bar for this program as its main purpose it to process lots of data.

Please help me understand?

Thanks a Ton!

-Thor

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