Bakiki Posted December 23, 2014 Share Posted December 23, 2014 (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 expandcollapse popup; =============================================================================================================================== ; 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 December 23, 2014 by Bakiki Link to comment Share on other sites More sharing options...
Geir1983 Posted December 23, 2014 Share Posted December 23, 2014 Scite4Autoit is only the editor, you also need to install the correct autoit version. Link to comment Share on other sites More sharing options...
MikahS Posted December 23, 2014 Share Posted December 23, 2014 You are only downloading the new editor, not the language. Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy 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 Link to comment Share on other sites More sharing options...
MikahS Posted December 23, 2014 Share Posted December 23, 2014 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 ~ getENVvarsMy 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 Link to comment Share on other sites More sharing options...
Bakiki Posted December 23, 2014 Author Share Posted December 23, 2014 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 Link to comment Share on other sites More sharing options...
MikahS Posted December 23, 2014 Share Posted December 23, 2014 re-install the full editor: link let me know if you get the same thing after a re-install. Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy 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 Link to comment Share on other sites More sharing options...
Bakiki Posted December 23, 2014 Author Share Posted December 23, 2014 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. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 23, 2014 Moderators Share Posted December 23, 2014 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Bakiki Posted December 23, 2014 Author Share Posted December 23, 2014 Sorry, of course you did...Melba23 messagebox returns 3.3.12.0 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 23, 2014 Moderators Share Posted December 23, 2014 (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 December 23, 2014 by SmOke_N 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. Link to comment Share on other sites More sharing options...
Bakiki Posted December 23, 2014 Author Share Posted December 23, 2014 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 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 23, 2014 Moderators Share Posted December 23, 2014 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. 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. Link to comment Share on other sites More sharing options...
binhnx Posted December 24, 2014 Share Posted December 24, 2014 (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 December 24, 2014 by binhnx 99 little bugs in the code 99 little bugs! Take one down, patch it around 117 little bugs in the code! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 24, 2014 Moderators Share Posted December 24, 2014 @binhnx (#3.) 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. Link to comment Share on other sites More sharing options...
binhnx Posted December 24, 2014 Share Posted December 24, 2014 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! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 24, 2014 Moderators Share Posted December 24, 2014 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). binhnx 1 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now