Bluewolf Posted October 12, 2009 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.
water Posted October 12, 2009 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Bluewolf Posted October 12, 2009 Author 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
JohnOne Posted October 12, 2009 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.
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