Cha0sBG Posted June 4, 2008 Share Posted June 4, 2008 (edited) here is the source code expandcollapse popup#include <GUIConstants.au3> #include <ButtonConstants.au3> #Include <Misc.au3> #Include <Constants.au3> $Main = GUICreate("Easy Write", 350, 200) GUISetState(true) $Input = GUICtrlCreateInput("", 5, 33, 300) $Input2 = GUICtrlCreateInput("Input Client Name", 5, 65, 300) $Input3 = GUICtrlCreateInput("Delay", 280, 140, 55) $But1 = GUICtrlCreateButton("Start", 110, 160, 80) $CH1 = GUICtrlCreateCheckbox("Check The Box If U Want To Continue Sending", 5, 140) While 1 $msg = GUIGetMsg() If $msg = $But1 Then Start() If $MSG = $GUI_EVENT_CLOSE Then Exit If $Msg = $CH1 Then Continue() WEnd Func Start() Local $read = GUICtrlRead($Input) Local $read2 = GUICtrlRead($Input2) WinActivate($read2) Send($read) Send("{Enter}") EndFunc Func Continue() While 1 If $msg = $But1 And $CH1 And BitAND(GUICtrlRead($CH1), $GUI_CHECKED) = $GUI_CHECKED Then Local $Delay, $read, $read2 $Delay = GUICtrlRead($Input3) $read = GUICtrlRead($Input) $read2 = GUICtrlRead($Input2) WinActivate($read2) Send($read) Send("{Enter}") Sleep($Delay) Else Local $read, $read2 $read = GUICtrlRead($Input) $read2 = GUICtrlRead($Input2) WinActivate($read2) Send($read) Send("{Enter}") EndIf WEnd EndFunc dunno i just wanna make it if the checkbox is checked to add the delay function aswell and if not checked just to write it 1 time can someone help ? lolz Edited June 4, 2008 by Cha0sBG Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
Kerros Posted June 4, 2008 Share Posted June 4, 2008 (edited) In your continue function you have 2 while 1 statements, but only one wend, and 2 IF statements, but only 1 endif. if I take out the Else and second While 1 and replace with an EndIf that seems to make sense, at least SciTE doesn't give me errors. Edited June 4, 2008 by Kerros Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance. Link to comment Share on other sites More sharing options...
Cha0sBG Posted June 4, 2008 Author Share Posted June 4, 2008 ye i saw that i modded it sec i post new code Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
Cha0sBG Posted June 4, 2008 Author Share Posted June 4, 2008 ok i only need 1 thing now when i check the checkbox it dousnt wait antill i press start and then to start spamming etc ... directrly starts why is that ? Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
Kerros Posted June 4, 2008 Share Posted June 4, 2008 thats because of your if statements in the beginning, it says that if $msg = $ch1 then run function Continue(). I would suggest putting those two functions together, something like this: expandcollapse popup#include <GUIConstants.au3> #include <ButtonConstants.au3> #Include <Misc.au3> #Include <Constants.au3> $Main = GUICreate("Easy Write", 350, 200) GUISetState(true) $Input = GUICtrlCreateInput("", 5, 33, 300) $Input2 = GUICtrlCreateInput("Input Client Name", 5, 65, 300) $Input3 = GUICtrlCreateInput("Delay", 280, 140, 55) $But1 = GUICtrlCreateButton("Start", 110, 160, 80) $CH1 = GUICtrlCreateCheckbox("Check The Box If U Want To Continue Sending", 5, 140) Local $Delay, $read, $read2 While 1 $msg = GUIGetMsg() Select case $msg = $But1 Continue() Case $MSG = $GUI_EVENT_CLOSE Exit Case Else Sleep(100) EndSelect WEnd Func Continue() $read = GUICtrlRead($Input) $read2 = GUICtrlRead($Input2) While 1 If GUICtrlRead($CH1, $GUI_CHECKED) Then $Delay = GUICtrlRead($Input3) WinActivate($read2) Send($read) Send("{Enter}") Sleep($Delay) Else WinActivate($read2) Send($read) Send("{Enter}") EndIf WEnd EndFunc Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance. Link to comment Share on other sites More sharing options...
Cha0sBG Posted June 4, 2008 Author Share Posted June 4, 2008 you forgot local >.< nvm i will see Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. 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