Bluewolf Posted October 12, 2009 Share Posted October 12, 2009 Im new to AutoIt, Ive never in my years woulda guest this place existed, hahah But I come from a few Diffrent Programing Languages, LSL(Secondlife Scripting) and MIRC(MIRC Scripting <-- Lame I know.) Also I do alittle Coding in TCL Currently im working on a Script for the Game Holy Beast Online. Now Ive seen Snow's Code and Im working on Something Alittle Diffrent. HotKeySet("{home}", "Start") HotKeySet("{end}", "Pause") Func Pause() $game = "0" Play($game) EndFunc Func Start() $game = "1" Play($game) EndFunc Func Play(ByRef $a) if $game = "1" Then For $i = 1 to 100 Send("{TAB}") Sleep(250) Send("1") Sleep(500) Send("3") Sleep(500) Send("2") Sleep(3000) Send("4") Next EndIf EndFunc Again ive never scripted in AutoIT Scripting so I litteraly have no Clue, I did this in like 10 Minutes of Looking at the Help file but Im kinda Stuck, Im working Towards trien to Detect in the IF Statement If ($game != TRUE) { Return } or if ($game != 1) { Return } But i have yet to find out how to do that, anyone wanna give a Helping hand? And explain to me alittle. Please hahaha Thanks. Link to comment Share on other sites More sharing options...
water Posted October 12, 2009 Share Posted October 12, 2009 (edited) I simply would use ELSE in your code. You set the values of $game so there is only "0" and "1" possible. Func Play(ByRef $a) if $game = "1" Then For $i = 1 to 100 Send("{TAB}") Sleep(250) Send("1") Sleep(500) Send("3") Sleep(500) Send("2") Sleep(3000) Send("4") Next Else ... do something else ... EndIf EndFunc Edited October 12, 2009 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Bluewolf Posted October 12, 2009 Author Share Posted October 12, 2009 (edited) Thanks, Now I just gotta find my Error in the Code HAHAHAHAH To make this thing work. Edited October 12, 2009 by Bluewolf Link to comment Share on other sites More sharing options...
JohnOne Posted October 12, 2009 Share Posted October 12, 2009 Thanks, Now I just gotta find my Error in the Code HAHAHAHAHTo make this thing work.If you use the scite editor, it should highlight any errors. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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