Jump to content

Can Someone Figure It Out ? >.<


Recommended Posts

Here Is My Code :

Most Controls Dont Work Can Someone Fix The Code I Spend Alot Of Time Writing It

And Now It Runs But The Buttons Arent Doing Theyr Function And Stuff >.<

And Can Someone Tell Me How To Make The ProgressBar $PSB_SMooTH ? Dousnt Work Aswell

and Can Someone Change The Left Progressbar\'s color to red and the right to blue

Sorry Sorry For The Many Requests But Coudnt Figure Them Out :S :S :S

#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Process.au3>
#include <Array.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#include <NomadMemory.au3>

Global $Process = ProcessList("SRO_Client.exe")
Global $DllInfo1 = _MemoryOpen($Process[1][1])
Global $adress = 0x00CEBB4C
Global $adress2 = 0x00CEBB4C


$exe_name = "sro_client.exe"
$winlist = ProcessList ($exe_name)
Opt("TrayMenuMode", 1)

$Me = GUICreate("Easy Maneger", 300, 180)
GUICtrlCreateTab(0,0, 310, 190)
GUICtrlCreateTabItem("GeNeraL")
GUICtrlCreateGroup("Client Selection", 3, 25, 200, 45)
$combo = GUICtrlCreateCombo ("", 7, 40, 192, 20)
$BUT1 = GUICtrlCreateButton("Maximize", 5, 75, 70, 20)
$BUT2 = GUICtrlCreateButton("Minimize", 5, 95, 70, 20)
$BUT3 = GUICtrlCreateButton("Hide", 5, 115, 70, 20)
$BUT4 = GUICtrlCreateButton("Show", 5, 135, 70, 20)
$BUT5 = GUICtrlCreateButton("Resize", 5, 155, 70, 20)
$INP1 = GUICtrlCreateInput("", 90, 137, 70, 17)
$INP2 = GUICtrlCreateInput("", 90, 157, 70, 17)
$Lab1 = GUICtrlCreateLabel("Width", 163, 137)
$Lab2 = GUICtrlCreateLabel("Height", 163, 157)
$RIGroup = GUICtrlCreateGroup("ReSiZe Settings", 80, 120, 130, 58)
$I1 = GUICtrlCreateIcon (@ScriptDir & "\SRO.ico", 100, 220, 35, 32, 32)
$Exit = GUICtrlCreateButton("Exit", 220, 160, 70, 20)
GUICtrlCreateTabItem("Char InFo")
$Progress1 = GUICtrlCreateProgress(5, 33, 100, 20, $PBS_SMOOTH)
$Progress2 = GUICtrlCreateProgress(110, 33, 100, 20, $PBS_SMOOTH)
GUICtrlSetColor($Progress1, 16711680) 
GUICtrlSetBkColor($Progress1, 16711680)
GUICtrlSetColor(-1, 0x0000FF)
$HPTXET = GUICtrlCreateLabel("HP", 45, 35, 19, 17)
$MPtext = GUICtrlCreateLabel("MP", 150, 35, 20, 17)
$SPtext = GUICtrlCreateLabel("SP: " & "", 10, 60, 73, 17)
$Xtext = GUICtrlCreateLabel("X:", 235, 35, 59, 17)
$Ytext = GUICtrlCreateLabel("Y:", 235, 50, 59, 17)
$LVLtext = GUICtrlCreateLabel("LVL: XX", 10, 80, 43, 17)
GUICtrlCreateLabel("X:", 220, 35)
GUICtrlCreateLabel("Y:", 220, 50)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)

For $i = 1 To $winlist[0][0]
    GUICtrlSetData ($combo, WinGetTitle(_ProcessGetWinEx($winlist[$i][0],"","","",True)))
Next

