Hyflex Posted May 2, 2007 Share Posted May 2, 2007 Ok im trying to do a script so.. If use: HotKeySet("s", "SMove") it does someting only once! And then if i press HotKeySet("w", "WMove") it does somthing else ONLY Once, and i want to be able to have 8 differnt ones... so I can use Up Arrow, Down Arrow, Left/Right arrow and w,s,a,d but i want the hotkey to be read from the ini file.... Link to comment Share on other sites More sharing options...
Shevilie Posted May 2, 2007 Share Posted May 2, 2007 If you use HotKeySet("s", "SMove") The if you hit s it will to the SMove once .. And the ini part.. look at IniRead and IniWrite in the helpfile Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
Valuater Posted May 2, 2007 Share Posted May 2, 2007 181 posts.... been here almost a year There is no hope! 8) Link to comment Share on other sites More sharing options...
Valuater Posted May 2, 2007 Share Posted May 2, 2007 (edited) Ok im trying to do a script so..If use: HotKeySet("s", "SMove") it does someting only once!And then if i press HotKeySet("w", "WMove") it does somthing else ONLY Once, and i want to be able to have 8 differnt ones... so I can use Up Arrow, Down Arrow, Left/Right arrow and w,s,a,d but i want the hotkey to be read from the ini file....Hard worker... dedicated... interactive too! Last Seen: 14 minutes ago ( May 2 2007, 10:23 AM ) Viewing Topic: How can i do this...Waiting for someone to just do it for you???8)EDIT(s)Last Seen: 29 minutes ago********Last Seen: 45 minutes ago** then logged-out... lol Edited May 2, 2007 by Valuater Link to comment Share on other sites More sharing options...
Hyflex Posted May 2, 2007 Author Share Posted May 2, 2007 (edited) Valuater, acutally my internet went down Im not a real big noob..., im just asking for help cos it doesnt work and i delted most of it except my ini reads... and a few other bits... What im trying to do is get the functions to work properally and the hotkeyset.... If i use $WMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Move Up", "W")oÝ÷ ØæÊÇ+p¢é]¶¡¢Ùɸ$)jëh×6 HotKeySet($WMove, "WMove") Edited May 2, 2007 by XxXGoD Link to comment Share on other sites More sharing options...
Valuater Posted May 2, 2007 Share Posted May 2, 2007 (edited) $WMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Move Up", "w") requires a capital "W" ... a "w" does not work expandcollapse popupGlobal $Paused Global $WMove_Used = False Global $WMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Move Up", "W") Global $BFLoad = IniRead(@ScriptDir & "\config.ini", "Settings", "Enable BF", "Yes") Global $MinDelay = IniRead(@ScriptDir & "\config.ini", "Delays", "Min Delay", "350") Global $MaxDelay = IniRead(@ScriptDir & "\config.ini", "Delays", "Max Delay", "550") HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet($WMove, "WMove") While 1 Sleep(10) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() MsgBox(0x0, "", "... Exiting", 1) Exit 0 EndFunc Func WMove() If $WMove_Used then Return If $BFLoad = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) MsgBox(4096,"","This is a message.", 3) $WMove_Used = True EndFunc 8) Edited May 2, 2007 by Valuater Link to comment Share on other sites More sharing options...
Hyflex Posted May 2, 2007 Author Share Posted May 2, 2007 (edited) Ahha, Valuater thanks for help. But what does the following do: $WMove_Used = True And Global $WMove_Used = False How would i use that for other squeuences.... Would this work: expandcollapse popupGlobal $Paused Global $WMove_Used = False Global $SMove_Used = False Global $AMove_Used = False Global $DMove_Used = False Global $WMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Move Up", "W") Global $SMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Move Down", "S") Global $AMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Move Left", "A") Global $DMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Move Right", "D") Global $BFLoad = IniRead(@ScriptDir & "\config.ini", "Settings", "Enable BF", "Yes") Global $MinDelay = IniRead(@ScriptDir & "\config.ini", "Delays", "Min Delay", "350") Global $MaxDelay = IniRead(@ScriptDir & "\config.ini", "Delays", "Max Delay", "550") HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet($WMove, "WMove") HotKeySet($SMove, "SMove") HotKeySet($AMove, "AMove") HotKeySet($DMove, "DMove") While 1 Sleep(10) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() MsgBox(0x0, "", "... Exiting", 1) Exit 0 EndFunc ;; Upwards Move Start Func WMove() If $WMove_Used then Return If $BFLoad = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) MsgBox(4096,"","This is a message.", 3) $WMove_Used = True EndFunc ;; Upwards Move End ;; Lefts Move Start Func AMove() If $AMove_Used then Return If $BFLoad = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) MsgBox(4096,"","This is a message.", 3) $AMove_Used = True EndFunc ;; Left Move End ;; Down Move Start Func SMove() If $SMove_Used then Return If $BFLoad = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) MsgBox(4096,"","This is a message.", 3) $SMove_Used = True EndFunc ;; Down Move End ;; Right Move Start Func DMove() If $DMove_Used then Return If $BFLoad = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) MsgBox(4096,"","This is a message.", 3) $DMove_Used = True EndFunc ;; Right Move End Damn, only just realised i posted this in wrong forum srry Edited May 2, 2007 by XxXGoD Link to comment Share on other sites More sharing options...
enaiman Posted May 2, 2007 Share Posted May 2, 2007 (edited) 181 posts.... been here almost a yearThere is no hope!8)We can't get so many posts because the "bad wolves" use to be online always (or almost ) and they're "hunting" new posts. Because of their great competence they gives the solution right away ... and what could we do then??... and by the way ... each day the "bad wolves" numbers increase. At least Valuater you should be grateful that we're not spammers .... oops ... I just did it ... my actual post IS a spam. ... :"> Edited May 2, 2007 by enaiman SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Valuater Posted May 2, 2007 Share Posted May 2, 2007 Ahha, Valuater thanks for help. But what does the following do: $WMove_Used = True And Global $WMove_Used = False How would i use that for other squeuences.... Would this work: expandcollapse popupGlobal $Paused Global $WMove_Used = False Global $SMove_Used = False Global $AMove_Used = False Global $DMove_Used = False Global $WMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Move Up", "W") Global $SMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Move Down", "S") Global $AMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Move Left", "A") Global $DMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Move Right", "D") Global $BFLoad = IniRead(@ScriptDir & "\config.ini", "Settings", "Enable BF", "Yes") Global $MinDelay = IniRead(@ScriptDir & "\config.ini", "Delays", "Min Delay", "350") Global $MaxDelay = IniRead(@ScriptDir & "\config.ini", "Delays", "Max Delay", "550") HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet($WMove, "WMove") HotKeySet($SMove, "SMove") HotKeySet($AMove, "AMove") HotKeySet($DMove, "DMove") While 1 Sleep(10) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() MsgBox(0x0, "", "... Exiting", 1) Exit 0 EndFunc ;; Upwards Move Start Func WMove() If $WMove_Used then Return If $BFLoad = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) MsgBox(4096,"","This is a message.", 3) $WMove_Used = True EndFunc ;; Upwards Move End ;; Lefts Move Start Func AMove() If $AMove_Used then Return If $BFLoad = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) MsgBox(4096,"","This is a message.", 3) $AMove_Used = True EndFunc ;; Left Move End ;; Down Move Start Func SMove() If $SMove_Used then Return If $BFLoad = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) MsgBox(4096,"","This is a message.", 3) $SMove_Used = True EndFunc ;; Down Move End ;; Right Move Start Func DMove() If $DMove_Used then Return If $BFLoad = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) MsgBox(4096,"","This is a message.", 3) $DMove_Used = True EndFunc ;; Right Move End Damn, only just realised i posted this in wrong forum srry looks like it should.... did you try it??? 8) Link to comment Share on other sites More sharing options...
Hyflex Posted May 3, 2007 Author Share Posted May 3, 2007 Well i tryed:expandcollapse popupGlobal $Paused Global $UpBFMove_Used = False Global $DownBFMove_Used = False Global $LeftBFMove_Used = False Global $RightBFMove_Used = False Global $UpBFMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Butterfly Move Up", "W") Global $DownBFMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Butterfly Move Down", "S") Global $LeftBFMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Butterfly Move Left", "A") Global $RightBFMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Butterfly Move Right", "D") Global $EnableBF = IniRead(@ScriptDir & "\config.ini", "Settings", "Enable Butterfly", "Yes") Global $MinDelay = IniRead(@ScriptDir & "\config.ini", "Delays", "Min Delay", "50") Global $MaxDelay = IniRead(@ScriptDir & "\config.ini", "Delays", "Max Delay", "100") HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet($UpBFMove, "UpBFMove") HotKeySet($DownBFMove, "DownBFMove") HotKeySet($LeftBFMove, "LeftBFMove") HotKeySet($RightBFMove, "RightBFMove") While 1 Sleep(10) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() MsgBox(0x0, "", "... Exiting", 1) Exit 0 EndFunc ;; Upwards Butterfly Move Start Func UpBFMove() If $UpBFMove_Used then Return If $EnableBF = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) Send("{SPACE}") Send($UpBFMove) Send($UpBFMove) MouseClick("left") Sleep(Random(200, 210, 1)) Send("{LSHIFT}") $UpBFMove_Used = True EndFunc ;; Upwards Butterfly Move End ;; Left Butterfly Move Start Func LeftBFMove() If $LeftBFMove_Used then Return If $EnableBF = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) Send("{SPACE}") Send($LeftBFMove) Send($LeftBFMove) MouseClick("left") Sleep(Random(200, 210, 1)) Send("{LSHIFT}") $LeftBFMove_Used = True EndFunc ;; Left Butterfly Move End ;; Down Butterfly Move Start Func DownBFMove() If $DownBFMove_Used then Return If $EnableBF = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) Send("{SPACE}") Send($DownBFMove) Send($DownBFMove) MouseClick("left") Sleep(Random(200, 210, 1)) Send("{LSHIFT}") $DownBFMove_Used = True EndFunc ;; Down Butterfly Move End ;; Right Butterfly Move Start Func RightBFMove() If $RightBFMove_Used then Return If $EnableBF = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) Send("{SPACE}") Send($RightBFMove) Send($RightBFMove) MouseClick("left") Sleep(Random(200, 210, 1)) Send("{LSHIFT}") $RightBFMove_Used = True EndFunc ;; Right Butterfly Move End But i get error on the thirty third line, saying unkown fuction.. Link to comment Share on other sites More sharing options...
Shevilie Posted May 3, 2007 Share Posted May 3, 2007 On my line 30 theres an WEnd... Tell us what excatly does the line 30 error say.. which file etc etc Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
Hyflex Posted May 3, 2007 Author Share Posted May 3, 2007 (edited) expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.2.0 Author: Ryan Dye Script Function: Will Butterfly #ce ---------------------------------------------------------------------------- Global $Paused Global $UpBFMove_Used = False Global $DownBFMove_Used = False Global $LeftBFMove_Used = False Global $RightBFMove_Used = False Global $UpBFMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Butterfly Move Up", "W") Global $DownBFMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Butterfly Move Down", "S") Global $LeftBFMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Butterfly Move Left", "A") Global $RightBFMove = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Butterfly Move Right", "D") Global $UpBFMoveSF = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Butterfly Move Up Start", "{UP}") Global $DownBFMoveSF = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Butterfly Move Down Start", "{DOWN}") Global $LeftBFMoveSF = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Butterfly Move Left Start", "{LEFT}") Global $RightBFMoveSF = IniRead(@ScriptDir & "\config.ini", "HotKeys", "Butterfly Move Right Start", "{RIGHT}") Global $EnableBF = IniRead(@ScriptDir & "\config.ini", "Settings", "Enable Butterfly", "Yes") Global $MinDelay = IniRead(@ScriptDir & "\config.ini", "Delays", "Min Delay", "10") Global $MaxDelay = IniRead(@ScriptDir & "\config.ini", "Delays", "Max Delay", "20") HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet($UpBFMoveSF, "UpBFMove") HotKeySet($DownBFMoveSF, "DownBFMove") HotKeySet($LeftBFMoveSF, "LeftBFMove") HotKeySet($RightBFMoveSF, "RightBFMove") While 1 Sleep(10) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() MsgBox(0x0, "", "... Exiting", 1) Exit 0 EndFunc ;; Upwards Butterfly Move Start Func UpBFMove() If $UpBFMove_Used then Return If $EnableBF = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) Send("{SPACE}") Send($UpBFMove) Send($UpBFMove) MouseClick("left") Sleep(Random(200, 210, 1)) Send("{LSHIFT}") $UpBFMove_Used = True EndIf EndFunc ;; Upwards Butterfly Move End ;; Left Butterfly Move Start Func LeftBFMove() If $LeftBFMove_Used then Return If $EnableBF = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) Send("{SPACE}") Send($LeftBFMove) Send($LeftBFMove) MouseClick("left") Sleep(Random(200, 210, 1)) Send("{LSHIFT}") $LeftBFMove_Used = True EndIf EndFunc ;; Left Butterfly Move End ;; Down Butterfly Move Start Func DownBFMove() If $DownBFMove_Used then Return If $EnableBF = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) Send("{SPACE}") Send($DownBFMove) Send($DownBFMove) MouseClick("left") Sleep(Random(200, 210, 1)) Send("{LSHIFT}") $DownBFMove_Used = True EndIf EndFunc ;; Down Butterfly Move End ;; Right Butterfly Move Start Func RightBFMove() If $RightBFMove_Used then Return If $EnableBF = "Yes" Then Sleep(Random($MinDelay, $MaxDelay, 1)) Send("{SPACE}") Send($RightBFMove) Send($RightBFMove) MouseClick("left") Sleep(Random(200, 210, 1)) Send("{LSHIFT}") $RightBFMove_Used = True EndIf EndFunc ;; Right Butterfly Move End Well i fixed it, but how can i make it so it can be reapeated over n over again... but only if i press The hotkey?? Edited May 3, 2007 by XxXGoD 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