Sign in to follow this  
Followers 0
Champak

Object no loger working

6 posts in this topic

#1 ·  Posted (edited)

I had the following COM function working previously under xp and the old autoit

Func _IMAGETRANSPARENTCOLOR($FIMAGE = "", $FIMAGEOLDCOLOR = "", $FIMAGENEWCOLOR = "")
;#cs
If Not FileExists($FIMAGE) Then
  _CONSOLEWRITE("! Image: '" & $FIMAGE & "' not detected. - : - (Line = " & @ScriptLineNumber & ")")
  $FIMAGE = $IMAGE_GENERAL_ARRAY[0]
EndIf
$OIMAGECONVERT.LoadBitmap($FIMAGE)
$OIMAGECONVERT.ChangeColorDepth(0)
$OIMAGECONVERT.ReplaceColor($FIMAGEOLDCOLOR, $FIMAGENEWCOLOR, 1)
$OIMAGECONVERT.SaveBitmap($FIMAGE)
;#ce
EndFunc   ;==>_IMAGETRANSPARENTCOLOR

The instructions for the object are as follows and shows that I'm using it properly, and yes I verified the object is declared, registered, and compat with win7, and the full path and file is in the string,:

====================================================

object.LoadBitmap(File as string)

====================================================

But scite is now giving me the following error:

ScriptsInfiniti NavINavM.au3 (5030) : ==> Expected a "=" operator in assignment statement.:
$OIMAGECONVERT.LoadBitmap($FIMAGE)
$OIMAGECONVERT^ ERROR

Why am I now getting this error now? How can I fix this? Thanks.

Edited by Champak

Share this post


Link to post
Share on other sites



Which version of Autoit?


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

v3.3.8.1

Share this post


Link to post
Share on other sites

bump

Share this post


Link to post
Share on other sites

I figured it out, but it doesnt make sense why it worked on the previous autoit.

I had it as (where each lies in the script):

1/ set image and call function that has the object

2/ set up object

3/ the function that is being called that has the object

I had to rearrange it to:

1/ set up object

2/ set image and call function that has the object

3/ the function that is being called that has the object

Granted, the way i have it now makes logical sense, but I just dont understand why it worked with the previous autoit and not now, and why it was giving that particular error.

Share this post


Link to post
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
Sign in to follow this  
Followers 0