GUISetState ()
While 1
 
 $msg = GUIGetMsg()
 Global $Pointer = 0x00CEBB4C
 Global $CurHpOS = 0x00000450
 Global $MaxHpOS = 0x00000448
 Global $CurMpOS = 0x00000444
 Global $MaxMpOS = 0x0000044C
 Global $CurStatsOS = 0x0000083C
 Global $CurExpOffset = 0x00000828
 Global $adress = 0x00CEBB4C
 Global $adress2 = 0x00CEBB4C
 Global $GoldAdress = 0xF0A924
 Global $PlayerLevelOffset = 0x00000820
 Global $StatusSTR = 0x0000082C
 Global $StatusINT = 0x0000082E
 Global $CurSpOffset = 0x00000838
 Global $Process = ProcessList("SRO_Client.exe")
 Global $DllInfo1 = _MemoryOpen($Process[1][1])
 
 $MP = _FindNewAddress($Pointer, $CurMpOS)
 $CurMp = _MemoryRead($MP, $DllInfo1)

 $MaxMp = _FindNewAddress($Pointer, $MaxMpOS)
 $MaxMpOS = _MemoryRead($MaxMp, $DllInfo1)

 $HP = _FindNewAddress($Pointer, $CurHpOS)
 $CurHpOS = _MemoryRead($HP, $DllInfo1)

 $MaxHp = _FindNewAddress($Pointer, $MaxHpOS)
 $MaxHpOS = _MemoryRead($MaxHp, $DllInfo1)
 
 $CurSpAdd = _FindNewAddress($Pointer, $CurSpOffset)
 $CurSp = _MemoryRead($CurSpAdd, $DllInfo1)

 $LevelAdd = _FindNewAddress($Pointer, $PlayerLevelOffset)
 $CurLv = _MemoryRead($LevelAdd, $DllInfo1, "byte")
 $CurExpAdd = _FindNewAddress($Pointer, $CurExpOffset)
 $CurExp = _MemoryRead($CurExpAdd, $DllInfo1)
 $nick = _MemoryRead($adress, $DllInfo1, 'wchar[12]')
 $server = _MemoryRead($adress2, $DllInfo1, 'wchar[12]')
 
 $CurStatsAdd = _FindNewAddress($Pointer, $CurStatsOS)
 $CurStats = _MemoryRead($CurStatsAdd, $DllInfo1)
 
 $CurGold = _MemoryRead($GoldAdress, $DllInfo1,"char")
 
 $CurHpOSz = $CurHpOS / $MaxHpOS * 100
 GUICtrlSetData($Progress1, $CurHpOSz)
 $CurMpOSz = $CurMp / $MaxMpOS * 100
 GUICtrlSetData($Progress2, $CurMpOSz) 
 If GUICtrlRead($LVLtext) <> "LVL: " & $CurLv Then GUICtrlSetData($LVLtext, "LVL: " & $CurLv)
 If GUICtrlRead($SPtext) <> "SP: " & $CurSp Then GUICtrlSetData($SPtext, "SP: " & $CurSp)
 If $msg = $BUT1 Then
  Max()
  EndIf
 If $msg = $BUT2 Then
  Min()
  EndIf
 If $msg = $BUT3 Then
  Hide()
  EndIf
 If $msg = $BUT4 Then
  Show()
  EndIf
 If $msg = $BUT5 Then
  Resize()
  EndIf
 If $msg = $Exit Then
  Exit
  EndIf
   If $msg = $GUI_Event_Close Then
  Exit
  EndIf
 $ECX = _MEMORYREAD($Pointer, $DllInfo1, 'DWORD')
 $EAX = _MEMORYREAD($ECX + 120, $DllInfo1, 'ushort')
 $EBX = $EAX
 $EDI = $EBX
 $EBP = $EBX
 $ESP_1C = $EAX
 $EDI = BitAND($EDI, Dec("0FF"))
 $EBP = BitShift($EBP, 8)
 $EAX = _MEMORYREAD($Pointer, $DllInfo1)
 $EDX = _MEMORYREAD($EAX + Dec('7C'), $DllInfo1)
 $fTmp4 = 0
 $fTmp5 = 0
 $fTmp4 = _MEMORYREAD($EAX + Dec('7C'), $DllInfo1, 'float')
 $EAX += 0x7C
 $ECX = _MEMORYREAD($EAX + Dec('04'), $DllInfo1)
 $ESI_3E4 = 0
 $ESI_3E4 = $ECX
 $EDX = _MEMORYREAD($EAX + Dec('8'), $DllInfo1)
 $fTmp5 = _MEMORYREAD($EAX + Dec('8'), $DllInfo1, 'float')
 $ESI_3E8 = 0
 $ESI_3E8 = $EDX
 $EAX = _MEMORYREAD($Pointer, $DllInfo1)
 $fTmp1 = 0
 $fTmp1 = _MEMORYREAD($EAX + Dec("88"), $DllInfo1, 'float')
 $ECX = _MEMORYREAD($Pointer, $DllInfo1)
 $EAX = 0
 $ESP_20 = $EAX
 $EAX = $ESP_1C
 $EAX = BitShift($EBP, Dec('0F'))
 $ESP_2A = $EAX
 $fTmp4 /= -10.0
 $EAX = Int($fTmp4)
 $ECX = $EDI + $EDI * 2 - 0x195
 $ECX = BitShift($ECX, -0x06)
 $ECX -= $EAX
 $finalX = $ECX
 $fTmp5 /= -10.0
 $EAX = Int($fTmp5)
 $ECX = $EBP + $EBP * 2 - 0x114
 $ECX = BitShift($ECX, -0x06)
 $ECX -= $EAX
 $finalY = $ECX
 If GUICtrlRead($Xtext) <> $finalX Then GUICtrlSetData($Xtext, $finalX)
 If GUICtrlRead($Ytext) <> $finalY Then GUICtrlSetData($Ytext, $finalY)
 WEnd

