Azaw Posted June 4, 2009 Share Posted June 4, 2009 i wanted to make a script that clicks in a few places and write some links, my problem is after it have wrote the link it dosent sleep or press enter, just keep repeating itself... :S cant see why it would here is the code expandcollapse popupglobal $paused HotKeySet("{F3}", "togglepause") HotKeySet("{ESC}", "terminate") HotKeySet("1", "one") HotKeySet("2", "tva") HotKeySet("3", "tre") HotKeySet("4", "fyra") HotKeySet("5", "fem") HotKeySet("6", "sex") HotKeySet("7", "sju") Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip('Script is "Running"',0,0) EndFunc Func Terminate() Exit 0 EndFunc While 1 Sleep(2500) WEnd Func one() MouseClick("left", 311, 379) Sleep(500) send("{ENTER}") Endfunc While 2 Sleep(2500) WEnd Func tva() MouseClick("left", 305, 404) Sleep(500) send("{ENTER}") Endfunc While 3 Sleep(2500) WEnd Func tre() MouseClick("left", 309, 432) Sleep(500) send("{ENTER}") Endfunc While 4() Sleep(2500) WEnd Func fyra() MouseClick("left", 946, 67) Sleep(500) Send("länk4") sleep(1000) Send("{ENTER}") Endfunc While 5() Sleep(2500) WEnd Func fem() MouseClick("left", 946, 67) Sleep(500) Send("länk5") Send("{ENTER}") Endfunc While 5() Sleep(2500) WEnd Func sex() MouseClick("left", 946, 67) Sleep(500) Send("länk6") Sleep(1000) Send("{ENTER}") Endfunc While 7() Sleep(2500) WEnd Func sju() MouseClick("left", 946, 67) Sleep(500) Send("länk7") Sleep(1000) Send("{ENTER}") Endfunc Link to comment Share on other sites More sharing options...
stampy Posted June 4, 2009 Share Posted June 4, 2009 When the script runs, the continual while loop is there to hold it open and continue running. The lines of the script are run from top to bottom excluding functions. Most people put the functions at the bottom to make it easier to see the global part of the script. You had multiple while loops, written interestingly, that were not needed. expandcollapse popupglobal $paused HotKeySet("{F3}", "togglepause") HotKeySet("{ESC}", "terminate") HotKeySet("1", "one") HotKeySet("2", "tva") HotKeySet("3", "tre") HotKeySet("4", "fyra") HotKeySet("5", "fem") HotKeySet("6", "sex") HotKeySet("7", "sju") While 1 Sleep(2500) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip('Script is "Running"',0,0) EndFunc Func Terminate() Exit 0 EndFunc Func one() MouseClick("left", 311, 379) Sleep(500) send("{ENTER}") Endfunc Func tva() MouseClick("left", 305, 404) Sleep(500) send("{ENTER}") Endfunc Func tre() MouseClick("left", 309, 432) Sleep(500) send("{ENTER}") Endfunc Func fyra() MouseClick("left", 946, 67) Sleep(500) Send("länk4") sleep(1000) Send("{ENTER}") Endfunc Func fem() MouseClick("left", 946, 67) Sleep(500) Send("länk5") Send("{ENTER}") Endfunc Func sex() MouseClick("left", 946, 67) Sleep(500) Send("länk6") Sleep(1000) Send("{ENTER}") Endfunc Func sju() MouseClick("left", 946, 67) Sleep(500) Send("länk7") Sleep(1000) Send("{ENTER}") Endfunc Link to comment Share on other sites More sharing options...
Azaw Posted June 4, 2009 Author Share Posted June 4, 2009 so what do i need to do to make the script to what i want when i press the right key? Link to comment Share on other sites More sharing options...
6105 Posted June 4, 2009 Share Posted June 4, 2009 (edited) so what do i need to do to make the script to what i want when i press the right key?ur keys is 1,2,3,4,5,6,7and if in sends text u have 1 or 2 or ... or 7 that spamuse key Alt+1 or Ctr+1 or F1 that do not be span or do how says u stampy disable key inf script write and enable after write Edited June 4, 2009 by toader [center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center] Link to comment Share on other sites More sharing options...
Azaw Posted June 4, 2009 Author Share Posted June 4, 2009 ur keys is 1,2,3,4,5,6,7and if in sends text u have 1 or 2 or ... or 7 that spamuse key Alt+1 or Ctr+1 or F1 that do not be span or do how says u stampy disable key inf script write and enable after write oh, thx i see the problem now ^^ 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