Swift Posted February 7, 2008 Posted February 7, 2008 (edited) ClipPut("weaknesspays") HotKeySet("{HOME}", "_start") HotKeySet("{END}", "_end") While 1 WEnd Func _start() While 1 Send("^x") Sleep(150) Send("^v{ENTER}") WEnd EndFunc Func _end() Exit EndFunc Basically what I want to do..start a loop with HOME...but only END the loop with END...but...if the loop is running...and you press end...keep the script going...and if you press HOME again...it starts again...etc... and in the _END() function...doing ExitLoop doesnt work Edited February 7, 2008 by Swift
Uten Posted February 7, 2008 Posted February 7, 2008 Global $gloop=0 ClipPut("weaknesspays") HotKeySet("{HOME}", "_start") HotKeySet("{END}", "_end") While 1 WEnd Func _start() $gloop = 1 While $gloop Send("^x") Sleep(150) Send("^v{ENTER}") WEnd EndFunc Func _end() $gloop = 0 EndFunc Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
Valuater Posted February 7, 2008 Posted February 7, 2008 need a sleep in the while/wend loop or it will burn CPU 8)
Kademlia Posted February 7, 2008 Posted February 7, 2008 (edited) Haha SimCity4 Nice ;D Dont cheat thats lame (Btw: by editing the "config.bmp" in your SC savegamefolder in Documents and settings you can create yourself a region that only golds "BIG" regions - and make it even bigger than any normal map) Edited February 7, 2008 by Kademlia
Swift Posted February 7, 2008 Author Posted February 7, 2008 I have made an awesome city!! 80,000 people with 90million money! I let my bot run over-night
Kademlia Posted February 7, 2008 Posted February 7, 2008 Way offtopic but try this: Buld 1 Cell (6*6 - costs 1800$) houses and make 8 cells (6*6) around it. Insert ~80% industrial and 20% commercial. Bild those "9ers" and you will get a well working city (set taxes for lowincome houses/commercial/industry to 20%) Send me a screen of your city PM or something
NELyon Posted February 8, 2008 Posted February 8, 2008 I was bored. $Loop = 0 ClipPut("weaknesspays") HotKeySet("{HOME}", "_StartBot") HotKeySet("{END}", "_EndBot") While $Loop = 0 Sleep(200) Wend While 1 $txt = ClipGet() Send($txt & "{ENTER}") Sleep(150) WEnd Func _StartBot() $Loop = 1 EndFunc Func _EndBot() MsgBox(0, "Bye", "This bot will now exit") EndFunc
Swift Posted February 8, 2008 Author Posted February 8, 2008 Very nice senton bomb..BUTT... ...I cant have a messagebox() in the middle of a game but very nice
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