AustrianOak Posted September 6, 2008 Author Share Posted September 6, 2008 Bump Link to comment Share on other sites More sharing options...
AustrianOak Posted September 21, 2008 Author Share Posted September 21, 2008 Bump Link to comment Share on other sites More sharing options...
ProgAndy Posted September 22, 2008 Share Posted September 22, 2008 So, I tried to make it. You have to create Array and set the Window Proc for each Input: CODE#include <GuiConstantsEx.au3> #include <GuiEdit.au3> #include <WindowsConstants.au3> #include <GUIMenu.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <EditConstants.au3> #include <WinAPI.au3> Dim $hInput_GUI[6], $Input[6], $wProcsOld[6], $InputMenu[6] Global $lastdragIP = -1 Global Enum $idOpen = 1000, $idSave, $idInfo $GUI = GUICreate("Test", 300, 300) $button5 = GUICtrlCreateButton("", 100, 200, 40, 25) GUICtrlSetState(-1, $GUI_DEFBUTTON) GUISetState() $wProcHandle = DllCallbackRegister("_WindowProc", "ptr", "hwnd;uint;wparam;lparam") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button5 If $lastdragIP < 5 Then $lastdragIP += 1 createNextdragIP($lastdragIP) EndIf Case $msg = $GUI_EVENT_PRIMARYDOWN $aMouse_Pos = MouseGetPos() $sel = -1 For $n = 0 To $lastdragIP GUISwitch($hInput_GUI[$n]) $aCursorInfo = GUIGetCursorInfo() If Not IsArray($aCursorInfo) Then ContinueLoop If $aCursorInfo[4] = $Input[$n] Then $sel = $n ExitLoop EndIf Next If $sel = -1 Then ContinueLoop $aInputGUI_Pos = WinGetPos($hInput_GUI[$sel]) While IsArray($aCursorInfo) And $aCursorInfo[2] = 1 $aCursorInfo = GUIGetCursorInfo() $aCurrent_Mouse_Pos = MouseGetPos() WinMove($hInput_GUI[$sel], "", _ $aInputGUI_Pos[0] - $aMouse_Pos[0] + $aCurrent_Mouse_Pos[0], _ $aInputGUI_Pos[1] - $aMouse_Pos[1] + $aCurrent_Mouse_Pos[1]) WEnd EndSelect WEnd Func createNextdragIP($nw) $start = WinGetPos($GUI) $hInput_GUI[$nw] = GUICreate("", 120, 22, $start[0]+30, $start[1]+200, $WS_POPUP, $WS_EX_TOOLWINDOW) $Input[$nw] = GUICtrlCreateEdit("", 0, 0, 120, 22, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) $hMenu = _GUICtrlMenu_CreatePopup() $InputMenu[$nw] = $hMenu _GUICtrlMenu_AddMenuItem($hMenu, "Delete", $idOpen) _GUICtrlMenu_AddMenuItem($hMenu, "Save", $idSave) _GUICtrlMenu_AddMenuItem($hMenu, "Info", $idInfo) $wProcsOld[$nw] = _WinAPI_SetWindowLong(GUICtrlGetHandle($Input[$nw]), $GWL_WNDPROC, DllCallbackGetPtr($wProcHandle)) GUISetState() WinSetOnTop($hInput_GUI[$nw], "", 1) EndFunc ;==>createNextdragIP Func _WindowProc($hWnd, $Msg, $wParam, $lParam) Local $wProcOld For $i = 0 To UBound($Input)-1 If GUICtrlGetHandle($Input[$i]) = $hWnd Then Switch $Msg Case $WM_CONTEXTMENU _GUICtrlMenu_TrackPopupMenu($InputMenu[$i], $wParam) Return 0 Case $WM_COMMAND Switch $wParam Case $idOpen GUICtrlDelete($Input[$i]) Case $idSave ConsoleWrite("-> Save" & @LF) Case $idInfo ConsoleWrite("-> Info" & @LF) EndSwitch EndSwitch $wProcOld = $wProcsOld[$i] ExitLoop EndIf Next Local $aRet = DllCall("user32.dll", "int", "CallWindowProc", "ptr", $wProcOld, _ "hwnd", $hWnd, "uint", $Msg, "wparam", $wParam, "lparam", $lParam) Return $aRet[0] EndFunc *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
AustrianOak Posted September 23, 2008 Author Share Posted September 23, 2008 (edited) very nice progandy but it seems to crash after deleting a few edits. Edited September 23, 2008 by AustrianOak Link to comment Share on other sites More sharing options...
AustrianOak Posted September 24, 2008 Author Share Posted September 24, 2008 Does anyone know why this is? I cant figure it out Link to comment Share on other sites More sharing options...
AustrianOak Posted September 27, 2008 Author Share Posted September 27, 2008 Bump Link to comment Share on other sites More sharing options...
BrettF Posted September 27, 2008 Share Posted September 27, 2008 Well what exactly happens when you run Andy's code? How can we replicate it? Please post the output pane from SciTe. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
ProgAndy Posted September 28, 2008 Share Posted September 28, 2008 I tried and deleted all , but it didn't crash. Yes, you can't create new ones, but thats because of the creating and deletion logic Also, the GUIs of the Edits arent deleted. But a crash didn't occur. *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
AustrianOak Posted September 28, 2008 Author Share Posted September 28, 2008 ProgAndy: maybe cuz im running 3.2.11.5 beta? that might be one of the reasons... Link to comment Share on other sites More sharing options...
BrettF Posted September 28, 2008 Share Posted September 28, 2008 Post output pane of SciTe and any messages recieved. It works at bot our ends. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
AustrianOak Posted October 4, 2008 Author Share Posted October 4, 2008 I don't think this will be of much use but when I did a beta run after it crashed here's all that was there: >"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "*\*" /autoit3dir "C:\Program Files\AutoIt3\beta" /UserParams +>14:55:24 Starting AutoIt3Wrapper v.1.9.2 >Running AU3Check (1.54.13.0) from:C:\Program Files\AutoIt3\beta +>14:55:24 AU3Check ended.rc:0 >Running:(3.2.11.5):C:\Program Files\AutoIt3\beta\autoit3.exe "*" -> Save -> Save !>14:56:08 AutoIT3.exe ended.rc:-1073741819 +>14:56:09 AutoIt3Wrapper Finished >Exit code: -1073741819 Time: 45.539 Link to comment Share on other sites More sharing options...
AustrianOak Posted October 5, 2008 Author Share Posted October 5, 2008 I finally got it implemented into my code after some tedious "re-modeling". Thank you so much for all of your help to everyone that contributed and a special thanks to ProgAndy who put in the final piece. Thread finally done... Link to comment Share on other sites More sharing options...
TehWhale Posted October 5, 2008 Share Posted October 5, 2008 Hello, It appears you have found your answer to your question. Please take the time to edit your thread title with [RESOLVED] so others know that is it resolved. You can do this by scrolling to the top of your thread, clicking EDIT and then Full Edit and adding: "[RESOLVED]" to the front of your thread title. Thanks for your cooperation. 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