Sign in to follow this  
Followers 0
Bakiki

DragDropEvent.au3 requires version 3.3.8.0 error...?

16 posts in this topic

#1 ·  Posted (edited)

Hi

Can anyone suggest a possible solution to why I'm having an error with SciTE

'DragDropEvent.au3 requires version 3.3.8.0 at least

I'm on the latest SciTE4AutoIt3.exe which has been downloaded ,installed and uninstalled a number of times today. But I'm still getting this annoying message...

I'm trying to get this simple example working which was included with UDF..

 

What could I be doing wrong..?

BTW DragDropEvent.au3 is in the "C:\Program Files (x86)\AutoIt3\Include\" folder..

Many thanks

; ===============================================================================================================================
; File     : DragDropEvent_Example_2.au3 (2012/3/9)
; Purpose  : Demonstrate the usage of DragDropEvent UDF
; Author   : Ward
; ===============================================================================================================================

#Include <GUIConstantsEx.au3>
#Include <WindowsConstants.au3>
#Include "DragDropEvent.au3"

Opt("MustDeclareVars", 1)

Global $Button1, $Button2, $Button3, $Button4

DragDropEvent_Startup()
Main()
Exit

Func Main()
    Local $MainWin = GUICreate("DragDropEvent Example", 460, 400, -1, -1, -1, $WS_EX_TOPMOST)
    GUISetFont(12, 900)

    $Button1 = GUICtrlCreateButton("Drop Text", 20, 20, 200, 150)
    $Button2 = GUICtrlCreateButton("Drop Files", 240, 20, 200, 150)
    $Button3 = GUICtrlCreateButton("Drop Anything", 20, 190, 200, 150)
    $Button4 = GUICtrlCreateButton("Don't Drop", 240, 190, 200, 150)
    GUICtrlCreateLabel("(Click button to revoke the target)", 40, 350)

    DragDropEvent_Register(GUICtrlGetHandle($Button1), $MainWin)
    DragDropEvent_Register(GUICtrlGetHandle($Button2), $MainWin)
    DragDropEvent_Register(GUICtrlGetHandle($Button3), $MainWin)
    DragDropEvent_Register(GUICtrlGetHandle($Button4), $MainWin)

    GUIRegisterMsg($WM_DRAGENTER, "OnDragDrop")
    GUIRegisterMsg($WM_DRAGOVER, "OnDragDrop")
    GUIRegisterMsg($WM_DRAGLEAVE, "OnDragDrop")
    GUIRegisterMsg($WM_DROP, "OnDragDrop")

    GUISetState(@SW_SHOW)
    While 1
        Local $Msg = GUIGetMsg()
        Switch $Msg
            Case $Button1, $Button2, $Button3, $Button4
                DragDropEvent_Revoke(GUICtrlGetHandle($Msg))

            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd

    GUIDelete()
EndFunc

Func OnDragDrop($hWnd, $Msg, $wParam, $lParam)
    Static $DropAccept

    Switch $Msg
        Case $WM_DRAGENTER, $WM_DROP
            ToolTip("")
            Local $Target = DragDropEvent_GetHWnd($wParam)
            Select
                Case DragDropEvent_IsFile($wParam)
                    If $Target = GUICtrlGetHandle($Button1) Or $Target = GUICtrlGetHandle($Button4) Then
                        $DropAccept = $DROPEFFECT_NONE
                    Else
                        If $Msg = $WM_DROP Then
                            Local $FileList = DragDropEvent_GetFile($wParam)
                            MsgBox(262144, "DragDropEvent", StringReplace($FileList, "|", @LF))
                        EndIf
                        $DropAccept = $DROPEFFECT_COPY
                    EndIf

                Case DragDropEvent_IsText($wParam)
                    If $Target = GUICtrlGetHandle($Button2) Or $Target = GUICtrlGetHandle($Button4) Then
                        $DropAccept = $DROPEFFECT_NONE
                    Else
                        If $Msg = $WM_DROP Then
                            MsgBox(262144, "DragDropEvent", DragDropEvent_GetText($wParam))
                        EndIf
                        $DropAccept = $DROPEFFECT_COPY
                    EndIf

                Case Else
                    $DropAccept = $DROPEFFECT_NONE

            EndSelect
            Return $DropAccept

        Case $WM_DRAGOVER
            Local $X = DragDropEvent_GetX($wParam)
            Local $Y = DragDropEvent_GetY($wParam)
            Local $KeyState = DragDropEvent_GetKeyState($wParam)
            ToolTip("(" & $X & "," & $Y & "," & $KeyState & ")")
            Return $DropAccept

        Case $WM_DRAGLEAVE
            ToolTip("")

    EndSwitch
EndFunc
Edited by Bakiki

Share this post


Link to post
Share on other sites



Scite4Autoit is only the editor, you also need to install the correct autoit version.

Share this post


Link to post
Share on other sites

You are only downloading the new editor, not the language.


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

download and install this: link

You might need to re-download the full customized editor though, as this only includes the cut down version.


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

Whoops that's an oversight.

I have downloaded the editor as suggested by MikahS. But now I'm getting an error

the scintilla DLL could not be loaded. SciTE will now close..

