BlackBerryx3 Posted August 10, 2013 Posted August 10, 2013 (edited) expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <NomadMemory.au3> #include <StaticConstants.au3> HotKeySet("{ESC}", "_Exit") $Width = 600 $Height = 200 _Steam("* Test - Your IP Address : " & @IPAddress1, $Width, $Height, Default, Default) While 1 Sleep(1000) WEnd Func _Steam($sTitle, $sWidth, $sHeight, $sX, $sY) ;;; Steam Window Start ;;; $Steam_Win = GUICreate($sTitle, $sWidth, $sHeight, $sX, $sY , $WS_POPUP, $WS_EX_TOOLWINDOW) GUISetFont(8, 800, 0, "Comic Sans MS") GUISetBkColor(0x464646) ;;; Steam Window End ;;; ;;; Steam Title Bar Start ;;; $Bar = GUICtrlCreateLabel($sTitle , 0 , 0 , $sWidth - 20, 20 , $SS_NOTIFY , $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont($Bar, 10, 800, 0, "Comic Sans MS") ; Bold GUICtrlSetColor($Bar , 0xD8DED3) GUICtrlSetBkColor($Bar , 0x5A6A50) ;;; Steam Title Bar End ;;; ;;; Steam Title Exit Start ;;; $Exit = GUICtrlCreateLabel("X" , $sWidth - 20 , 0 , 20 , 20 , $SS_CENTER) GUICtrlSetFont($Exit, 10, 800, 0, "Comic Sans MS") ; Bold GUICtrlSetColor($Exit , 0xD8DED3) GUICtrlSetBkColor($Exit, 0x5A6A50) ;aaaa $Start = GUICtrlCreateButton("Start!!", 420, 150, 120, 20) GUICtrlSetFont($Start, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($Start, 0xC3B54C) GUICtrlSetBkColor($Start, 0x464646) $Sleep = GUICtrlCreateButton("Sleep Option", 420, 120, 120, 20) GUICtrlSetFont($Sleep, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($Sleep, 0xC3B54C) GUICtrlSetBkColor($Sleep, 0x464646) _Steam_Extension($Width, $Height) ; Create Full GUI GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $Exit Exit Case $Start _Start() Case $Sleep _Sleep() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc Func _Steam_Extension($eWidth, $eHeight) $Steam_Arm_X = 0 ; This adjusts the Arms Width $Steam_Arm_Y = 20 ; This really shouldn't be played with... $Arm = GUICtrlCreateGraphic($Steam_Arm_X, $Steam_Arm_Y, $eWidth - $Steam_Arm_X, $eHeight - $Steam_Arm_Y) GUICtrlSetBkColor($Arm, 0x494E48) GUICtrlSetState($Arm, $GUI_DISABLE) $Border = GUICtrlCreateGraphic($Steam_Arm_X + 10, 30, $eWidth - $Steam_Arm_X - $Steam_Arm_Y, $eHeight - $Steam_Arm_Y - $Steam_Arm_Y) $Header = GUICtrlCreateGraphic($Steam_Arm_X + 10, 30, $eWidth - $Steam_Arm_X - $Steam_Arm_Y, 20) GUICtrlSetColor($Border, 0x696A65) GUICtrlSetColor($Header, 0x696A65) GUICtrlSetState($Border, $GUI_DISABLE) GUICtrlSetState($Header, $GUI_DISABLE) $Text = GUICtrlCreateLabel("*- Test -*", 17, 32, 200, 20) GUICtrlSetFont($Text, 9, 800, 0, "Comic Sans MS") ; Bold GUICtrlSetColor($Text, 0xC3B54C) GUICtrlSetBkColor($Text, $GUI_BKCOLOR_TRANSPARENT) $checkbox1 = GUICtrlCreateCheckbox("Bla~", 17, 60, 100, 20) GUICtrlSetFont($checkbox1, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($checkbox1, 0xC3B54C) Func _Start() GUISetState(@SW_HIDE) ToolTip("Waiting...", 0, 0) $wait = ProcessWait("...") $pid = ProcessExists("...") Sleep(800) $open = _memoryopen($pid) If GUICtrlRead($checkbox1) = 1 Then _memorywrite(0x012A8FFC, $open, "0", "Char") EndIf EndFunc Func _Exit() Exit EndFunc im getting this error when i click Start button in my script and start the process that i attached ; I don't get it .. there is no problem in my script. But i'm still getting that error. Edited August 10, 2013 by BlackBerryx3
Edano Posted August 10, 2013 Posted August 10, 2013 (edited) try to declare it global on top of script. and please try to sctructure your scripts. . expandcollapse popup;http://www.autoitscript.com/forum/topic/153514-variable-used-without-being-declared/ ;Post #1 ;D:\DOKUME~1\ADMINI~1\LOKALE~1\Temp\SLICER\Avatar\photo-thumb-78488.gif ;by BlackBerryx3 ;Script grabbed by SLICER by Edano here: http://www.autoitscript.com/forum/topic/152402-slicer-autoit-forum-script-grabber/?p=1093575 #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <NomadMemory.au3> #include <StaticConstants.au3> HotKeySet("{ESC}", "_Exit") Global $checkbox1;=======> ! $Width = 600 $Height = 200 _Steam("* Test - Your IP Address : " & @IPAddress1, $Width, $Height, Default, Default) While 1 Sleep(1000) WEnd Func _Steam($sTitle, $sWidth, $sHeight, $sX, $sY) ;;; Steam Window Start ;;; $Steam_Win = GUICreate($sTitle, $sWidth, $sHeight, $sX, $sY , $WS_POPUP, $WS_EX_TOOLWINDOW) GUISetFont(8, 800, 0, "Comic Sans MS") GUISetBkColor(0x464646) ;;; Steam Window End ;;; ;;; Steam Title Bar Start ;;; $Bar = GUICtrlCreateLabel($sTitle , 0 , 0 , $sWidth - 20, 20 , $SS_NOTIFY , $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont($Bar, 10, 800, 0, "Comic Sans MS") ; Bold GUICtrlSetColor($Bar , 0xD8DED3) GUICtrlSetBkColor($Bar , 0x5A6A50) ;;; Steam Title Bar End ;;; ;;; Steam Title Exit Start ;;; $Exit = GUICtrlCreateLabel("X" , $sWidth - 20 , 0 , 20 , 20 , $SS_CENTER) GUICtrlSetFont($Exit, 10, 800, 0, "Comic Sans MS") ; Bold GUICtrlSetColor($Exit , 0xD8DED3) GUICtrlSetBkColor($Exit, 0x5A6A50) ;aaaa $Start = GUICtrlCreateButton("Start!!", 420, 150, 120, 20) GUICtrlSetFont($Start, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($Start, 0xC3B54C) GUICtrlSetBkColor($Start, 0x464646) $Sleep = GUICtrlCreateButton("Sleep Option", 420, 120, 120, 20) GUICtrlSetFont($Sleep, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($Sleep, 0xC3B54C) GUICtrlSetBkColor($Sleep, 0x464646) _Steam_Extension($Width, $Height) ; Create Full GUI GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $Exit Exit Case $Start _Start() Case $Sleep _Sleep() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc Func _Steam_Extension($eWidth, $eHeight) $Steam_Arm_X = 0 ; This adjusts the Arms Width $Steam_Arm_Y = 20 ; This really shouldn't be played with... $Arm = GUICtrlCreateGraphic($Steam_Arm_X, $Steam_Arm_Y, $eWidth - $Steam_Arm_X, $eHeight - $Steam_Arm_Y) GUICtrlSetBkColor($Arm, 0x494E48) GUICtrlSetState($Arm, $GUI_DISABLE) $Border = GUICtrlCreateGraphic($Steam_Arm_X + 10, 30, $eWidth - $Steam_Arm_X - $Steam_Arm_Y, $eHeight - $Steam_Arm_Y - $Steam_Arm_Y) $Header = GUICtrlCreateGraphic($Steam_Arm_X + 10, 30, $eWidth - $Steam_Arm_X - $Steam_Arm_Y, 20) GUICtrlSetColor($Border, 0x696A65) GUICtrlSetColor($Header, 0x696A65) GUICtrlSetState($Border, $GUI_DISABLE) GUICtrlSetState($Header, $GUI_DISABLE) $Text = GUICtrlCreateLabel("*- Test -*", 17, 32, 200, 20) GUICtrlSetFont($Text, 9, 800, 0, "Comic Sans MS") ; Bold GUICtrlSetColor($Text, 0xC3B54C) GUICtrlSetBkColor($Text, $GUI_BKCOLOR_TRANSPARENT) $checkbox1 = GUICtrlCreateCheckbox("Bla~", 17, 60, 100, 20) GUICtrlSetFont($checkbox1, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($checkbox1, 0xC3B54C) EndFunc Func _Start() GUISetState(@SW_HIDE) ToolTip("Waiting...", 0, 0) $wait = ProcessWait("...") $pid = ProcessExists("...") Sleep(800) $open = _memoryopen($pid) If GUICtrlRead($checkbox1) = 1 Then _memorywrite(0x012A8FFC, $open, "0", "Char") EndIf EndFunc Func _Exit() Exit EndFunc . then you easily percieve that checkbox1 is declared locally. E. Edited August 10, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]
BlackBerryx3 Posted August 10, 2013 Author Posted August 10, 2013 (edited) On 8/10/2013 at 7:07 PM, Edano said: try to declare it global on top of script. and please try to sctructure your scripts. . expandcollapse popup;http://www.autoitscript.com/forum/topic/153514-variable-used-without-being-declared/ ;Post #1 ;D:\DOKUME~1\ADMINI~1\LOKALE~1\Temp\SLICER\Avatar\photo-thumb-78488.gif ;by BlackBerryx3 ;Script grabbed by SLICER by Edano here: http://www.autoitscript.com/forum/topic/152402-slicer-autoit-forum-script-grabber/?p=1093575 #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <NomadMemory.au3> #include <StaticConstants.au3> HotKeySet("{ESC}", "_Exit") Global $checkbox1;=======> ! $Width = 600 $Height = 200 _Steam("* Test - Your IP Address : " & @IPAddress1, $Width, $Height, Default, Default) While 1 Sleep(1000) WEnd Func _Steam($sTitle, $sWidth, $sHeight, $sX, $sY) ;;; Steam Window Start ;;; $Steam_Win = GUICreate($sTitle, $sWidth, $sHeight, $sX, $sY , $WS_POPUP, $WS_EX_TOOLWINDOW) GUISetFont(8, 800, 0, "Comic Sans MS") GUISetBkColor(0x464646) ;;; Steam Window End ;;; ;;; Steam Title Bar Start ;;; $Bar = GUICtrlCreateLabel($sTitle , 0 , 0 , $sWidth - 20, 20 , $SS_NOTIFY , $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont($Bar, 10, 800, 0, "Comic Sans MS") ; Bold GUICtrlSetColor($Bar , 0xD8DED3) GUICtrlSetBkColor($Bar , 0x5A6A50) ;;; Steam Title Bar End ;;; ;;; Steam Title Exit Start ;;; $Exit = GUICtrlCreateLabel("X" , $sWidth - 20 , 0 , 20 , 20 , $SS_CENTER) GUICtrlSetFont($Exit, 10, 800, 0, "Comic Sans MS") ; Bold GUICtrlSetColor($Exit , 0xD8DED3) GUICtrlSetBkColor($Exit, 0x5A6A50) ;aaaa $Start = GUICtrlCreateButton("Start!!", 420, 150, 120, 20) GUICtrlSetFont($Start, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($Start, 0xC3B54C) GUICtrlSetBkColor($Start, 0x464646) $Sleep = GUICtrlCreateButton("Sleep Option", 420, 120, 120, 20) GUICtrlSetFont($Sleep, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($Sleep, 0xC3B54C) GUICtrlSetBkColor($Sleep, 0x464646) _Steam_Extension($Width, $Height) ; Create Full GUI GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $Exit Exit Case $Start _Start() Case $Sleep _Sleep() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc Func _Steam_Extension($eWidth, $eHeight) $Steam_Arm_X = 0 ; This adjusts the Arms Width $Steam_Arm_Y = 20 ; This really shouldn't be played with... $Arm = GUICtrlCreateGraphic($Steam_Arm_X, $Steam_Arm_Y, $eWidth - $Steam_Arm_X, $eHeight - $Steam_Arm_Y) GUICtrlSetBkColor($Arm, 0x494E48) GUICtrlSetState($Arm, $GUI_DISABLE) $Border = GUICtrlCreateGraphic($Steam_Arm_X + 10, 30, $eWidth - $Steam_Arm_X - $Steam_Arm_Y, $eHeight - $Steam_Arm_Y - $Steam_Arm_Y) $Header = GUICtrlCreateGraphic($Steam_Arm_X + 10, 30, $eWidth - $Steam_Arm_X - $Steam_Arm_Y, 20) GUICtrlSetColor($Border, 0x696A65) GUICtrlSetColor($Header, 0x696A65) GUICtrlSetState($Border, $GUI_DISABLE) GUICtrlSetState($Header, $GUI_DISABLE) $Text = GUICtrlCreateLabel("*- Test -*", 17, 32, 200, 20) GUICtrlSetFont($Text, 9, 800, 0, "Comic Sans MS") ; Bold GUICtrlSetColor($Text, 0xC3B54C) GUICtrlSetBkColor($Text, $GUI_BKCOLOR_TRANSPARENT) $checkbox1 = GUICtrlCreateCheckbox("Bla~", 17, 60, 100, 20) GUICtrlSetFont($checkbox1, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($checkbox1, 0xC3B54C) EndFunc Func _Start() GUISetState(@SW_HIDE) ToolTip("Waiting...", 0, 0) $wait = ProcessWait("...") $pid = ProcessExists("...") Sleep(800) $open = _memoryopen($pid) If GUICtrlRead($checkbox1) = 1 Then _memorywrite(0x012A8FFC, $open, "0", "Char") EndIf EndFunc Func _Exit() Exit EndFunc . then you easily percieve that checkbox1 is declared locally. E. how can i declare it ? sorry , im newbie at autoit , so i don't understand a sh*t.. here is my full script. ; expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <NomadMemory.au3> #include <StaticConstants.au3> HotKeySet("{ESC}", "_Exit") $Width = 600 $Height = 200 _Steam("* - Your IP Address : " & @IPAddress1, $Width, $Height, Default, Default) While 1 Sleep(1000) WEnd Func _Steam($sTitle, $sWidth, $sHeight, $sX, $sY) ;;; Steam Window Start ;;; $Steam_Win = GUICreate($sTitle, $sWidth, $sHeight, $sX, $sY , $WS_POPUP, $WS_EX_TOOLWINDOW) GUISetFont(8, 800, 0, "Comic Sans MS") GUISetBkColor(0x464646) ;;; Steam Window End ;;; ;;; Steam Title Bar Start ;;; $Bar = GUICtrlCreateLabel($sTitle , 0 , 0 , $sWidth - 20, 20 , $SS_NOTIFY , $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont($Bar, 10, 800, 0, "Comic Sans MS") ; Bold GUICtrlSetColor($Bar , 0xD8DED3) GUICtrlSetBkColor($Bar , 0x5A6A50) ;;; Steam Title Bar End ;;; ;;; Steam Title Exit Start ;;; $Exit = GUICtrlCreateLabel("X" , $sWidth - 20 , 0 , 20 , 20 , $SS_CENTER) GUICtrlSetFont($Exit, 10, 800, 0, "Comic Sans MS") ; Bold GUICtrlSetColor($Exit , 0xD8DED3) GUICtrlSetBkColor($Exit, 0x5A6A50) ;aaaa $Start = GUICtrlCreateButton("Start!!", 420, 150, 120, 20) GUICtrlSetFont($Start, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($Start, 0xC3B54C) GUICtrlSetBkColor($Start, 0x464646) $Sleep = GUICtrlCreateButton("Sleep Option", 420, 120, 120, 20) GUICtrlSetFont($Sleep, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($Sleep, 0xC3B54C) GUICtrlSetBkColor($Sleep, 0x464646) _Steam_Extension($Width, $Height) ; Create Full GUI GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $Exit Exit Case $Start _Start() Case $Sleep _Sleep() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc Func _Steam_Extension($eWidth, $eHeight) $Steam_Arm_X = 0 ; This adjusts the Arms Width $Steam_Arm_Y = 20 ; This really shouldn't be played with... $Arm = GUICtrlCreateGraphic($Steam_Arm_X, $Steam_Arm_Y, $eWidth - $Steam_Arm_X, $eHeight - $Steam_Arm_Y) GUICtrlSetBkColor($Arm, 0x494E48) GUICtrlSetState($Arm, $GUI_DISABLE) $Border = GUICtrlCreateGraphic($Steam_Arm_X + 10, 30, $eWidth - $Steam_Arm_X - $Steam_Arm_Y, $eHeight - $Steam_Arm_Y - $Steam_Arm_Y) $Header = GUICtrlCreateGraphic($Steam_Arm_X + 10, 30, $eWidth - $Steam_Arm_X - $Steam_Arm_Y, 20) GUICtrlSetColor($Border, 0x696A65) GUICtrlSetColor($Header, 0x696A65) GUICtrlSetState($Border, $GUI_DISABLE) GUICtrlSetState($Header, $GUI_DISABLE) $Text = GUICtrlCreateLabel("*- Functions -*", 17, 32, 200, 20) GUICtrlSetFont($Text, 9, 800, 0, "Comic Sans MS") ; Bold GUICtrlSetColor($Text, 0xC3B54C) GUICtrlSetBkColor($Text, $GUI_BKCOLOR_TRANSPARENT) $checkbox1 = GUICtrlCreateCheckbox("Card Hack", 17, 60, 100, 20) GUICtrlSetFont($checkbox1, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($checkbox1, 0xC3B54C) $checkbox2 = GUICtrlCreateCheckbox("Conquest Hack", 17, 85, 120, 20) GUICtrlSetFont($checkbox2, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($checkbox2, 0xC3B54C) $checkbox3 = GUICtrlCreateCheckbox("Cam Hack", 17, 110, 120, 20) GUICtrlSetFont($checkbox3, 9, 800, 0, "Comic Sans MS") GUICtrlSetColor($checkbox3, 0xC3B54C) EndFunc Func _Start() GUISetState(@SW_HIDE) ToolTip("Waiting for S4Client...", 0, 0) $wait = ProcessWait("S4Client.exe") $pid = ProcessExists("S4Client.exe") Sleep(800) $open = _memoryopen($pid) If GUICtrlRead($checkbox2) = 1 Then _memorywrite(0x012A8FFC, $open, "0", "Char") EndIf If GUICtrlRead($checkbox2) = 1 Then _memorywrite(0x0127329C, $open, "48", "long") _memorywrite(0x012732A0, $open, "0", "long") _memorywrite(0x012732A4, $open, "48", "long") _memorywrite(0x012732A8, $open, "0", "long") EndIf If GUICtrlRead($checkbox3) = 1 Then _memorywrite(0x011E9460, $open, "1000", "float") EndIf Func _Exit() Exit EndFunc i didn't implemented Sleep Option yet.. Edited August 10, 2013 by BlackBerryx3
Edano Posted August 10, 2013 Posted August 10, 2013 (edited) i fixed it already in my post. your program looks like a copy and paste work. that's not the best way to learn a language. use Tidy from scite to structure your script. Edited August 10, 2013 by Edano BlackBerryx3 1 [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]
jaberwacky Posted August 10, 2013 Posted August 10, 2013 I see references to steam in there. Is this for that popular game thingymabob? Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum?
Edano Posted August 10, 2013 Posted August 10, 2013 On 8/10/2013 at 7:42 PM, jaberwocky6669 said: I see references to steam in there. Is this for that popular game thingymabob? . i think it's just a gui theme [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]
Edano Posted August 10, 2013 Posted August 10, 2013 but as a beginner, i wouldn't begin with complicated guis .... begin simple and then go advanced, or you will only understand a sh*t. [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]
BlackBerryx3 Posted August 10, 2013 Author Posted August 10, 2013 On 8/10/2013 at 7:42 PM, jaberwocky6669 said: I see references to steam in there. Is this for that popular game thingymabob? No. S4League xD And Edano ; Thank you very much.
Edano Posted August 10, 2013 Posted August 10, 2013 On 8/10/2013 at 7:48 PM, BlackBerryx3 said: No. S4League xD And Edano ; Thank you very much. . hey wait. S4League xD, is that a game you want to automate ? [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]
BlackBerryx3 Posted August 10, 2013 Author Posted August 10, 2013 On 8/10/2013 at 7:51 PM, Edano said: . hey wait. S4League xD, is that a game you want to automate ? You are gonna tell me Read the rules , right ? Yeah but whatever..
Edano Posted August 10, 2013 Posted August 10, 2013 (edited) On 8/10/2013 at 7:54 PM, BlackBerryx3 said: You are gonna tell me Read the rules , right ? Yeah but whatever.. . no whatever, i get your post locked and get you banned. all this kindergarden here is simply annoying. Edited August 10, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]
BlackBerryx3 Posted August 10, 2013 Author Posted August 10, 2013 On 8/10/2013 at 7:56 PM, Edano said: . no whatever, i get your post locked and get you banned. I don't care , LOL.
Developers Jos Posted August 10, 2013 Developers Posted August 10, 2013 On 8/10/2013 at 7:54 PM, BlackBerryx3 said: You are gonna tell me Read the rules , right ? Yeah but whatever.. Ok, since you seem to realize what you did you get a week vacation. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts