Leaderboard
Popular Content
Showing content with the highest reputation on 03/25/2016 in all areas
-
Reizvoller, I would strongly suggest a serious change of attitude if you want to stick around here. You posted a question using a filename which in our experience indicated that the question was against the forum rules. Rather then simply assuming that the question was game-related and closing the thread, I gently pointed you to the Forum rules so as to prevent any future unpleasantness. I fail to see why you have suddenly become all excited and started acting as if we had come over all heavy-handed. What you saw was our normal response when we have doubts about a question - all you needed to do was to assure us that your question was legal and we could have avoided a great deal of annoyance all round. As it is you have managed to alienate 2 of the Mods here in fairly short order - pretty good going after only 9 posts. So I suggest you wind your neck very firmly back in and try in future not to take unwarranted offence when absolutely none has been offered. M232 points
-
Try: Local $sCommand = '"Local $sMsg = ""Hello"", $Dummy = MsgBox(0,""Debug"", $sMsg)"' Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & $sCommand) Jos2 points
-
; ;################################## ; Include ;################################## #Include<file.au3> ;################################## ; Variables ;################################## $SmtpServer = "MailServer" ; address for the smtp-server to use - REQUIRED $FromName = "Name" ; name from who the email was sent $FromAddress = "your@Email.Address.com" ; address from where the mail should come $ToAddress = "your@Email.Address.com" ; destination address of the email - REQUIRED $Subject = "Userinfo" ; subject from the email - can be anything you want it to be $Body = "" ; the messagebody from the mail - can be left blank but then you get a blank mail $AttachFiles = "" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed $CcAddress = "CCadress1@test.com" ; address for cc - leave blank if not needed $BccAddress = "BCCadress1@test.com" ; address for bcc - leave blank if not needed $Importance = "Normal" ; Send message priority: "High", "Normal", "Low" $Username = "******" ; username for the account used from where the mail gets sent - REQUIRED $Password = "********" ; password for the account used from where the mail gets sent - REQUIRED $IPPort = 25 ; port used for sending the mail $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS $tls = 0 ; enables/disables TLS when required ;~ $SmtpServer = "smtp.gmail.com" ; GMAIL address for the smtp-server to use - REQUIRED ;~ $IPPort=465 ; GMAIL port used for sending the mail ;~ $ssl=1 ; GMAIL enables/disables secure socket layer sending - put to 1 if using https ;~ $SmtpServer = "smtp.office365.com" ; O365 address for the smtp-server to use - REQUIRED ;~ $IPPort=25 ; O365 port used for sending the mail ;~ $ssl=1 ; O365 enables/disables secure socket layer sending - put to 1 if using https ;~ SmtpServer = "smtp.mail.yahoo.com" ; Yahoo address for the smtp-server to use - REQUIRED ;~ $IPPort = 465 ; Yahoo port used for sending the mail ;~ $ssl = 1 ; Yahoo enables/disables secure socket layer sending - put to 1 if using https ;################################## ; Script ;################################## Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl, $tls) If @error Then MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc) EndIf ; ; The UDF Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0, $tls = 0) Local $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") For $x = 1 To $S_Files2Attach[0] $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x]) ;~ ConsoleWrite('@@ Debug : $S_Files2Attach[$x] = ' & $S_Files2Attach[$x] & @LF & '>Error code: ' & @error & @LF) ;### Debug Console If FileExists($S_Files2Attach[$x]) Then ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF) $objEmail.AddAttachment($S_Files2Attach[$x]) Else ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF) SetError(1) Return 0 EndIf Next EndIf $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer If Number($IPPort) = 0 then $IPPort = 25 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password EndIf ; Set security params If $ssl Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True If $tls Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendtls") = True ;Update settings $objEmail.Configuration.Fields.Update ; Set Email Importance Switch $s_Importance Case "High" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "High" Case "Normal" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Normal" Case "Low" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Low" EndSwitch $objEmail.Fields.Update ; Sent the Message $objEmail.Send If @error Then SetError(2) Return $oMyRet[1] EndIf $objEmail="" EndFunc ;==>_INetSmtpMailCom ; ; ; Com Error Handler Func MyErrFunc() $HexNumber = Hex($oMyError.number, 8) $oMyRet[0] = $HexNumber $oMyRet[1] = StringStripWS($oMyError.description, 3) ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF) SetError(1); something to check for when this function returns Return EndFunc ;==>MyErrFunc Edit: Fixed Bcc ... Edit: Added support for different port and SLL which are used by GMail (Port 465) Edit: Added Importance support (10/2008) EDIT: Added $TLS option (07/2020 Some interesting Info from the thread:1 point
-
Version 1.7.0.1
10,051 downloads
Extensive library to control and manipulate Microsoft Outlook. This UDF holds the functions to automate items (folders, mails, contacts ...) in the background. Can be seen like an API. There are other UDFs available to automate Outlook: OutlookEX_GUI: This UDF holds the functions to automate the Outlook GUI. OutlookTools: Allows to import/export contacts and events to VCF/ICS files and much more. Threads: Development - General Help & Support - Example Scripts - Wiki BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort KNOWN BUGS (last changed: 2020-02-09) None1 point -
Zeotrope, So you want the content of the GUI to change depending on the menu item you select? That should not prove too difficult - but you will have to wait until tomorrow before I post an example. M231 point
-
May be he will build a MouseTrap with emergency exit only in X-direction?1 point
-
GuiListViewEx.au3 cant edit in Win XP?
NewBieAuto reacted to Melba23 for a topic
NewBieAuto, You need to clear and reinitialise the ListView like this: Case $LoadQLDT _GUIListViewEx_Close($LVIdx) ; Remove existing ListView from the UDF _GUICtrlListView_DeleteAllItems($ListViewQLDT) Local $Arr[][] = [['aaaaa', 'bbbbb', 'cddcd'], ['sasa', 'sss', 333]] ;Local $Arr ;_FileReadToArray(@ScriptDir & '\Data.txt', $Arr, 1, '|') ;_ArrayDelete($Arr, 0) _GUICtrlListView_AddArray($ListViewQLDT, $Arr) $LVIdx = _GUIListViewEx_Init($ListViewQLDT, $Arr, 0, Default, Default, 1 + 2) ; Reinitialise the ListView with the new array Now the UDF is aware of the new content and you can edit and sort it without problem. M231 point -
mLipok, Perhaps reading the detailed UDF function headers I spent a lot of time writing might provide a clue..... ; #FUNCTION# ========================================================================================================= ; Name...........: _GUIListViewEx_Init [...] ; $iAdded - 0 - No added features (default). To get added features add the following ; + 1 - Sortable by clicking on column headers (if not user colour enabled) ; + 2 - Editable when double clicking on a subitem in user-defined columns <<<<<< ; + 4 - Edit continues within same ListView by triple mouse-click (only if ListView editable) <<<<<< So if you initiate the ListView like this: $iLV_Index = _GUIListViewEx_Init($idListview, $aArray, 0, 0, True, 2 + 4, "2") you will find that the edit will be accepted if you click elsewhere. M231 point
-
The new version in collaboration with valdemar1977: Changed interface. Fixed detected the errors. Others improvements and additions. Dbug_2016.03.25.zip1 point
-
GUICtrlCreateUpdown & $GUI_DOCKRIGHT misbehaved
argumentum reacted to LarsJ for a topic
My grandmother has asked if you cannot place two hidden labels below the input and up-down controls, and use these labels to position the controls: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=G:\au3s\SMS_lite\TestUpdownHidei.kxf Global $idGui = GUICreate("GUI_DOCKRIGHT oops", 389, 180, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP)) Global $idLabel = GUICtrlCreateLabel("try OnTop and resize, the UpDown does not behave as expacted, play around, you'll see", 16, 52, 356, 100) GUICtrlSetFont(-1, 26, 400, 0, "Lucida Console") GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM) Global $idCk_KeepOnTop = GUICtrlCreateCheckbox("OnTop", 280, 12, 97, 25, BitOR($GUI_SS_DEFAULT_CHECKBOX, $BS_PUSHLIKE)) GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) Global $idSetTrans = GUICtrlCreateInput("0", 200, 12, 69, 24, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER)) GUICtrlSetFont(-1, 12, 400, 0, "Lucida Console") GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) Global $StatusBar1 = _GUICtrlStatusBar_Create($idGui) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $idSetTransUpdown = GUICtrlCreateUpdown($idSetTrans) GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) GUICtrlSetLimit($idSetTransUpdown, 9) GUICtrlSetState($idSetTrans, $GUI_HIDE) GUICtrlSetState($idSetTransUpdown, $GUI_HIDE) GUICtrlSetState($idLabel, $GUI_FOCUS) $idSetTransLabel1 = GUICtrlCreateLabel( "", 200, 12, 69, 24 ) GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) GUICtrlSetState(-1, $GUI_HIDE) $a = ControlGetPos( $idGui, "", $idSetTransUpdown ) $idSetTransLabel2 = GUICtrlCreateLabel( "", $a[0], $a[1], $a[2], $a[3] ) GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) GUICtrlSetState(-1, $GUI_HIDE) GUISetState(@SW_SHOW) ; this is to better show what I mean WinMove($idGui,"",50,50,389+100,180) _GUICtrlStatusBar_Resize($StatusBar1) ; this is to better show what I mean While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete() Exit 0 Case $GUI_EVENT_RESIZED _GUICtrlStatusBar_Resize($StatusBar1) Case $idSetTransUpdown GUICtrlSetState($idLabel, $GUI_FOCUS) Case $idSetTrans GUICtrlSetState($idLabel, $GUI_FOCUS) If Int(GUICtrlRead($idSetTrans)) Then WinSetTrans($idGui, "", 255 - (Int(GUICtrlRead($idSetTrans)) * 25)) Else WinSetTrans($idGui, "", 255) EndIf Case $idCk_KeepOnTop GUICtrlSetState($idLabel, $GUI_FOCUS) If GUICtrlRead($idCk_KeepOnTop) = 1 Then $a = ControlGetPos( $idGui, "", $idSetTransLabel2 ) GUICtrlSetPos( $idSetTransUpdown, $a[0], $a[1], $a[2], $a[3] ) GUICtrlSetState($idSetTransUpdown, $GUI_SHOW) $a = ControlGetPos( $idGui, "", $idSetTransLabel1 ) GUICtrlSetPos( $idSetTrans, $a[0], $a[1], $a[2], $a[3] ) GUICtrlSetState($idSetTrans, $GUI_SHOW) WinSetOnTop($idGui, "", 1) WinSetTrans($idGui, "", 255 - (Int(GUICtrlRead($idSetTrans)) * 20)) Else WinSetOnTop($idGui, "", 0) WinSetTrans($idGui, "", 255) GUICtrlSetState($idSetTrans, $GUI_HIDE) GUICtrlSetState($idSetTransUpdown, $GUI_HIDE) EndIf EndSwitch WEnd It's also my grandmother's opinion that the 3215-bug, could well be one of the bugs that are never solved (and it's not a big deal since there are so easy workarounds).1 point -
Global $SHQUERYRBINFO = DllStructCreate("align 1;int;int64;int64") ; v3.2.11.3 DllStructSetData($SHQUERYRBINFO, 1, DllStructGetSize($SHQUERYRBINFO)) $Query = DllCall("shell32.dll", "int", "SHQueryRecycleBin", "str", "C:\", "ptr", DllStructGetPtr($SHQUERYRBINFO)) If DllStructGetData($SHQUERYRBINFO, 3) <> 0 Then FileRecycleEmpty() EndIf Here's the code by the way1 point
-
It is not too difficult just do the following: Local $sCommand = 'Local $sMsg = "Hello", $Dummy = MsgBox(0,"Debug", $sMsg)' $sCommand = Stringreplace($sCommand,'"', '""') $sCommand = '"' & $sCommand & '"' Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & $sCommand) Jos1 point
-
Helpfile is clear that the _InetSmtpMail() sends an SMTP message. Gmail doen't use SMTP but Authenticated SMTP, which is something totally different. I have never spent the time to make this an official UDF but have neither stopped anyone from doing so. Jos1 point
-
I have read, but want to view the source code is not very good. Help me what to do. $oAcad = ObjGet("","AutoCAD.Application") If @error Then Msgbox(0,"ObjGet","Failed to open AutoCAD.Application.16 Object. Error code: " & @error) Exit Endif $strActiveDocument = $oAcad.Activedocument.Name MsgBox(0,"Name",$strActiveDocument) $iBlocks = $oAcad.Activedocument.Blocks.Count MsgBox(0,"Count",$iBlocks) For $i = 0 to $iBlocks -1 $strBlockName = $oAcad.Activedocument.Blocks.Item($i).name If $strBlockName = "" Then $iAttributes = $oAcad.Activedocument.Blocks.Item($i).GetAttributes() MsgBox(0,"GetAttributes()",$iAttributes) EndIf Next1 point
-
toolbar questions
InunoTaishou reacted to BrewManNH for a topic
Any possibility of you posting a single post instead a group of them all at once? Also, any possibility of you actually reading the help file or at least looking at the list of functions in it? If I wanted to load my own bitmaps onto a toolbar, I would probably look at the _GUICtrlToolbar section of functions, and find one that might by some chance say load bitmap somewhere in its name, or even one that has imagelist in its name as a start. If I wanted to see what these functions did, to see if they were what I might want to use to accomplish loading a bitmap or icon onto a toolbar button, I would run the example scripts that are there, play around with them and see if they might do it. After looking through the entire list of _GUICtrlToolbar functions, and trying any that might look promising, and if I couldn't find what I needed, then and only then would I make a post asking for help. Because I have exhausted all probabilities first and couldn't find the answer. I would NOT make a post, then read the help file, and find what I was looking for 5 minutes later, after wasting my time and other's, and then making another unnecessary post and say "Hey guess what, I found what I needed on my own, sorry for wasting your time"1 point -
Run the _AD_GetObjectProperties.au3 example script and you will get all properties of the user in readable format.1 point
-
I don’t know, but maybe this post will help somehow? http://community.office365.com/en-us/f/158/t/255273.aspx1 point
-
I'll give you a few recommendations that I hope will help you. lets try this. on project Go to Tools/Options/General tab. Select the option to open the last file on startup. Then.. save settings. and close and reopen project 2007 If this does not work then T ry opening a new blank project file, and then copy pasting the non working file into it. If this does not work then lets try this. Open a new blank project file without a project summary task. 2. Go to Insert/Project and insert the problem file. 3. Select the first task which will be the insertion point sumXXXXX XXXXXne. 4. Go to Project/Task Information/Advanced tab. 5. Uncheck the "Link to Project" button and hit "OK". 6. If the file isn't already expanded, expand it. 7. Select all tasks below the top level sumXXXXX XXXXXne. 8. Outdent the selected tasks. 9. Delete the first task which previously was a sumXXXXX XXXXXne. 10. Save the resulting file. If this does not work then try to restore from backup. If not, then I hope you can help Microsoft Project service for online repair https://onlinefilerepair.com/en/project-repair-online.html1 point
-
In Defence of Magic Numbers
toasterking reacted to Exit for a topic
MsgBox("", "", "No magic numbers :-)")1 point -
In Defence of Magic Numbers
toasterking reacted to trancexx for a topic
No way. ...that's magic number too, but the value should be 2.1 point -
Hi guys, I'm not sure if someone else hasn't posted something like this, I didn't manage to find one through the search engine. I personally liked how it retrieves the mouse wheel state. ; ~~ Mouse Hook ~~ ;For more info, Visit: http://msdn.microsoft.com/en-us/library/ms644986(VS.85).aspx ;Include GUI Consts #include <GUIConstants.au3> ;for $GUI_EVENT_CLOSE #Include <WinAPI.au3> ;for HIWORD ;These constants found in the helpfile under Windows Message Codes Global Const $WM_MOUSEMOVE = 0x0200 ;mouse move Global Const $WM_MOUSEWHEEL = 0x020A ;wheel up/down Global Const $WM_LBUTTONDBLCLK = 0x0203 ;left button Global Const $WM_LBUTTONDOWN = 0x0201 Global Const $WM_LBUTTONUP = 0x0202 Global Const $WM_RBUTTONDBLCLK = 0x0206 ;right button Global Const $WM_RBUTTONDOWN = 0x0204 Global Const $WM_RBUTTONUP = 0x0205 Global Const $WM_MBUTTONDBLCLK = 0x0209 ;wheel clicks Global Const $WM_MBUTTONDOWN = 0x0207 Global Const $WM_MBUTTONUP = 0x0208 ;Consts/structs from msdn Global Const $MSLLHOOKSTRUCT = $tagPOINT & ";dword mouseData;dword flags;dword time;ulong_ptr dwExtraInfo" ;~ Global Const $WH_MOUSE_LL = 14 ;already declared ;~ Global Const $tagPOINT = "int X;int Y" ;already declared ;Create GUI $GUI = GUICreate("Mouse Hook", 178, 158, @DesktopWidth-178, 0) ;Top-Left corner $_Event = GUICtrlCreateLabel("Event: ", 8, 8, 158, 17) $_XYpos = GUICtrlCreateLabel("X= Y=", 8, 32, 157, 17) $_MData = GUICtrlCreateLabel("Mouse Data: ", 8, 56, 165, 17) $_Flags = GUICtrlCreateLabel("Flags: ", 8, 80, 168, 17) $_Timestamp = GUICtrlCreateLabel("Timestamp: ", 8, 104, 162, 17) $_Extra = GUICtrlCreateLabel("Extra Info: ", 8, 128, 167, 17) GUISetState() WinSetOnTop($GUI, "", 1) ;make GUI stay on top of other windows ;Register callback $hKey_Proc = DllCallbackRegister("_Mouse_Proc", "int", "int;ptr;ptr") $hM_Module = DllCall("kernel32.dll", "hwnd", "GetModuleHandle", "ptr", 0) $hM_Hook = DllCall("user32.dll", "hwnd", "SetWindowsHookEx", "int", $WH_MOUSE_LL, "ptr", DllCallbackGetPtr($hKey_Proc), "hwnd", $hM_Module[0], "dword", 0) While 1 If $GUI_EVENT_CLOSE = GUIGetMsg() Then Exit ;idle until exit is pressed WEnd Func _Mouse_Proc($nCode, $wParam, $lParam) ;function called for mouse events.. ;define local vars Local $info, $ptx, $pty, $mouseData, $flags, $time, $dwExtraInfo Local $xevent = "Unknown", $xmouseData = "" If $nCode < 0 Then ;recommended, see http://msdn.microsoft.com/en-us/library/ms644986(VS.85).aspx $ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hM_Hook[0], _ "int", $nCode, "ptr", $wParam, "ptr", $lParam) ;recommended Return $ret[0] EndIf $info = DllStructCreate($MSLLHOOKSTRUCT, $lParam) ;used to get all data in the struct ($lParam is the ptr) $ptx = DllStructGetData($info, 1) ;see notes below.. $pty = DllStructGetData($info, 2) $mouseData = DllStructGetData($info, 3) $flags = DllStructGetData($info, 4) $time = DllStructGetData($info, 5) $dwExtraInfo = DllStructGetData($info, 6) ; $ptx = Mouse x position ; $pty = Mouse y position ; $mouseData = can specify click states, and wheel directions ; $flags = Specifies the event-injected flag ; $time = Specifies the time stamp for this message ; $dwExtraInfo = Specifies extra information associated with the message. ;Find which event happened Select Case $wParam = $WM_MOUSEMOVE $xevent = "Mouse Move" Case $wParam = $WM_MOUSEWHEEL $xevent = "Mouse Wheel" If _WinAPI_HiWord($mouseData) > 0 Then $xmouseData = "Wheel Forward" Else $xmouseData = "Wheel Backward" EndIf Case $wParam = $WM_LBUTTONDBLCLK $xevent = "Double Left Click" Case $wParam = $WM_LBUTTONDOWN $xevent = "Left Down" Case $wParam = $WM_LBUTTONUP $xevent = "Left Up" Case $wParam = $WM_RBUTTONDBLCLK $xevent = "Double Right Click" Case $wParam = $WM_RBUTTONDOWN $xevent = "Right Down" Case $wParam = $WM_RBUTTONUP $xevent = "Right Up" Case $wParam = $WM_MBUTTONDBLCLK $xevent = "Double Wheel Click" Case $wParam = $WM_MBUTTONDOWN $xevent = "Wheel Down" Case $wParam = $WM_MBUTTONUP $xevent = "Wheel Up" EndSelect ; Set GUI control data.. GUICtrlSetData($_Event, "Event: " & $xevent) GUICtrlSetData($_XYpos, "X=" & $ptx & " Y=" & $pty) If $xmouseData <> "" Then GUICtrlSetData($_MData, "Mouse Data: " & $xmouseData) Else GUICtrlSetData($_MData, "Mouse Data: " & $mouseData) EndIf GUICtrlSetData($_Flags, "Flags: " & $flags) GUICtrlSetData($_Timestamp, "Timestamp: " & $time) GUICtrlSetData($_Extra, "Extra Info: " & $dwExtraInfo) ;This is recommended instead of Return 0 $ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hM_Hook[0], _ "int", $nCode, "ptr", $wParam, "ptr", $lParam) Return $ret[0] EndFunc ;==>_Mouse_Proc Func OnAutoItExit() DllCall("user32.dll", "int", "UnhookWindowsHookEx", "hwnd", $hM_Hook[0]) $hM_Hook[0] = 0 DllCallbackFree($hKey_Proc) $hKey_Proc = 0 EndFunc ;==>OnAutoItExit Resource: http://msdn.microsoft.com/en-us/library/ms644986(VS.85).aspx Kurt1 point
-
1 point