Any suggestions

Thank you for all replies

Share this post


Link to post
Share on other sites

re-install the full editor: link

let me know if you get the same thing after a re-install.


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

I have installed again with no problems. But I'm backed to the same original error , 'DragDropEvent.au3 requires version 3.3.8.0 at least

The SciTE editor ABOUT confirms

SciTE
Version 3.4.4
    Jul 13 2014 20:07:38
by Neil Hodgson.
 Updated by Jos
Check the SciTE4AutoIt3 Homepage for Updates
December 1998-July 2014.

Share this post


Link to post
Share on other sites

Bakiki,

As explained above, the 3.3.8.0 refers to the AutoIt version - not SciTE which is just an enhanced editor. Please run this line of code and tell us what is returned: :)

MsgBox(0, "AutoIt version", @AutoItVersion)
M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Sorry, of course you did...Melba23

 

messagebox returns  3.3.12.0

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

:(

1.  I had to search for this UDF (you didn't provide a link)

2.  I didn't even have to run the code to do a search for the error string in the udf.

3.  Comment out line 103 of DragDropEvent.au3, it's incorrectly checking version number

4.  Happy Drag and Drop day :)

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Sorry, I never considered that the  DragDropEvent.au3 was at fault as the thread '?do=embed' frameborder='0' data-embedContent>> contained no complaints but I will bear that in mind next time..

I appreciate the time you took to look into this and  if there are any other suggestions that might speed up my future queries please let me know.

Thanks again

Share this post


Link to post
Share on other sites

When you're running from SciTe, then only time you'll see those types of errors usually (because syntax error checking is so good), is when it's a custom udf call.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

You should to link to the UDF topic, so we can find and test it easier (although it takes a little time to Google).

Open the UDF, in the first line of the first function is a naive check:

If @AutoItVersion < "3.3.8.0" Then Exit MsgBox(16, "DragDropEvent Fail", "Require AutoIt Version 3.3.8.0 at least")

Yeah, you are using AutoIt 3.3.1x.xx so a naive check like that return true because 1 < 8.

Ask the author for a bug-fix. If you need a working script right now, open the UDF and temporary modify it like this:

...
; Support up to version 15.127.511.2047
Func AutoItPackVersion($sVersion)
  Local $aVerNumber = StringSplit($sVersion, '.')
  If $aVerNumber[0] <> 4 Then Return SetError(1, 0, 0)

  Return (BitShift($aVerNumber[1], -27) + BitShift($aVerNumber[2], -20) + BitShift($aVerNumber[3], -11) + $aVerNumber[4])
EndFunc

Func DragDropEvent_Startup()
    If AutoItPackVersion(@AutoItVersion) < AutoItPackVersion("3.3.8.0") Then Exit MsgBox(16, "DragDropEvent Fail", "Require AutoIt Version 3.3.8.0 at least")
.....
Edited by binhnx

99 little bugs in the code

99 little bugs!

Take one down, patch it around

117 little bugs in the code!

Share this post


Link to post
Share on other sites

@binhnx

(#3.)  :whistle:


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Yeah, comment out always work, but provide a solution always great ^^


99 little bugs in the code

99 little bugs!

Take one down, patch it around

117 little bugs in the code!

Share this post


Link to post
Share on other sites

Yeah, comment out always work, but provide a solution always great ^^

Indeed, you could have used _VersionCheck() to check the entire version string though :) .

Length doesn't always matter... take a look at this:

ConsoleWrite(_StringVersionCheck("B3.3.12", "B3.3.12.0.0.0") & @CRLF)

Func _StringVersionCheck($sVersNow, $sVersOld)

    Local $aNow = StringRegExp($sVersNow, "\w+", 3)
    If @error Then Return SetError(1)

    Local $aOld = StringRegExp($sVersOld, "\w+", 3)
    If @error Then Return SetError(2)

    Local $iUB1 = UBound($aNow), $iUB2 = UBound($aOld)
    If $iUB2 > $iUB1 Then ReDim $aNow[$iUB2]
    If $iUB1 > $iUB2 Then ReDim $aOld[$iUB1]
    $iUB1 = ($iUB1 >= $iUB2) ? $iUB1 : $iUB2

    Local $sNowConv, $sOldConv, $iLen1, $iLen2
    For $i = 0 To $iUB1 - 1
        $iLen1 = StringLen($aNow[$i])
        $iLen2 = StringLen($aOld[$i])
        Select
            Case $iLen1 > $iLen2
                $aOld[$i] = StringFormat("%0" & $iLen1 & "d", $aOld[$i])
            Case $iLen2 > $iLen1
                $aNow[$i] = StringFormat("%0" & $iLen2 & "d", $aNow[$i])
        EndSelect
        $sNowConv &= $aNow[$i] & (($i = $iUB1 - 1) ? "" : ".")
        $sOldConv &= $aOld[$i] & (($i = $iUB1 - 1) ? "" : ".")
    Next

    Return StringCompare($sNowConv, $sOldConv)
EndFunc

In your solution, the "old" version would be greater than the newer version.

However, they are both equal (as you can see from the result (0 = 0, -1 = old number is greater, 1 = newer version greater).

1 person likes this

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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