bb05 Posted April 11, 2007 Share Posted April 11, 2007 (edited) ok i know this is really not the greatest app in the world.. but hey I get lazy when i play san andreas and typing in cheats for it. here's my code so far of what i've got: HotkeySet("{END}","_end") HotkeySet("{HOME}","cheat") While 1 WinActivate("GTA: San Andreas") Sleep(100) WEnd Func _end() Exit 0 EndFunc Func cheat() Send("uzumymw") Sleep(200) Send("hesoyam") Sleep(200) EndFunc Exit it runs and cheats work, im just curious if anyone would have done it differently. i did a little searching through the help file but found this the easiest way for me to get it working comments appreciated. bb05 edit: I am curious, would there be a way to autoactivate a window from a variable: eg: a screen that has GTA in the title, instead of having to type out the whole wintitle for WinActivate. 2nd edit: is there an easy way to find out what the keys are on the keyboard: i know {HOME} represents the home key but how would i find out what every key's value is for in autoit? (dont need to know letters or numbers, got that part figured out ) Looking to figure out like the F-Keys, tabs, caps lock, etc. thanks again Edited April 11, 2007 by bb05 Link to comment Share on other sites More sharing options...
BrettF Posted April 11, 2007 Share Posted April 11, 2007 ok i know this is really not the greatest app in the world.. but hey I get lazy when i play san andreas and typing in cheats for it. here's my code so far of what i've got: HotkeySet("{END}","_end") HotkeySet("{HOME}","cheat") While 1 WinActivate("GTA: San Andreas") Sleep(100) WEnd Func _end() Exit 0 EndFunc Func cheat() Send("uzumymw") Sleep(200) Send("hesoyam") Sleep(200) EndFunc Exit it runs and cheats work, im just curious if anyone would have done it differently. i did a little searching through the help file but found this the easiest way for me to get it working comments appreciated. bb05 edit: I am curious, would there be a way to autoactivate a window from a variable: eg: a screen that has GTA in the title, instead of having to type out the whole wintitle for WinActivate. thanks again Looks great What do you mean by autoactivate a window from a variable? Im not sure thats all Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
bb05 Posted April 11, 2007 Author Share Posted April 11, 2007 instead of typing out the entire window title (eg: GTA: San Andreas) is there a way to just have it search for part of text in a title (eg: GTA:) or something similar to that? Link to comment Share on other sites More sharing options...
rambo3889 Posted April 11, 2007 Share Posted April 11, 2007 Use opt("WinTitleMatchMode",2) My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! Link to comment Share on other sites More sharing options...
jokke Posted April 11, 2007 Share Posted April 11, 2007 Lets say your gta window is named GTA: San Andreas v.1.14 With code under $wintitle will now be "GTA: San Andreas v.1.14" $wintitle = 'GTA' $wintitle = WinGetTitle($wintitle) UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
bb05 Posted April 11, 2007 Author Share Posted April 11, 2007 (edited) Lets say your gta window is named GTA: San Andreas v.1.14 With code under $wintitle will now be "GTA: San Andreas v.1.14" $wintitle = 'GTA' $wintitle = WinGetTitle($wintitle) shouldnt $wintitle = WinGetTitle($wintitle) be WinActivate($wintitle) ? sorry for my ignorance edit: so this is what i have now as my code: HotkeySet("{END}","_end") HotkeySet("{HOME}","cheat") While 1 $wintitle = 'GTA' $wintitle = WinGetTitle($wintitle) WinActivate($wintitle) Sleep(100) WEnd Func _end() Exit 0 EndFunc Func cheat() Send("uzumymw") Sleep(200) Send("hesoyam") EndFunc Exit Edited April 11, 2007 by bb05 Link to comment Share on other sites More sharing options...
jvanegmond Posted April 11, 2007 Share Posted April 11, 2007 Opt("WinTitleMatchMode",2) HotKeySet("{END}", "_Exit") HotKeySet("{HOME}", "Cheat") WinActivate("GTA") While 1 Sleep(0xFFFFFF) WEnd Func _Exit() Exit 0 EndFunc ;==>_Exit Func Cheat() Send("uzumymw") Sleep(200) Send("hesoyam") Sleep(200) EndFunc ;==>Cheat Just minor details.. github.com/jvanegmond Link to comment Share on other sites More sharing options...
bb05 Posted April 11, 2007 Author Share Posted April 11, 2007 Ok, I understand everything that you did (and note that it looks great) but what exactly what does this do? Sleep(0xFFFFFF) I know its a delay but i thought you had to have a number in there for delaying? Link to comment Share on other sites More sharing options...
SadBunny Posted April 11, 2007 Share Posted April 11, 2007 Ok, I understand everything that you did (and note that it looks great) but what exactly what does this do?Sleep(0xFFFFFF)I know its a delay but i thought you had to have a number in there for delaying?0xFFFFFF is actually a number, only in another number system than the more familiar Decimal system, it's in Hexadecimal (meaning 16-based instead of 10-based). See for instance: http://en.wikipedia.org/wiki/HexadecimalSo FFFFFF is 16777215. Sleep(0xFFFFFF) is just a quick&dirty easy way of telling the script to pause for a very long time (amounts to about 4.6 hours if I calculated correctly). Roses are FF0000, violets are 0000FF... All my base are belong to you. 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