Sign in to follow this  
Followers 0
Coder_Noob

Changing Variables

12 posts in this topic

Ive created a few basic programs now using autoit (only got it 2day) and i was wondering how do i change varibles of things, I have made a program that opens the 'Best Times' in minesweeper and i was wondering how to change the times and names.


Avatar made on Gmod for HL2 by me!Name on Gmod: Oclops

Share this post


Link to post
Share on other sites



Ive created a few basic programs now using autoit (only got it 2day) and i was wondering how do i change varibles of things, I have made a program that opens the 'Best Times' in minesweeper and i was wondering how to change the times and names.

Post the code of what you have done so far and maybe we can make more specific suggestions. B)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Ok

Run("winmine.exe")
WinWaitActive("Minesweeper")
Send("!G")
Send("T"); that opens the scores up, now how do i change them?
Edited by Coder_Noob

Avatar made on Gmod for HL2 by me!Name on Gmod: Oclops

Share this post


Link to post
Share on other sites

Ok

Run("winmine.exe")
WinWaitActive("Minesweeper")
Send("!G")
Send("T"); that opens the scores up, now how do i change them?
Where does it store the names and high scores? In the registry? In an .ini file?

Share this post


Link to post
Share on other sites

Thats what i wanna know...


Avatar made on Gmod for HL2 by me!Name on Gmod: Oclops

Share this post


Link to post
Share on other sites

so you want to cheat/hack the program?

why? can't you play this on your own?

they are stored in the registry

HKCU\Software\Microsoft\winmine

values are:

Time1

Time2

Time3

Name1

Name2

Name3

your code is:

regdelete("HKCU\Software\Microsoft\winmine", "Time1")
regdelete("HKCU\Software\Microsoft\winmine", "Time2")
regdelete("HKCU\Software\Microsoft\winmine", "Time3")
regdelete("HKCU\Software\Microsoft\winmine", "Name1")
regdelete("HKCU\Software\Microsoft\winmine", "Name2")
regdelete("HKCU\Software\Microsoft\winmine", "Name3")
regwrite("HKCU\Software\Microsoft\winmine", "Time1", "REG_DWORD", **whatever time you want**)
regwrite("HKCU\Software\Microsoft\winmine", "Time2", "REG_DWORD", **whatever time you want**)
regwrite("HKCU\Software\Microsoft\winmine", "Time3", "REG_DWORD", **whatever time you want**)
regwrite("HKCU\Software\Microsoft\winmine", "Name1", "REG_SZ", **whatever name you want**)
regwrite("HKCU\Software\Microsoft\winmine", "Name2", "REG_SZ", **whatever name you want**)
regwrite("HKCU\Software\Microsoft\winmine", "Name3", "REG_SZ", **whatever name you want**)

thats it

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

i just wanted to know more about AutoIt, ty.

Also: How do i go about finding this out by myself?

Edited by Coder_Noob

Avatar made on Gmod for HL2 by me!Name on Gmod: Oclops

Share this post


Link to post
Share on other sites

i just wanted to know more about AutoIt, ty.

I am sure that in windows 98 it is in an ini file.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

regdelete("HKCU\Software\Microsoft\winmine", "Time1")
regdelete("HKCU\Software\Microsoft\winmine", "Time2")
regdelete("HKCU\Software\Microsoft\winmine", "Time3")
regdelete("HKCU\Software\Microsoft\winmine", "Name1")
regdelete("HKCU\Software\Microsoft\winmine", "Name2")
regdelete("HKCU\Software\Microsoft\winmine", "Name3")
regwrite("HKCU\Software\Microsoft\winmine", "Time1", "REG_DWORD", "0")
regwrite("HKCU\Software\Microsoft\winmine", "Time2", "REG_DWORD", "0")
regwrite("HKCU\Software\Microsoft\winmine", "Time3", "REG_DWORD", "0")
regwrite("HKCU\Software\Microsoft\winmine", "Name1", "REG_SZ", "Coder_Noob")
regwrite("HKCU\Software\Microsoft\winmine", "Name2", "REG_SZ", "Coder_Noob")
regwrite("HKCU\Software\Microsoft\winmine", "Name3", "REG_SZ", "Coder_Noob")


Run("winmine.exe")
WinWaitActive("Minesweeper")
$size = WinGetPos("Minesweeper")
ToolTip("Hacking wait 3 seconds", $size[0], $size[1])
sleep(3000)
Send("!G")
Send("T")
; End

Thats what i made from this B) Still wanna know how to find out regkeys


Avatar made on Gmod for HL2 by me!Name on Gmod: Oclops

Share this post


Link to post
Share on other sites

i just wanted to know more about AutoIt, ty.

Also: How do i go about finding this out by myself?

You folks made it too easy for him! :graduated:

Actually if you looked at the winmine.exe file with something simple like Windows Notepad you would have seen some hints like RegQueryValueExW, RegCloseKey, RegCreateKeyExW, RegSetValueExW embedded inside the file.

Running REGEDIT and searching for "winmine" would have quickly discovered a few interesting things there.

Reading the AutoIT help file for registry read and write functions would have provided the last missing link.

But who am I to know - searching the forums here for "winmine" shows a dozen or so references, including exactly what you asked for, but then you wouldn't have learnt much, would you?

Now you'll have to go and find something else to examine, dissect, and work around! B) Spider Solitaire? :o

Good luck! You will find AutoIT scripting will solve a lot of programming needs.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0