_Kurt Posted October 23, 2007 Share Posted October 23, 2007 (edited) Very nice, works great. I wish I could figure out how to properly use & call the DllCallBack function. Piccaso, perhaps if you have any free time to create a short tutorial with very simple examples for people who aren't familiar with this (aka for noobs like me ). Thanks, Kurt Edited October 23, 2007 by _Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Nahuel Posted October 24, 2007 Share Posted October 24, 2007 Awesome Larry Link to comment Share on other sites More sharing options...
Fossil Rock Posted October 24, 2007 Share Posted October 24, 2007 Very interesting indeed. You don't even need to open notepad, just type anywhere, even where there is no place for input. I'm glad your back Larry. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
JRSmile Posted October 24, 2007 Share Posted October 24, 2007 Thanks larry for this wonderful example, unfortunately i could have used it some time ago, but amybe i rewrite my radio player for wow. $a=StringSplit("547275737420796F757220546563686E6F6C75737421","") For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4) Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI" Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile; MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-) Link to comment Share on other sites More sharing options...
ptrex Posted October 24, 2007 Share Posted October 24, 2007 @All Must be great but I don' see anything happening. I open Notepad, type something and wait ........ regards ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
jvanegmond Posted October 24, 2007 Share Posted October 24, 2007 @All Must be great but I don' see anything happening. I open Notepad, type something and wait ........ regards ptrexDoes this work for you? expandcollapse popup#include <DllCallBack.au3> Global Const $WH_KEYBOARD_LL = 13 Global $hHook, $pStub_KeyProc Global $pStub_KeyProc = _DllCallBack ("_KeyProc","int;ptr;ptr") Global $hmod = DllCall("kernel32.dll","hwnd","GetModuleHandle","ptr",0) Global $hHook = DllCall("user32.dll","hwnd","SetWindowsHookEx","int", _ $WH_KEYBOARD_LL,"ptr",$pStub_KeyProc,"hwnd",$hmod[0],"dword",0) Global $buffer = "" MsgBox(4096,"","Type anything anywhere and it will appear in the top left corner of the screen.") While 1 Sleep(10) WEnd Func EvaluateKey($keycode) If (($keycode > 22) And ($keycode < 91)) _ Or (($keycode > 47) And ($keycode < 58)) Then $buffer &= Chr($keycode) ToolTip($buffer,0,0) ElseIf ($keycode > 159) And ($keycode < 164) Then Return EndIf EndFunc Func _KeyProc($nCode, $wParam, $lParam) Local $ret,$KEYHOOKSTRUCT If $nCode < 0 Then $ret = DllCall("user32.dll","long","CallNextHookEx","hwnd",$hHook[0], _ "int",$nCode,"ptr",$wParam,"ptr",$lParam) Return $ret[0] EndIf If $wparam = 256 Then $KEYHOOKSTRUCT = DllStructCreate("dword;dword;dword;dword;ptr",$lParam) EvaluateKey(DllStructGetData($KEYHOOKSTRUCT,1)) EndIf $ret = DllCall("user32.dll","long","CallNextHookEx","hwnd",$hHook[0], _ "int",$nCode,"ptr",$wParam,"ptr",$lParam) Return $ret[0] EndFunc Func OnAutoItExit() DllCall("user32.dll","int","UnhookWindowsHookEx","hwnd",$hHook[0]) EndFunc github.com/jvanegmond Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted October 24, 2007 Share Posted October 24, 2007 essentially if you type certain things tooltips are displayed. This would be really sweet since you could make a script that if you type like internet, or firefox or something that it runs firefox. It is like hotkeys but hotwords. Link to comment Share on other sites More sharing options...
ptrex Posted October 24, 2007 Share Posted October 24, 2007 @Manadar Perfect works like a charm !! thanks ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
jvanegmond Posted October 24, 2007 Share Posted October 24, 2007 @ManadarPerfect works like a charm !!thanksptrexNo problem. I was mainly curious whether the mechanism worked on your computer or not. I am glad it did. github.com/jvanegmond Link to comment Share on other sites More sharing options...
JRSmile Posted October 24, 2007 Share Posted October 24, 2007 (edited) have created a little example application for it, needs some cleanup and more easy code, a lot of error handling, but works it listens to your keyboard for free definable texts and runs a function for example a sreaming radio client. wonderful for "World of Warcraft" due to the fact that you can control this "addon" like a normal one through the chat window the commands are:/radio on/radio off/radio play/radio pause/radio stop/radio vol 0-100/radio exitthe stream as been compiled in but can easily be changed in the source code.you just need the ampx_install.exe which comes from Nullsoft as activex replacement of Winamp download here: http://pdl.stream.aol.com/downloads/aol/unagi/ampx_en_dl.cabextract the ampx.exe out of it and name it ampx_install.exe to be able to recompile the recompile the script.its needs this file cause it has a build in install routine on foreign machines which do not support this activex feel free to enhance the code.but for me watching the eyes of my collegues thinking my notepad plays radio streams was an amazeing feeling expandcollapse popup#include <DllCallBack.au3> #include <string.au3> Global $url = "http://scfire-nyk-aa04.stream.aol.com:80/stream/1018" Global $track[1] $track[0] = "Kein Titel verfügbar." #region shortcuts Global Const $RADIO_ON = "7RADIO ON" Global Const $RADIO_OFF = "7RADIO OFF" Global Const $RADIO_PLAY = "7RADIO PLAY" Global Const $RADIO_PLAY_CLIP = "7RADIO PLAY CLIP" Global Const $RADIO_PAUSE = "7RADIO PAUSE" Global Const $RADIO_VOLUME = "7RADIO VOL" Global Const $RADIO_EXIT = "7RADIO EXIT" #endregion shortcuts #region constants Global Const $WINAMPX_EVENT_FILE_END = 1 Global Const $WINAMPX_EVENT_TRACK_CHANGED = 2 Global Const $WINAMPX_EVENT_LAUNCH_URL = 3 Global Const $WINAMPX_EVENT_TRACK_INFO_CHANGED = 4 Global Const $WINAMPX_EVENT_VIDEO_WND_REQUESTED = 5 Global Const $WINAMPX_EVENT_VIDEO_WND_SIZE_CHANGED = 6 Global Const $WINAMPX_EVENT_VIDEO_WND_DONE = 7 Global Const $WINAMPX_EVENT_HWND_READY = 8 Global Const $WINAMPX_EVENT_NO_SOUNDCARD_AVL = 100 Global Const $WINAMPX_EVENT_NO_PLUGINS_AVL = 101 Global Const $WINAMPX_EVENT_CANT_PLAY_FILE = 102 Global Const $WINAMPX_EVENT_WMA_FILE_EXPIRED = 103 Global Const $WINAMPX_EVENT_FILE_NOT_FOUND = 104 Global Const $WINAMPX_EVENT_PLAYLIST_NO_FILES_PRESENT = 105 Global Const $WINAMPX_EVENT_PLAYLIST_EMPTY = 106 Global Const $WINAMPX_EVENT_REAL_ENGINE_MISSING = 107 Global Const $WINAMPX_EVENT_CORRUPT_FILE = 108 Global Const $WINAMPX_EVENT_UNSUPPORTED_FORMAT = 109 Global Const $WINAMPX_EVENT_QUICKTIME_ENGINE_MISSING = 110 Global Const $WINAMPX_EVENT_REAL_ENGINE_ERROR = 111 Global Const $WINAMPX_EVENT_FILE_SYSTEM_CHANGE = 112 Global Const $WINAMPX_STATUS_INIT_WININET = 200 Global Const $WINAMPX_STATUS_OPENING_URL = 201 Global Const $WINAMPX_STATUS_HTTP_ERROR = 202 Global Const $WINAMPX_STATUS_DOWNLOADING_URL = 203 Global Const $WINAMPX_STATUS_URL_DOWNLOADED = 204 Global Const $WINAMPX_STATUS_CANNOT_CREATE_TEMP_FILE = 205 Global Const $WINAMPX_STATUS_CANNOT_OPEN_URL = 206 Global Const $WINAMPX_STATUS_CONNECTION_LOST = 207 Global Const $WINAMPX_STATUS_PREBUFFERING = 208 Global Const $WINAMPX_STATUS_RESYNC = 209 Global Const $WINAMPX_STATUS_BROADCAST_INTERRUPT = 210 Global Const $WINAMPX_STATUS_BROADCAST_TERMINATE = 211 Global Const $WINAMPX_STATUS_DOLBY_ERROR = 212 Global Const $WINAMPX_STATUS_TRANSFER_RATE = 213 Global Const $WINAMPX_STATUS_STREAM_BEGIN = 214 Global Const $WINAMPX_STATUS_LENGTH_CHANGE = 215 Global Const $WINAMPX_STATUS_VIDEO_KEYPRESS = 216 Global Const $WINAMPX_STATUS_VIDEO_SYSKEYPRESS = 217 Global Const $WINAMPX_STATUS_SERVER_RESTART = 218 Global Const $WINAMPX_STATUS_SERVER_CRASH = 219 Global Const $WINAMPX_STATUS_ERROR_KILLING_THREAD = 220 Global Const $WINAMPX_STATUS_ADVANCED_PARSE_ERROR = 221 Global Const $WINAMPX_STATUS_SERVER_SWAPPED = 222 Global Const $STATUS_STOPED = 0 Global Const $STATUS_PLAYING = 1 Global Const $STATUS_PAUSED = 2 Global Const $STATUS_BUFFERING = 3 Global Const $WH_KEYBOARD_LL = 13 Global $hHook, $pStub_KeyProc Global $pStub_KeyProc = _DllCallBack ("_KeyProc", "int;ptr;ptr") Global $hmod = DllCall("kernel32.dll", "hwnd", "GetModuleHandle", "ptr", 0) Global $hHook = DllCall("user32.dll", "hwnd", "SetWindowsHookEx", "int", $WH_KEYBOARD_LL, "ptr", $pStub_KeyProc, "hwnd", $hmod[0], "dword", 0) Global $buffer = "", $record = 0 #endregion #region install ampx and create object $oAMPX = ObjCreate("WinAmpX.IWinAmpActiveX.2") If Not IsObj($oAMPX) Then Beep(6000, 1000) FileInstall("ampx_install.exe", "ampx_install.exe", 1) RunWait("ampx_install.exe", @ScriptDir) If @Compiled Then FileDelete("ampx_install.exe") $timeout = 10 While Not IsObj($oAMPX) $oAMPX = ObjCreate("WinAmpX.IWinAmpActiveX.2") Sleep(1000) $timeout -= 1 If Not $timeout Then no_object() WEnd EndIf $EventObject = ObjEvent($oAMPX, "AMPXEvent_") If @error Then MsgBox(0, "Taddy Radio", "Titelinformationen konnten nicht ausgelesen werden, " & @CRLF & "Da das Winamp Event Modul nicht registriert werden konnte.") Func no_object() MsgBox(0, "Taddy Radio", "Anwendung konnte nicht gestartet werden da AmpX nicht installiert werden konnte.") Exit EndFunc ;==>no_object #endregion #region main LOOP While 1 Sleep(10) WEnd #endregion main LOOP #region key hooks Func EvaluateKey($keycode) If (($keycode = 13) And ($record = 0)) Then Beep(5000, 10) $record = 1 $buffer = "" ElseIf (($keycode = 13) And ($record = 1)) Then Beep(3000, 10) $record = 0 ;~ ToolTip($buffer, 0, 0) ; debugging Switch $buffer Case $RADIO_ON For $s = 1000 To 5000 Step 1000 Beep($s, 1) Next radio_on() Case $RADIO_OFF For $s = 5000 To 1000 Step - 1000 Beep($s, 1) Next radio_off() Case $RADIO_PLAY For $s = 1000 To 5000 Step 1000 Beep($s, 1) Next radio_play() Case $RADIO_PAUSE For $s = 5000 To 1000 Step - 1000 Beep($s, 1) Next radio_pause() Case $RADIO_PLAY_CLIP For $s = 1000 To 5000 Step 1000 Beep($s, 1) Next radio_play_clip() Case $RADIO_EXIT For $s = 100 To 10 Step - 1 Beep($s, 1) Next radio_exit() EndSwitch If ((StringLeft($buffer, (StringLen($RADIO_VOLUME) + 1)) = $RADIO_VOLUME & " ") And (StringLen($buffer) > (StringLen($RADIO_VOLUME) + 1)) And (StringLen($buffer) < (StringLen($RADIO_VOLUME) + 5))) Then If Not StringRegExp(StringRight($buffer, StringLen($buffer) - (StringLen($RADIO_VOLUME) + 1)), "[^0-9]") Then If (StringRight($buffer, StringLen($buffer) - (StringLen($RADIO_VOLUME) + 1)) >= 0) And (StringRight($buffer, StringLen($buffer) - (StringLen($RADIO_VOLUME) + 1)) <= 100) Then radio_vol(StringRight($buffer, StringLen($buffer) - (StringLen($RADIO_VOLUME) + 1))) EndIf EndIf EndIf EndIf If ((($keycode > 64) And ($keycode < 91)) Or (($keycode > 46) And ($keycode < 58)) Or ($keycode = 32) And $record) Then $buffer &= Chr($keycode) ElseIf ($keycode > 159) And ($keycode < 164) Then Return ElseIf ($keycode = 8) Then $buffer = StringTrimRight($buffer, 1) EndIf EndFunc ;==>EvaluateKey Func _KeyProc($nCode, $wParam, $lParam) Local $ret, $KEYHOOKSTRUCT If $nCode < 0 Then $ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hHook[0], "int", $nCode, "ptr", $wParam, "ptr", $lParam) Return $ret[0] EndIf If $wParam = 256 Then $KEYHOOKSTRUCT = DllStructCreate("dword;dword;dword;dword;ptr", $lParam) EvaluateKey(DllStructGetData($KEYHOOKSTRUCT, 1)) EndIf $ret = DllCall("user32.dll", "long", "CallNextHookEx", "hwnd", $hHook[0], _ "int", $nCode, "ptr", $wParam, "ptr", $lParam) Return $ret[0] EndFunc ;==>_KeyProc Func OnAutoItExit() DllCall("user32.dll", "int", "UnhookWindowsHookEx", "hwnd", $hHook[0]) EndFunc ;==>OnAutoItExit #endregion key hooks #region radio functions Func radio_on() $oAMPX.AppendFileToPlaylist ($url); $oAMPX.Repeat = 1 radio_vol(30) radio_play() EndFunc ;==>radio_on Func radio_off() $oAMPX.Stop () EndFunc ;==>radio_off Func radio_pause() $oAMPX.pause () EndFunc ;==>radio_pause Func radio_play() $oAMPX.Play () EndFunc ;==>radio_play Func radio_vol($volume) $oAMPX.Volume = 2.55 * $volume EndFunc ;==>radio_vol Func radio_exit() radio_off() $oAMPX = 0 Exit EndFunc ;==>radio_exit #endregion radio functions #region radio events Func AMPXEvent_WinampMetaData($s, $n) $track = _StringBetween($s, "StreamTitle='", "';") If @error Then $track[0] = "Kein Titel verfügbar." EndIf TraySetToolTip($track[0]) ConsoleWrite("Title: " & $track[0] & @CRLF) EndFunc ;==>AMPXEvent_WinampMetaData #endregion radio events #region clip get stream url Func radio_play_clip() $clip = ClipGet() If (StringInStr($clip, "http://") And (Not StringInStr($clip, @CRLF))) Then $url = $clip radio_off() radio_on() EndIf EndFunc ;==>radio_play_clipBest regards,JR Edited October 24, 2007 by JRSmile $a=StringSplit("547275737420796F757220546563686E6F6C75737421","") For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4) Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI" Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile; MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-) Link to comment Share on other sites More sharing options...
JRSmile Posted October 24, 2007 Share Posted October 24, 2007 can not modify above post without crashing autoit code..... will add features like: play stream url from clipboard announce title information $a=StringSplit("547275737420796F757220546563686E6F6C75737421","") For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4) Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI" Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile; MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-) Link to comment Share on other sites More sharing options...
Zedna Posted October 24, 2007 Share Posted October 24, 2007 (edited) can not modify above post without crashing autoit code.....will add features like:play stream url from clipboardannounce title information This is known BUG in AutoIt code tag editor (on this forum).When I need edit my post containing autoit code tags I use FireFox and Full edit (no quick edit) then it's OK.In Opera/IE AutoIt code is mangled. BTW: nice code exampleEDIT: spell correction Edited October 24, 2007 by Zedna Resources UDF  ResourcesEx UDF  AutoIt Forum Search Link to comment Share on other sites More sharing options...
jaenster Posted October 24, 2007 Share Posted October 24, 2007 wtf this isn't larry? -jaenster Link to comment Share on other sites More sharing options...
GaryFrost Posted October 24, 2007 Share Posted October 24, 2007 wtf this isn't larry?Yes it is 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...
Thatsgreat2345 Posted October 24, 2007 Share Posted October 24, 2007 Ummmmmm just curious and I'm stupid for posting this but couldn't some little noob come a long and turn this into a keylogger :-/ Link to comment Share on other sites More sharing options...
GaryFrost Posted October 24, 2007 Share Posted October 24, 2007 Ummmmmm just curious and I'm stupid for posting this but couldn't some little noob come a long and turn this into a keylogger :-/Did you not read all the crap posted in this topic yesterday? Suggest you read it, and leave it alone. 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...
LarryDalooza Posted October 24, 2007 Author Share Posted October 24, 2007 (edited) Mouse Gesture... this is for me to link to ... try not to gum up this thread too much.expandcollapse popup#include <DllCallBack.au3> SplashTextOn("","Getsures are:" & @LF & _ "Left - Up - Right" & @LF & _ "Right - Down - Left" & @LF & _ "The letter Z" & @LF & _ "Up - Down ... to exit",200,200,-1,-1,1) ;Global Const $WH_KEYBOARD_LL = 13 Global Const $WH_MOUSE_LL = 14 Global $timer = TimerInit() Global $hHook Global $pStub_MouseProc = _DllCallBack ("_MouseProc","int;ptr;ptr") Global $hmod = DllCall("kernel32.dll","hwnd","GetModuleHandle","ptr",0) Global $hHook = DllCall("user32.dll","hwnd","SetWindowsHookEx","int", _ $WH_MOUSE_LL,"ptr",$pStub_MouseProc,"hwnd",$hmod[0],"dword",0) Global $last = "0",$last1 = 0,$last2 = 0, $last3 = 0 Global $gesture = "" Global $xy = MouseGetPos() While 1 Sleep(3) WEnd Func Gesture() ;ToolTip($gesture) ; DEBUG Switch $gesture Case "425" ; Left, Up, Right - Hard edge C ToolTip("Left, Up, Right") $gesture = "" $timer = TimerInit() Case "574" ; Right, Down, Left ToolTip("Right, Down, Left") $gesture = "" $timer = TimerInit() Case "27" ; Up, Down - Hard edge C ToolTip("Up, Down ... Exits") $gesture = "" $timer = TimerInit() Exit Case "565" ; Z ToolTip("The Letter ""Z""") $gesture = "" $timer = TimerInit() EndSwitch EndFunc Func EvaluatePoint($x,$y) Local $direction If TimerDiff($timer) > 1500 Then $timer = TimerInit() $gesture = "" $last1 = 0 $last2 = 0 $last3 = 0 $last = "0" EndIf If $x < ($xy[0] - 30) Then If $y < ($xy[1] - 15) Then $direction = 1 ElseIf $y > ($xy[1] + 16) Then $direction = 6 Else $direction = 4 EndIf ElseIf $x > ($xy[0] + 30) Then If $y < ($xy[1] - 16) Then $direction = 3 ElseIf $y > ($xy[1] + 16) Then $direction = 8 Else $direction = 5 EndIf ElseIf $y < ($xy[1] - 30) Then If $x < ($xy[0] - 16) Then $direction = 1 ElseIf $x > ($xy[0] + 16) Then $direction = 3 Else $direction = 2 EndIf ElseIf $y > ($xy[1] + 30) Then If $x < ($xy[0] - 16) Then $direction = 6 ElseIf $x > ($xy[0] + 16) Then $direction = 8 Else $direction = 7 EndIf Else Return EndIf If $last1 = 0 Then $last1 = $direction Return ElseIf $last2 = 0 Then $last2 = $direction Return Else $last3 = $last1 & $last2 & $direction ;ToolTip($last3) ; DEBUG $direction = EvaluateDirection() $last1 = 0 $last2 = 0 $last3 = 0 EndIf If Not ($direction == $last) Then $last = $direction $gesture &= $direction If StringLen($gesture) = 2 Then $timer = TimerInit() Gesture() EndIf $xy[0] = $x $xy[1] = $y EndFunc Func EvaluateDirection() Local $n = 1 While StringLen($last3) And $n < 10 $last3 = StringReplace($last3,String($n),"") If @extended > 1 Then Return $n $n += 1 WEnd EndFunc Func _MouseProc($nCode, $wParam, $lParam) Local $ret,$MOUSEHOOKSTRUCT If $nCode < 0 Then $ret = DllCall("user32.dll","long","CallNextHookEx","hwnd",$hHook[0], _ "int",$nCode,"ptr",$wParam,"ptr",$lParam) Return $ret[0] EndIf If $wparam = 512 Then $MOUSEHOOKSTRUCT = DllStructCreate("int;int;dword;dword;dword;ptr",$lParam) EvaluatePoint(DllStructGetData($MOUSEHOOKSTRUCT,1), _ DllStructGetData($MOUSEHOOKSTRUCT,2)) EndIf $ret = DllCall("user32.dll","long","CallNextHookEx","hwnd",$hHook[0], _ "int",$nCode,"ptr",$wParam,"ptr",$lParam) Return $ret[0] EndFunc Func OnAutoItExit() DllCall("user32.dll","int","UnhookWindowsHookEx","hwnd",$hHook[0]) _DllCallBack_Free ($pStub_MouseProc) Sleep(2000) EndFuncLar Edited October 24, 2007 by LarryDalooza AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Gif Posted October 27, 2007 Share Posted October 27, 2007 (edited) ok sorry, just dont want autoit to get a bad name like C++ and all that other crapLol Ashley, AutoIt is programmed in C++ (and other crap like this) Edited October 27, 2007 by Gif Link to comment Share on other sites More sharing options...
Angelus Posted November 10, 2007 Share Posted November 10, 2007 Sorry, but what version of autoit you are using???? Link to comment Share on other sites More sharing options...
BrettF Posted November 10, 2007 Share Posted November 10, 2007 3.2.8.1. How about you? Welcome to the forums. What seems to be the problem? Cheers B 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...
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