Func _ProcessGetWinEx($ivPid, $svClass = "", $svTitle = "", $svText = "", $ivReturnOnlyFirstMatch = False)
 
    $ivPid = ProcessExists($ivPid)
    If Not $ivPid Then Return(SetError(1, 0, 0))
   
    Local $avwArray = WinList()
    Local $avRet[1] = [0]
 
    For $i = 1 To $avwArray[0][0]
        $avClass = DllCall("User32.dll", "int", "GetClassName", "hwnd", $avwArray[$i][1], "str", "", "int", 4096)
        If WinGetProcess($avwArray[$i][1]) = $ivPid Then
            If $svClass = "" Or (IsArray($avClass) And $avClass[2] = $svClass) Then
                If ($svTitle = "" Or StringInStr($avwArray[$i][0], $svTitle)) And ($svText = "" Or StringInStr(WinGetText($avwArray[$i][1]), $svText)) Then
                    $avRet[0] += 1
                    ReDim $avRet[$avRet[0]+1]
                    $avRet[$avRet[0]] = $avwArray[$i][1]
                    If $ivReturnOnlyFirstMatch Then
                        $avRet = $avret[1]
                        ExitLoop
                    EndIf
                EndIf
            EndIf
        EndIf
    Next
 
    Return $avRet
EndFunc

Func Max()
 Local $Selected = GUICtrlRead($combo)
 WinSetState($Selected, "", @SW_MAXIMIZE)
EndFunc

Func Min()
 Local $Selected = GUICtrlRead($combo)
 WinSetState($Selected, "", @SW_Minimize)
EndFunc

Func Show()
 Local $Selected = GUICtrlRead($combo)
 WinSetState($Selected, "", @SW_SHOW)
EndFunc

Func Hide()
 Local $Selected = GUICtrlRead($combo)
 WinSetState($Selected, "", @SW_Hide)
EndFunc

