Hyflex Posted April 8, 2007 Posted April 8, 2007 (edited) Whats the difference between Shift, and (leftshift or rightshift) Does Shift do both of them? If so... how can i make the following do Shift + Home If _IsPressed("10") Then 10 is shift, and 24 is home Also how can i change the script below, so it holds Send("{"&$STAND&" DOWN}") down as soon as i press home, and then does the clicking over and over again, and then when i press home again it releases it.... expandcollapse popup;;;; AutoHammer Script Start ;;;; ;;;; Minimized Mouse Clicking Script, Thanks AInsolance Start ;;;; ;=============================================================================== ; ; Function Name: _MouseClickPlus() ; Version added: 0.1 ; Description: Sends a click to window, not entirely accurate, but works ; minimized. ; Parameter(s): $Window = Title of the window to send click to ; $Button = "left" or "right" mouse button ; $X = X coordinate ; $Y = Y coordinate ; $Clicks = Number of clicks to send ; Remarks: You MUST be in "MouseCoordMode" 0 to use this without bugs. ; Author(s): Insolence <insolence_9@yahoo.com> ; ;=============================================================================== Opt("MouseClickDelay" , 1) Opt("MouseClickDownDelay" , 1) Func _MouseClickPlus($Window, $Button = "left", $X = "", $Y = "", $Clicks = 80) Local $MK_LBUTTON = 0x0001 Local $WM_LBUTTONDOWN = 0x0201 Local $WM_LBUTTONUP = 0x0202 Local $MK_RBUTTON = 0x0002 Local $WM_RBUTTONDOWN = 0x0204 Local $WM_RBUTTONUP = 0x0205 Local $WM_MOUSEMOVE = 0x0200 Local $i = 0 Select Case $Button = "left" $Button = $MK_LBUTTON $ButtonDown = $WM_LBUTTONDOWN $ButtonUp = $WM_LBUTTONUP Case $Button = "right" $Button = $MK_RBUTTON $ButtonDown = $WM_RBUTTONDOWN $ButtonUp = $WM_RBUTTONUP EndSelect If $X = "" OR $Y = "" Then $MouseCoord = MouseGetPos() $X = $MouseCoord[0] $Y = $MouseCoord[1] EndIf For $i = 1 to $Clicks DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $WM_MOUSEMOVE, _ "int", 0, _ "long", _MakeLong($X, $Y)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $ButtonDown, _ "int", $Button, _ "long", _MakeLong($X, $Y)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $ButtonUp, _ "int", $Button, _ "long", _MakeLong($X, $Y)) Next EndFunc Func _MakeLong($LoWord,$HiWord) Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF)) EndFunc ;;;; Minimized Mouse Clicking Script, Thanks Insolance End ;;;; ;;;; Global Pause Start ;;;; Global $Paused = False ;;;; Global Pause End ;;;; ;;;; Hotkey Settings Start ;;;; HotKeySet("{HOME}", "TogglePause") HotKeySet("{INSERT}", "ReleaseStand") ;;;; Hotkey Settings End ;;;; ;;;; Key Delay Options + Misc Start ;;;; Opt('MouseClickDelay', 0) ;;;; Key Delay Options End ;;;; ;;;; INI Read's Start ;;;; $D2Win = IniRead(@ScriptDir&"\config\Config.ini", "Settings", "D2_WinName","Diablo II") $STAND = IniRead(@ScriptDir&"\config\Config.ini", "Settings" , "Stand Still" , "j") ;;;; INI Read's End ;;;; ;;;; Script Global Sleep Start ;;;; While 1 Sleep(10) WEnd ;;;; Script Global Sleep End ;;;; ;;;; Release Stand Still Start ;;;; Func ReleaseStand() Sleep(100) Send("{"&$STAND&" UP}") EndFunc ;;;; Release Stand Still End ;;;; ;;;; Toggle Hammers On/Off Start ;;;; Func TogglePause() $Paused = NOT $Paused Send("{INSERT}") If $Paused Then While $Paused Send("{"&$STAND&" DOWN}") _MouseClickPlus( $D2Win, "left", 300, 300 ) Sleep(Random(45,55,1)) sleep(20) WEnd EndIf EndFunc ;;;; Toggle Hammers On/Off End ;;;; ;;;; AutoHammer Script End ;;;; How can i change: ProcessClose("AutoHammer.exe") so it reads the exe name from the ini file $Processes1 = IniRead(@ScriptDir&"\config\Config.ini", "Processes/Program Names" , "AutoHammerExeName" , "j") Same with sleep's how can i read the delays from the ini file.... would it be something like: Sleep(Random($PreCastMinDelay,$PreCastMaxDelay,1)) Edited April 8, 2007 by XxXGoD
Xand3r Posted April 8, 2007 Posted April 8, 2007 ;well the random u can use $rand=iniread(blah,blah,blah) $minmax=stringsplit($rand , ",") Sleep(Random($minmax[1],$minmax[2],1)) ;ooh yeah and if u are closing the program inside itself is processclose(@scriptname) else $Processes1 = IniRead(@ScriptDir&"\config\Config.ini", "Processes/Program Names" , "AutoHammerExeName" , "j") processclose($Processes1) Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro
BrettF Posted April 8, 2007 Posted April 8, 2007 Maybe?Shift = 10Left Shift = A0Right Shift = A1From this page: MSDN 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!
Hyflex Posted April 8, 2007 Author Posted April 8, 2007 Maybe?Shift = 10Left Shift = A0Right Shift = A1From this page: MSDNLol i know the codes, from the help file, i just need help useing them and working out if its the same... lol
BrettF Posted April 8, 2007 Posted April 8, 2007 Lol i know the codes, from the help file, i just need help useing them and working out if its the same... lol Maybe: #include <Misc.au3> While 1 If _IsPressed ("10") Then MsgBox (0, "", "Shift was pressed") If _IsPressed ("1B") Then Exit WEnd Press Lshift then after the msgbox, press Right Shift, and finaly ESC. You answer is there (i hope). 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!
Hyflex Posted April 12, 2007 Author Posted April 12, 2007 Ok thanks can anyone help with oter problems?
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