Jump to content

Autoit and Scite On Win 11


Go to solution Solved by Subz,

Recommended Posts

I have been using Autoit 3.3.8.1 and Scite 3.2.0 on a win 7 laptop since 2013

I just got a new laptop running Win 11 and it seems that Scite has abnormalities on my Win 11 laptop.

When I start typing an existing Variable, no drop down list appears of all variables that match what I have typed so far.

I am wondering if Autoit is compatible as well.

Thanks for your help

 

 

Link to post
Share on other sites

I  ran v14.801.2025.0-SciTE4AutoIt3.exe and ran autoit-3-3-8-1-en-win.exe on my win 11 laptop.

I found these files stored away on my win 7 laptop.

Would this be the full install?

 

Edited by AutoitMike
spelling
Link to post
Share on other sites

ScITE4AutoIt3.exe is the full AutoIt Scite Editor, albeit old.  I'm running the latest version of AutoIt and Scite4AutoIt on Windows 11 without any issue, unsure how if the older versions are compatible.

Link to post
Share on other sites

You shouldn't need to uninstall, but you can, I normally save any custom UDFs I have downloaded (I store mine in C:\Program Files (x86)\AutoIt3\Include) and then copy them back after installing a new package.

Link to post
Share on other sites

With version 3.3.16.1 the scite editor works properly.

Very, odd though.

The reason that I was reluctant to install the latest version is that about 5 or more years ago, I installed the newest version of Autoit and I discovered that the UDF functions

Word Management, about 15 different functions, disappeared,  gone.

With the installation that I just did today, the functions are there.

But here is a problem I am having on the win 11 laptop:

I have copied over a fully functioning script from my win 7 laptop to my win 11 laptop and i find this line of code producing an error:

$miDoc = ObjCreate("MODI.Document")

Am I missing a dll or something?

Thanks

Link to post
Share on other sites

Yes. Unfortunately the MODI stuff is not in newer versions. It worked with 2003 and 2007.
No reason for 2007 not to work in Win11, Works on Win10.

Usually I do all my coding in virtual machines. It makes it easier to code and have a bootable PC too ( as in eat your cake and have it too ). Anything goes wrong, replace the "HardDrive.vm" ( or however is named ) and keep going  ;)

Link to post
Share on other sites

You would need to check that Office 2007 components can be installed along side Office 2019 as Office Click-to-Run installations (Office 2019+) and Office Msi installations (2016 and below) are incompatible.  Some Office products less 2010 and below I've found do work as Click-to-Run won't try to detect them.  But agree with argumentum, I'd just use a Windows vm.  Keep your Windows 11 up to date and use your vm for legacy.

Link to post
Share on other sites

As per Microsoft, downloading MDI to Tiff converter installs MODI:

https://support.microsoft.com/en-us/topic/install-modi-for-use-with-microsoft-office-2010-4fbd3076-6d01-9cb7-c574-3bbabc9eead9

I installed it and now I get :

Variable must be of type "Object" for $miDoc.Create($temp)

Before installing MDI to Tiff converter I got an error on the line previous to this line ($miDoc = ObjCreate("MODI.Document")

Here is the code again:

Func OCR_Region($x,$y,$width,$height)  ;note $height is NOT the height, it is the Y coordinate bottom right corner, width is bottom right corner X.

    Dim $miDoc, $Doc
    Dim $str
    Dim $oWord
    Dim $sArray[200]
    Dim $oMyError
    Dim $HexNumber
    Dim $msg
    Dim $i
        ;Const $miLANG_CZECH = 5
        ;Const $miLANG_DANISH = 6
        ;Const $miLANG_DUTCH = 19
        Const $miLANG_ENGLISH = 9
        ;Const $miLANG_FINNISH = 11
        ;Const $miLANG_FRENCH = 12
        ;Const $miLANG_GERMAN = 7
        ;Const $miLANG_GREEK = 8
        ;Const $miLANG_HUNGARIAN = 14
        ;Const $miLANG_ITALIAN = 16
        ;Const $miLANG_JAPANESE = 17
        ;Const $miLANG_KOREAN = 18
        ;Const $miLANG_NORWEGIAN = 20
        ;Const $miLANG_POLISH = 21
        ;Const $miLANG_PORTUGUESE = 22
        ;Const $miLANG_RUSSIAN = 25
        ;Const $miLANG_SPANISH = 10
        ;Const $miLANG_SWEDISH = 29
        ;Const $miLANG_TURKISH = 31
        ;Const $miLANG_SYSDEFAULT = 2048
        ;Const $miLANG_CHINESE_SIMPLIFIED = 2052
        ;Const $miLANG_CHINESE_TRADITIONAL = 1028

        Local $hBitmap1,$hImage1,$temp
        $temp=@ScriptDir & "\temp.bmp"
        _GDIPlus_Startup ()
        ; Capture screen region
        $hBitmap1 = _ScreenCapture_Capture ("",$x, $y, $width, $height, False)
        $hImage1 = _GDIPlus_BitmapCreateFromHBITMAP ($hBitmap1)
        _GDIPlus_ImageSaveToFile ($hImage1, $temp)
        _GDIPlus_ImageDispose ($hImage1)
        _WinAPI_DeleteObject ($hBitmap1)

        $miDoc = ObjCreate("MODI.Document")
        $miDoc.Create($temp)
        ;MsgBox(0,"",$temp);this is the bitmap image which is "temp.bmp"
        $miDoc.Ocr($miLANG_ENGLISH, True, False)

        $i = 0
            For $oWord in $miDoc.Images(0).Layout.Words
                $str = $str & $oWord.text & @CrLf
                ;ConsoleWrite($oWord.text & @CRLF)
                $sArray [$i] = $oWord.text
                $i += 1
            Next
            FileDelete($temp)
            Return $sArray
        EndFunc

Thanks for your elp

Link to post
Share on other sites
Posted (edited)

I got the following error:
 

! We intercepted a COM Error !

! err.description is:   
! err.windescription:   Invalid class string

! err.number is:  800401F3
! err.lastdllerror is:0
! err.scriptline is:    8
! err.source is:  
! err.helpfile is:      
! err.helpcontext is:   

!>15:24:06 AutoIt3.exe ended.rc:123
+>15:24:06 AutoIt3Wrapper Finished.

>Exit code: 123    Time: 1.513

It works ok on my win 7 laptop

I ordered a full install of Office 2007 on Ebay

I'll see how that goes.

Thanks

Edited by AutoitMike
Link to post
Share on other sites
  • 2 weeks later...

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...