Func Resize()
 Local $Selected = GUICtrlRead($combo)
 Local $Width = GUICtrlRead($INP1)
 Local $Height = GUICtrlRead($INP2)
 WinMove($Selected, "", "", "", $Width, $Height)
EndFunc

Func _FindNewAddress(ByRef $Pointer, ByRef $OSet)
 $New_Address = _MemoryRead($Pointer, $DllInfo1) + $OSet
 Return $New_Address
EndFunc   ;==>_FindNewAddress

I\'m Waiting For Your Reply And Please Excuse Me If I Annoyed You ;(

Ty In Advance muttley

Edited by Cha0sBG

Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ยน There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.

Link to comment
Share on other sites

OMG oO Ty Dude But Can U Help Out With The Othere Stuff To Still Can't Figure Em Out

Btw how can i forget the on event mode will block em oO

Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ยน There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.

Link to comment
Share on other sites

  • Moderators

OMG oO Ty Dude But Can U Help Out With The Othere Stuff To Still Can't Figure Em Out

Btw how can i forget the on event mode will block em oO

Try speaking properly here if you wish to continue to get help. This is utterly rediculous.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

not complaints about my gramer ..... dudes i'm from buglaria we spear bulgarian .... so i dont know how everything is spelled ok ? please dont make problem out of this >.<

Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ยน There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.

Link to comment
Share on other sites

not complaints about my gramer ..... dudes i'm from buglaria we spear bulgarian .... so i dont know how everything is spelled ok ? please dont make problem out of this >.<

But you sure took time to write up your signature didn't you. muttley

And what do you mean with "OMG oO Ty Dude But Can U Help Out With The Othere Stuff To Still Can't Figure Em Out", what "Othere Stuff" ? Please elaborate..

Edited by FreeFry
Link to comment
Share on other sites

And Can Someone Tell Me How To Make The ProgressBar $PSB_SMooTH ? Dousnt Work Aswell

and Can Someone Change The Left Progressbar\'s color to red and the right to blue

umm this ?

Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ยน There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.

Link to comment
Share on other sites

  • Moderators

OMG oO Ty Dude But Can U Help Out With The Othere Stuff To Still Can't Figure Em Out

Btw how can i forget the on event mode will block em oO

not complaints about my gramer ..... dudes i'm from buglaria we spear bulgarian .... so i dont know how everything is spelled ok ? please dont make problem out of this >.<

I wasn't speaking of "grammar", I was speaking of every word being capitalized and your ebonics on specific words. You know how to spell regardless of what language you speak, so try being a little less childish in these forums please.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

damn why does everyone make a problem about that capitalizing ..... what's the big deal lol it's just a bad habit

Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ยน There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.

Link to comment
Share on other sites

And Can Someone Tell Me How To Make The ProgressBar $PSB_SMooTH ? Dousnt Work Aswell

and Can Someone Change The Left Progressbar\'s color to red and the right to blue

umm this ?

Its not your spelling, that's reasonable its the Capitalisation Of Every Single Letter On The Start Of Every Word or doing THiS BecUasE MakeS It ReAllY HaRd To ReaD... YeS?

muttley

Ok,

You while loop does not need to have all those declarations in there, it will just slow it down, and is probably the cause of the unresponsiveness.

You should also use Switch...Case....EndSwitch or Select...Case...EndSelect. Have a look in the helpfile for the GUI Examples, and you we see how they do it.

Question about $PBS_SMOOTH is answered http://www.autoitscript.com/forum/index.php?showtopic=31480

First result in google (Terms: $PBS_SMOOTH + AutoIt)

As with colouring and the fact that you want Smooth style maybe look here: #483195.

Cheers,

Brett

Link to comment
Share on other sites

as you can see i have added $PSB_Smooth and also "tryed" to change the color func is ok but dousnt seem to work :S

dunno and all the declarations are for the memory read or do you mean the #include

Edited by Cha0sBG

Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ยน There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...