Cyberworld Posted July 30, 2006 Share Posted July 30, 2006 I found this code here a while ago and have tried to make it work better than my own but i failed It seems to work the first two times files are dropped but then it starts to append the old data to the new one. What is wrong with it? Are there any solutions to this problem?? #include <GUIConstants.au3> GUICreate("Drop Area", 400, 300, -1, -1, -1, $WS_EX_ACCEPTFILES) ; The control to receive information ; Y=-100 to hide text and HEIGHT+100 to cover whole the window $drop = GUICtrlCreateInput("", 0, -100, 400, 400, $WS_DISABLED + $ES_AUTOHSCROLL, 0) GUICtrlSetState(-1, $GUI_DROPACCEPTED) ;------------------------ ; Create other controls here $main_win = GUICtrlCreateInput("Test", 14, 14 ,300, 250, BitOr($WS_VSCROLL, $WS_HSCROLL, $ES_MULTILINE)) ;------------------------ GUISetState() $msg = 0 while $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() if not $msg then elseif $msg = $GUI_EVENT_DROPPED then if @GUI_DRAGID = -1 then ; File(s) dropped $files = GUICtrlRead($drop) ; File list in the form: file1|file2|... StringReplace($files, "|", @CR) MsgBox(0, 'Dropped', StringReplace($files, "|", "@CR")) GUICtrlSetData($main_win, $files, default) endif endif wend Link to comment Share on other sites More sharing options...
Lazycat Posted July 31, 2006 Share Posted July 31, 2006 Welcome to the board It seems to work the first two times files are dropped but then it starts to append the old data to the new one. What is wrong with it?Strange prob, possible bug.You can try another method to get multiple files here. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
Cyberworld Posted July 31, 2006 Author Share Posted July 31, 2006 Could it be that bad, an AutoIt bug? I have tried your method before but there was a thing I couldn't make to work. I need the drag'n drop work in an edit window (inputctrl). With your script I could not drop a file with the same filename twice, it seems just to be ignored? I have tried to make a version with just one inputctrl but the problem there is that I cant prevent anybody to move the cursor/left mouseclick in the gui. Link to comment Share on other sites More sharing options...
Lazycat Posted August 2, 2006 Share Posted August 2, 2006 Could it be that bad, an AutoIt bug? I have tried your method before but there was a thing I couldn't make to work. I need the drag'n drop work in an edit window (inputctrl). With your script I could not drop a file with the same filename twice, it seems just to be ignored? I have tried to make a version with just one inputctrl but the problem there is that I cant prevent anybody to move the cursor/left mouseclick in the gui.Hm, I'm fail to understand what the goals you have. Can you explain how GUI should acts and what result you want to reach? Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
Cyberworld Posted August 2, 2006 Author Share Posted August 2, 2006 Well.. The problem with the gui is that if the user move the cursor (with the arrows or leftclick in the gui) the input merges with the previous text. This is not a problem if the old string is untouched. Example: OLD_STRINGNEW_STRING (This is not a problem, just a simple "$file=NEW_STRING-OLD_STRING" BUT: OLDNEW_STRING_STRING (This is imposible to do something about since I don't know anything about the new string and the old one is now merged with the new one) I can make it work with single files (Using the macro @GUI_DragFile) but not with multiple files. What I want to do is the gui to accept single/multiple drag'n drop with filenames that is separated from the userinput. The only way to do this is to find a way to prevent the input to be mixed with the old data. A solution would be like in the script above with a separate input and output handler, but the bug prevents it from work as thought. The goal is to make the gui to accept single or multiple drag'n drops and return the proper path(s)/filename(s) to a variable that will be sent as an argument to an external program. Your code is fine for this purpose except that is seems to ignore the files if they have been dropped before. (i.e a file with same filename as a previous one can't be dropped again). All other parts of the program are working so it's just this thing with the drag'n drop that causes problems. Link to comment Share on other sites More sharing options...
GaryFrost Posted August 2, 2006 Share Posted August 2, 2006 Alternative: expandcollapse popup#include <GuiConstants.au3> Global Const $WM_COMMAND = 0x0111 Global Const $EN_CHANGE = 0x300 Global Const $DebugIt = 1 Global $File_Changed = False Global $file _Main() Func _Main() Local $txtInput = "Edit Box Accepts Files" & @CRLF GUICreate(" My GUI Edit acceptfile", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, 0x00000018); WS_EX_ACCEPTFILES $file = GUICtrlCreateEdit($txtInput, 10, 5, 300, 90, BitOR($ES_MULTILINE, $ES_LEFT, $ES_AUTOHSCROLL, $WS_VSCROLL, $WS_HSCROLL)) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlSendMsg($file, $EM_SETREADONLY, True, 0) GUICtrlSetBkColor($file, 0xFFFFFF) $btn = GUICtrlCreateButton("Ok", 130, 100, 60, 20) GUISetState() GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND") $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn ExitLoop Case $File_Changed = True $File_Changed = Not $File_Changed _UpdateFiles($file, $txtInput) EndSelect WEnd EndFunc ;==>_Main Func _UpdateFiles(ByRef $input_file, ByRef $txtInput) Local $text = GUICtrlRead($input_file) ;~ $text = StringReplace($text, $txtInput, "") $text = StringReplace($text, "|", @CRLF) $txtInput = GUICtrlRead($input_file) GUICtrlSetData($input_file, $text) EndFunc ;==>_UpdateFiles Func _File_Changed() ;---------------------------------------------------------------------------------------------- If $DebugIt Then ConsoleWrite(_DebugHeader("File Changed:" & GUICtrlRead($file))) ;---------------------------------------------------------------------------------------------- $File_Changed = True EndFunc ;==>_File_Changed Func MY_WM_COMMAND($hWnd, $msg, $wParam, $lParam) Local $nNotifyCode = _HiWord($wParam) Local $nID = _LoWord($wParam) Local $hCtrl = $lParam Switch $nID Case $file Switch $nNotifyCode Case $EN_CHANGE _File_Changed() EndSwitch EndSwitch ; Proceed the default Autoit3 internal message commands. ; You also can complete let the line out. ; !!! But only 'Return' (without any value) will not proceed ; the default Autoit3-message in the future !!! Return $GUI_RUNDEFMSG EndFunc ;==>MY_WM_COMMAND Func _DebugHeader($s_text) Return _ "!===========================================================" & @LF & _ "+===========================================================" & @LF & _ "-->" & $s_text & @LF & _ "+===========================================================" & @LF EndFunc ;==>_DebugHeader Func _HiWord($x) Return BitShift($x, 16) EndFunc ;==>_HiWord Func _LoWord($x) Return BitAND($x, 0xFFFF) EndFunc ;==>_LoWord SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
Cyberworld Posted August 2, 2006 Author Share Posted August 2, 2006 Gafrost: Everything works fine as long the cursor position is not changed by the user. I suppose is easy to disable the arrow keys with hotkeys but is there any way to disable a leftclick in the window? Link to comment Share on other sites More sharing options...
GaryFrost Posted August 2, 2006 Share Posted August 2, 2006 Gafrost: Everything works fine as long the cursor position is not changed by the user. I suppose is easy to disable the arrow keys with hotkeys but is there any way to disable a leftclick in the window? Try this: expandcollapse popup#include <GuiConstants.au3> #include <GuiEdit.au3> Opt("MustDeclareVars", 1) Global Const $WM_COMMAND = 0x0111 Global Const $DebugIt = 1 Global $File_Changed = False Global $file, $btn _Main() Func _Main() Local $txtInput = "Edit Box Accepts Files" & @CRLF, $msg GUICreate(" My GUI Edit acceptfile", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, 0x00000018); WS_EX_ACCEPTFILES $file = GUICtrlCreateEdit($txtInput, 10, 5, 300, 90, BitOR($ES_WANTRETURN, $ES_MULTILINE, $ES_LEFT, $ES_AUTOHSCROLL, $WS_VSCROLL, $WS_HSCROLL)) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlSendMsg($file, $EM_SETREADONLY, True, 0) GUICtrlSetBkColor($file, 0xFFFFFF) $btn = GUICtrlCreateButton("Ok", 130, 100, 60, 20) GUICtrlSetState($btn, $GUI_FOCUS) GUISetState() GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND") $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn ExitLoop Case $File_Changed = True $File_Changed = Not $File_Changed _UpdateFiles($file, $txtInput) EndSelect WEnd EndFunc ;==>_Main Func _UpdateFiles(ByRef $input_file, ByRef $txtInput) Local $text = GUICtrlRead($input_file) ;~ $text = StringReplace($text, $txtInput, "") $text = StringReplace($text, "|", @CRLF) $txtInput = GUICtrlRead($input_file) GUICtrlSetData($input_file, $text) EndFunc ;==>_UpdateFiles Func _File_Changed() ;---------------------------------------------------------------------------------------------- If $DebugIt Then _DebugPrint("File Changed:" & GUICtrlRead($file)) ;---------------------------------------------------------------------------------------------- $File_Changed = True EndFunc ;==>_File_Changed Func MY_WM_COMMAND($hWnd, $msg, $wParam, $lParam) Local Const $EN_SETFOCUS = 0x100 Local Const $EN_CHANGE = 0x300 Local $nNotifyCode = _HiWord($wParam) Local $nID = _LoWord($wParam) Local $hCtrl = $lParam Switch $nID Case $file Switch $nNotifyCode Case $EN_CHANGE _File_Changed() Case $EN_SETFOCUS ;---------------------------------------------------------------------------------------------- If $DebugIt Then _DebugPrint("$EN_SETFOCUS") ;---------------------------------------------------------------------------------------------- _GUICtrlEditSetSel($file, StringLen(GUICtrlRead($file)), StringLen(GUICtrlRead($file))) GUICtrlSetState($btn, $GUI_FOCUS) EndSwitch EndSwitch ; Proceed the default Autoit3 internal message commands. ; You also can complete let the line out. ; !!! But only 'Return' (without any value) will not proceed ; the default Autoit3-message in the future !!! Return $GUI_RUNDEFMSG EndFunc ;==>MY_WM_COMMAND Func _DebugPrint($s_text) $s_text = StringReplace($s_text, @LF, @LF & "-->") ConsoleWrite("!===========================================================" & @LF & _ "+===========================================================" & @LF & _ "-->" & $s_text & @LF & _ "+===========================================================" & @LF) EndFunc ;==>_DebugPrint Func _HiWord($x) Return BitShift($x, 16) EndFunc ;==>_HiWord Func _LoWord($x) Return BitAND($x, 0xFFFF) EndFunc ;==>_LoWord SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
Cyberworld Posted August 2, 2006 Author Share Posted August 2, 2006 (edited) It does not prevent mouseclicks(try double click somewhere) in the GUI, you don't see the cursor but it still affect the input. Edited August 2, 2006 by Cyberworld Link to comment Share on other sites More sharing options...
GaryFrost Posted August 2, 2006 Share Posted August 2, 2006 It does not prevent mouseclicks(try double click somewhere) in the GUI, you don't see the cursor but it still affect the input. don't think you can prevent mouse clicks, just a matter of making sure the caret is where you want it expandcollapse popup#include <GuiConstants.au3> #include <GuiEdit.au3> Opt("MustDeclareVars", 1) Global Const $WM_COMMAND = 0x0111 Global Const $DebugIt = 1 Global $File_Changed = False Global $file _Main() Func _Main() Local $txtInput = "Edit Box Accepts Files" & @CRLF, $msg, $btn GUICreate(" My GUI Edit acceptfile", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, 0x00000018); WS_EX_ACCEPTFILES $file = GUICtrlCreateEdit($txtInput, 10, 5, 300, 90, BitOR($ES_WANTRETURN, $ES_MULTILINE, $ES_LEFT, $ES_AUTOHSCROLL, $WS_VSCROLL, $WS_HSCROLL)) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlSendMsg($file, $EM_SETREADONLY, True, 0) GUICtrlSetBkColor($file, 0xFFFFFF) $btn = GUICtrlCreateButton("Ok", 130, 100, 60, 20) GUICtrlSetState($btn, $GUI_FOCUS) GUISetState() GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND") $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn ExitLoop Case $File_Changed = True $File_Changed = Not $File_Changed _UpdateFiles($file, $txtInput) _GUICtrlEditSetSel($file, StringLen(GUICtrlRead($file)), StringLen(GUICtrlRead($file))) EndSelect WEnd EndFunc ;==>_Main Func _UpdateFiles(ByRef $input_file, ByRef $txtInput) Local $text = GUICtrlRead($input_file) $text = StringReplace($text, "|", @CRLF) $txtInput = GUICtrlRead($input_file) GUICtrlSetData($input_file, $text) EndFunc ;==>_UpdateFiles Func _File_Changed() ;---------------------------------------------------------------------------------------------- If $DebugIt Then _DebugPrint("File Changed:" & GUICtrlRead($file)) ;---------------------------------------------------------------------------------------------- $File_Changed = True EndFunc ;==>_File_Changed Func _File_GotFocus() ;---------------------------------------------------------------------------------------------- If $DebugIt Then _DebugPrint("$EN_SETFOCUS: " & StringLen(GUICtrlRead($file))) ;---------------------------------------------------------------------------------------------- _GUICtrlEditSetSel($file, StringLen(GUICtrlRead($file)), StringLen(GUICtrlRead($file))) EndFunc ;==>_File_GotFocus Func _File_LostFocus() ;---------------------------------------------------------------------------------------------- If $DebugIt Then _DebugPrint("$EN_KILLFOCUS") ;---------------------------------------------------------------------------------------------- _GUICtrlEditSetSel($file, StringLen(GUICtrlRead($file)), StringLen(GUICtrlRead($file))) EndFunc ;==>_File_LostFocus Func MY_WM_COMMAND($hWnd, $msg, $wParam, $lParam) Local Const $EN_SETFOCUS = 0x100 Local Const $EN_CHANGE = 0x300 Local Const $EN_KILLFOCUS = 0x200 Local $nNotifyCode = _HiWord($wParam) Local $nID = _LoWord($wParam) Local $hCtrl = $lParam Switch $nID Case $file Switch $nNotifyCode Case $EN_CHANGE _File_Changed() Case $EN_SETFOCUS _File_GotFocus() Case $EN_KILLFOCUS _File_LostFocus() EndSwitch EndSwitch ; Proceed the default Autoit3 internal message commands. ; You also can complete let the line out. ; !!! But only 'Return' (without any value) will not proceed ; the default Autoit3-message in the future !!! Return $GUI_RUNDEFMSG EndFunc ;==>MY_WM_COMMAND Func _DebugPrint($s_text) $s_text = StringReplace($s_text, @LF, @LF & "-->") ConsoleWrite("!===========================================================" & @LF & _ "+===========================================================" & @LF & _ "-->" & $s_text & @LF & _ "+===========================================================" & @LF) EndFunc ;==>_DebugPrint Func _HiWord($x) Return BitShift($x, 16) EndFunc ;==>_HiWord Func _LoWord($x) Return BitAND($x, 0xFFFF) EndFunc ;==>_LoWord SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
Cyberworld Posted August 2, 2006 Author Share Posted August 2, 2006 Fine for me. The latest changes you made seems to solve my problem. BTW: Since it's not posible to create own context menus, are there any way to remove it? Link to comment Share on other sites More sharing options...
GaryFrost Posted August 2, 2006 Share Posted August 2, 2006 Fine for me. The latest changes you made seems to solve my problem. BTW: Since it's not posible to create own context menus, are there any way to remove it?I don't know of a way SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
Cyberworld Posted August 2, 2006 Author Share Posted August 2, 2006 (edited) OK, it doesn't matter. If you don't know then it's probably not possible. Thanks for you help. Edited August 2, 2006 by Cyberworld Link to comment Share on other sites More sharing options...
Lazycat Posted August 2, 2006 Share Posted August 2, 2006 BTW: Since it's not posible to create own context menus, are there any way to remove it? I don't sure if this possible just remove standard edit context menu, but with some workaround you can replace it with own context menus: expandcollapse popup#include <GUIConstants.au3> Global $WM_CONTEXTMENU = 0x7B $hGUI = GUICreate("Test", 400, 200, 219, 178) $hEdit = GUICtrlCreateEdit("", 5, 5, 390, 190) GUISetState(@SW_SHOW) $lblDummy = GUICtrlCreateDummy() $lblDummyContext = GUICtrlCreateContextMenu($lblDummy) $mnu0100 = GUICtrlCreateMenu("My custom menu", $lblDummyContext) $mnu0101 = GUICtrlCreateMenuItem("My submenu 1", $mnu0100) $mnu0102 = GUICtrlCreateMenuItem("My submenu 2", $mnu0100) While 1 $aInfo = GUIGetCursorInfo() If IsArray($aInfo) Then If _IsPressed(0x2) and ($aInfo[4] = $hEdit) and WinActive($hGUI) Then $mPos = MouseGetPos() _TrackPopupMenu($hGUI, GUICtrlGetHandle($lblDummyContext), $mPos[0], $mPos[1]) EndIf EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _IsPressed($nKey) Local $a $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", "0x" & Hex($nKey, 2)) If BitAND($aR[0], 0x8000) Then Return True Return False EndFunc Func _TrackPopupMenu($hWnd, $hMenu, $x, $y) DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hMenu, "int", 0, "int", $x, "int", $y, "hwnd", $hWnd, "ptr", 0) EndFunc Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
GaryFrost Posted August 2, 2006 Share Posted August 2, 2006 Lazycat's code implimented in the code i've been working on with you. expandcollapse popup#include <GuiConstants.au3> #include <GuiEdit.au3> #include <Misc.au3> Opt("MustDeclareVars", 1) Global Const $WM_COMMAND = 0x0111 Global Const $DebugIt = 1 Global $File_Changed = False Global $file _Main() Func _Main() Local $txtInput = "Edit Box Accepts Files" & @CRLF, $msg, $btn, $hGUI Local $aInfo, $mPos $hGUI = GUICreate(" My GUI Edit acceptfile", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, 0x00000018); WS_EX_ACCEPTFILES $file = GUICtrlCreateEdit($txtInput, 10, 5, 300, 90, BitOR($ES_WANTRETURN, $ES_MULTILINE, $ES_LEFT, $ES_AUTOHSCROLL, $WS_VSCROLL, $WS_HSCROLL)) GUICtrlSetState($file, $GUI_DROPACCEPTED) GUICtrlSendMsg($file, $EM_SETREADONLY, True, 0) GUICtrlSetBkColor($file, 0xFFFFFF) Local $lblDummy = GUICtrlCreateDummy() Local $lblDummyContext = GUICtrlCreateContextMenu($lblDummy) Local $mnu0100 = GUICtrlCreateMenu("My custom menu", $lblDummyContext) Local $mnu0101 = GUICtrlCreateMenuItem("My submenu 1", $mnu0100) Local $mnu0102 = GUICtrlCreateMenuItem("My submenu 2", $mnu0100) $btn = GUICtrlCreateButton("Ok", 130, 100, 60, 20) GUICtrlSetState($btn, $GUI_FOCUS) GUISetState() GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND") $msg = 0 While $msg <> $GUI_EVENT_CLOSE $aInfo = GUIGetCursorInfo() If IsArray($aInfo) Then If _IsPressed(0x2) and ($aInfo[4] = $file) and WinActive($hGUI) Then $mPos = MouseGetPos() _TrackPopupMenu($hGUI, GUICtrlGetHandle($lblDummyContext), $mPos[0], $mPos[1]) EndIf EndIf $msg = GUIGetMsg() Select Case $msg = $btn ExitLoop Case $File_Changed = True $File_Changed = Not $File_Changed _UpdateFiles($file, $txtInput) _GUICtrlEditSetSel($file, StringLen(GUICtrlRead($file)), StringLen(GUICtrlRead($file))) Case $msg = $mnu0101 _DebugPrint("My submenu 1") Case $msg = $mnu0102 _DebugPrint("My submenu 2") EndSelect WEnd EndFunc ;==>_Main Func _UpdateFiles(ByRef $input_file, ByRef $txtInput) Local $text = GUICtrlRead($input_file) $text = StringReplace($text, "|", @CRLF) $txtInput = GUICtrlRead($input_file) GUICtrlSetData($input_file, $text) EndFunc ;==>_UpdateFiles Func _File_Changed() ;---------------------------------------------------------------------------------------------- If $DebugIt Then _DebugPrint("File Changed:" & GUICtrlRead($file)) ;---------------------------------------------------------------------------------------------- $File_Changed = True EndFunc ;==>_File_Changed Func _File_GotFocus() ;---------------------------------------------------------------------------------------------- If $DebugIt Then _DebugPrint("$EN_SETFOCUS: " & StringLen(GUICtrlRead($file))) ;---------------------------------------------------------------------------------------------- _GUICtrlEditSetSel($file, StringLen(GUICtrlRead($file)), StringLen(GUICtrlRead($file))) EndFunc ;==>_File_GotFocus Func _File_LostFocus() ;---------------------------------------------------------------------------------------------- If $DebugIt Then _DebugPrint("$EN_KILLFOCUS") ;---------------------------------------------------------------------------------------------- _GUICtrlEditSetSel($file, StringLen(GUICtrlRead($file)), StringLen(GUICtrlRead($file))) EndFunc ;==>_File_LostFocus Func MY_WM_COMMAND($hWnd, $msg, $wParam, $lParam) Local Const $EN_SETFOCUS = 0x100 Local Const $EN_CHANGE = 0x300 Local Const $EN_KILLFOCUS = 0x200 Local $nNotifyCode = _HiWord($wParam) Local $nID = _LoWord($wParam) Local $hCtrl = $lParam Switch $nID Case $file Switch $nNotifyCode Case $EN_CHANGE _File_Changed() Case $EN_SETFOCUS _File_GotFocus() Case $EN_KILLFOCUS _File_LostFocus() EndSwitch EndSwitch ; Proceed the default Autoit3 internal message commands. ; You also can complete let the line out. ; !!! But only 'Return' (without any value) will not proceed ; the default Autoit3-message in the future !!! Return $GUI_RUNDEFMSG EndFunc ;==>MY_WM_COMMAND Func _DebugPrint($s_text) $s_text = StringReplace($s_text, @LF, @LF & "-->") ConsoleWrite("!===========================================================" & @LF & _ "+===========================================================" & @LF & _ "-->" & $s_text & @LF & _ "+===========================================================" & @LF) EndFunc ;==>_DebugPrint Func _HiWord($x) Return BitShift($x, 16) EndFunc ;==>_HiWord Func _LoWord($x) Return BitAND($x, 0xFFFF) EndFunc ;==>_LoWord Func _TrackPopupMenu($hWnd, $hMenu, $x, $y) DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hMenu, "int", 0, "int", $x, "int", $y, "hwnd", $hWnd, "ptr", 0) EndFunc SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  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