
tlokz
Active Members-
Posts
106 -
Joined
-
Last visited
Everything posted by tlokz
-
omg I have been looking for this forever Ive been trying to incorparate sending mails from my mail server in my program... will deffinently be watching this thread... tho on topic: it crashes when downloading mail... C:\Users\T_LOKZz\Desktop\Imap_get2.au3 (338) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: MsgBox(0,"",$mail_tekstas[5]) MsgBox(0,"",^ ERROR
-
yup, but lots of ppl love it still
-
wow didnt think of that will test it out right now ... thnx for that
-
Me and a friend actually got memory reading in autoit to work well with Diablo II I know this isn't going to be useful to most of you but it might. Well here it is! ; #INDEX# ====================================================================== ; Title .........: _D2Mem ; Version .......: 1.0.0.0 ; AutoIt Version : 3.2 or better ; Language ......: English ; Description ...: Diablo II memory reading ; Author ........: TK_Incorperate & T_LOKZz ;=============================================================================== ; #CURRENT# ==================================================================== ; _D2Mem_GetStat ; _D2Mem_IsInGame ;=============================================================================== ; #FUNCTION# =================================================================== ; Name ..........: _D2Mem_GetStat ; Description ...: The reading of the memory part ; Syntax ........: _InetFile_VersionCheck($PStat, $window) ; Parameters ....: $PStat - Stat to check ; $window - Diablo II window to check ; Stats .........: 6 = current life ; 22 = current mana ; 38 = current stamina ; 53 = current level ; 61 = current experience ; -27 = (naked) strength ; -19 = (naked) energy ; -11 = (naked) dexterity ; -3 = (naked) vitality ; Return values .: Success - Returns the value of the stat checked ; (If out of game all stats will return 0) ; Failure - Will set an error ; Errors ........: @error = 1 - Window didn't exist ; Author ........: TK_Incorperate ; Modified ......: 9/28/08 ; Remarks .......: Naked means it wont add what's added from gear, ; so if you have 15 base str and 45 added, it will ; only show up as 15 ; Related .......: _D2Mem_IsInGame ; Link ..........: ; Examples ......: ;=============================================================================== Global $GlobalPlayerUnit = 0x6FBCC3D0 Func _D2Mem_GetStat($PStat, $window) $pid = WinGetProcess($window, "") If $pid = -1 Then SetError(1) Else Local $Buffer = DllStructCreate('dword') Local $dll[2] = [DllOpen('kernel32.dll')] Local $Open = DllCall($dll[0], 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 0, 'int', $pid) $dll[1] = $Open[0] DllCall($dll[0], 'int', 'ReadProcessMemory', 'int', $dll[1], 'int', $GlobalPlayerUnit, 'ptr', DllStructGetPtr($Buffer), 'int', 4, 'int', '') $Pointer1 = '0x' & Hex(DllStructGetData($Buffer, 1) + 92) DllCall($dll[0], 'int', 'ReadProcessMemory', 'int', $dll[1], 'int', $Pointer1, 'ptr', DllStructGetPtr($Buffer), 'int', 4, 'int', '') $Pointer2 = '0x' & Hex(DllStructGetData($Buffer, 1) + 36) DllCall($dll[0], 'int', 'ReadProcessMemory', 'int', $dll[1], 'int', $Pointer2, 'ptr', DllStructGetPtr($Buffer), 'int', 4, 'int', '') $Pointer3 = '0x' & Hex(DllStructGetData($Buffer, 1) + $PStat + 31) DllCall($dll[0], 'int', 'ReadProcessMemory', 'int', $dll[1], 'int', $Pointer3, 'ptr', DllStructGetPtr($Buffer), 'int', 4, 'int', '') $Value = DllStructGetData($Buffer, 1) DllClose($dll[0]) Return $Value EndIf EndFunc ;==>GetStat ; #FUNCTION# =================================================================== ; Name ..........: _D2Mem_IsInGame ; Description ...: Series of checks to acurately check if your in game or not ; Syntax ........: _D2Mem_IsInGame($window) ; Parameters ....: $window - Diablo II window to check ; Return values .: Success - Returns 1 (Your in game) ; Failure - Returns 0 (Your not in game) ; Errors ........: @error = 1 - Window didn't exist ; Author ........: T_LOKZz ; Modified ......: 9/28/08 ; Remarks .......: ; Related .......: _D2Mem_GetStat ; Link ..........: ; Examples ......: ;=============================================================================== Func _D2Mem_IsInGame($window) If WinExists($window, "") Then If _D2Mem_GetStat(46, $window) > 0 Or _D2Mem_GetStat(38, $window) > 0 Or _D2Mem_GetStat(61, $window) > 0 Then Return 1 Else Return 0 EndIf Else SetError(1) EndIf EndFunc ;==>_IsInGame This is used in Auto-Awesom my lil program to keep Awesom-O running (Best Diablo II bot) if anybody is further interested they can PM me or head over to AOBot
-
Ok is there any way that can successfully clean all orphaned icons from a tray? I used a func I coded a while ago for a while but its not very effective and requires an extra include just for that func. It doesn't clean the hidden ones also Inital Func: Func _CleanTray() Local $desktophandle = _WinAPI_GetDesktopWindow() Local $desktopheight = _WinAPI_GetClientHeight($desktophandle) Local $desktopwidth = _WinAPI_GetClientWidth($desktophandle) Local $firstcoordx = (800 / 1024) * $desktopwidth Local $bothcoordy = (755 / 768) * $desktopheight Local $secondcoordx = (1000 / 1024) * $desktopwidth MouseMove($firstcoordx, $bothcoordy, 0) MouseMove($secondcoordx, $bothcoordy, 10) MouseMove($firstcoordx, $bothcoordy, 10) EndFunc ;==>_CleanTray Any better way to do this?
-
its ok ive put this project to the side till its fixed no hurry thnx for the initial UDF tho
-
bump... can anybody help out?
-
thnx for the reply.. i looked into this also and couldnt find the it either ill keep looking also I know this is the wrong area but the UDF decalres Global Const $tagSYSTEMTIME yet it's already decalred in the other structure include... any way to fix this? I tried commenting it out and i don't know if its my script but it doesn't allow me to do anything with the files but allows me to connect the FTO
-
C:\Program Files (x86)\AutoIt3\Include\StructureConstants.au3(2481,127) : ERROR: $tagSYSTEMTIME previously declared as a 'Const' Global Const $tagSYSTEMTIME = "short Year;short Month;short Dow;short Day;short Hour;short Minute;short Second;short MSeconds" Yea I looked thru it and this is declared again and it doesnt wanna work.. I commented it out and then it didnt work correctly
-
Ok, I'm making a pure Auto-It FTP client and I am using WinINet.dll and the UDF. (BTW.. Damn that UDF is sweet!) Well I got it to put the FTP files into a list and I wanna be able to right click them and have a little menu to pop up allowing actions. Also would like to allow drag and drop, and allow quick renaming like how you do on your Windows Desktop. Here's the code so far if it helps. And yes I have looked around a lot. #RequireAdmin #Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\Icons\Tyreal.ico #AutoIt3Wrapper_Outfile=FuckTheProtocol.exe #AutoIt3Wrapper_Res_Description=FTP #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_FileVersion_AutoIncrement=n #AutoIt3Wrapper_res_requestedExecutionLevel=highestAvailable #AutoIt3Wrapper_Au3Check_Parameters=-w 3 -w 4 -w 5 #AutoIt3Wrapper_Run_Tidy=y #Tidy_Parameters=/gd #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** ;===================================================================== ; Name...........: Fuck The Protocol FTP Client ; Description ...: FTP Client ; ; Remarks .......: Nice name Shonnie! ; ; Author[s] .....: T_LOKZz, Shonnie ; AutoIt Version.: 3.2.12.1 ;===================================================================== #include <WinINet.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListBoxConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <File.au3> #include <GUIEdit.au3> #include <GUIComboBox.au3> #include <GUIListBox.au3> ;~ =================================================================== ;~ StartUp (Declare Vars) ;~ =================================================================== Opt("GUIOnEventMode", 1) Global $sServerName, $iServerPort, $sUsername, $sPassword, $iPauseTime, $sDirectory, $sFilenameFilter, $hInternetOpen, $hInternetConnect, $avFtpFile, $Host, $Username, $Password, $Loaded Global $GUI2, $HostIn, $UsernameIn, $PasswordIn, $Form1 $FileDir = @AppDataDir & "\FuckTheProtocol\" ;~ =================================================================== ;~ Activate FTP Funcs ;~ =================================================================== _WinINet_Startup() ;~ =================================================================== ;~ GUI ;~ =================================================================== $GUI = GUICreate("Fuck The Protocol", 415, 483, -1, -1) $Info = GUICtrlCreateEdit("", 8, 56, 393, 105, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_BORDER, $WS_VSCROLL)) GUICtrlSetData(-1, "") $FTPDir = GUICtrlCreateList("", 8, 184, 393, 253) GUICtrlSetOnEvent(-1, "_FTPEvent") GUICtrlCreateLabel("Profile:", 8, 16, 45, 20) GUICtrlSetFont(-1, 11, 400, 0, "MS Sans Serif") $Profile = GUICtrlCreateCombo("", 56, 16, 129, 25) GUICtrlSetData(-1, "|New") GUICtrlSetOnEvent(-1, "_ProfileEvent") _GenerateList($Profile, $FileDir) $Button1 = GUICtrlCreateButton("Connect", 192, 16, 59, 17, 0) GUICtrlSetOnEvent(-1, "_Connect") $Button2 = GUICtrlCreateButton("Disconnect", 271, 17, 59, 17, 0) GUICtrlSetOnEvent(-1, "_CleanUp") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetState(@SW_SHOW) ;~ =================================================================== ;~ Infinite Loop ;~ =================================================================== While 1 Sleep(200) WEnd ;~ =================================================================== ;~ Establish FTP Connection with variables in GUI ;~ =================================================================== Func _Connect() $sServerName = $Host $iServerPort = 21 $sUsername = $Username $sPassword = $Password $iPauseTime = 3000 $sDirectory = "/" $sFilenameFilter = "*" $hInternetOpen = _WinINet_InternetOpen("AutoIt/" & @AutoItVersion) $hInternetConnect = _WinINet_InternetConnect($hInternetOpen, $INTERNET_SERVICE_FTP, $sServerName, $iServerPort, 0, $sUsername, $sPassword) _GUICtrlEdit_AppendText($Info, _WinINet_InternetGetLastResponseInfo()) _EnumFTP() EndFunc ;==>_Connect ;~ =================================================================== ;~ Enumerate all the files in the FTP ;~ =================================================================== Func _EnumFTP() If _WinINet_FtpSetCurrentDirectory($hInternetConnect, $sDirectory) Then $avFtpFile = _WinINet_FtpFindFirstFile($hInternetConnect, $sFilenameFilter) While Not @error GUICtrlSetData($FTPDir, DllStructGetData($avFtpFile[1], "FileName") & @CRLF) _WinINet_InternetFindNextFile($avFtpFile[0], DllStructGetPtr($avFtpFile[1])) WEnd EndIf EndFunc ;==>_EnumFTP ;~ =================================================================== ;~ FTP Funcs ;~ =================================================================== Func _FTPEvent() $CurFile = _GUICtrlListBox_GetText($FTPDir, _GUICtrlListBox_GetCurSel($FTPDir)) _FTPFileGui($CurFile) _GUICtrlEdit_AppendText($Info, _WinINet_InternetGetLastResponseInfo()) EndFunc ;==>_FTPEvent Func _FTPFileGui($CurFile) $Form1 = GUICreate("FileInfo", 352, 169, 193, 125) GUICtrlCreateLabel("File:", 48, 24, 30, 21) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateLabel("Size:", 48, 60, 38, 21) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateLabel($CurFile, 83, 24, 200, 21) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $hFtpOpenFile = _WinINet_FtpOpenFile($hInternetConnect, $CurFile, $GENERIC_WRITE) $hFtpFileSize = _WinINet_FtpGetFileSize($hFtpOpenFile) GUICtrlCreateLabel($hFtpFileSize & " kb", 88, 60, 200, 21) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateButton("Delete", 16, 120, 75, 25, 0) GUICtrlSetOnEvent(-1, "_DeleteFile") GUICtrlCreateButton("Download", 128, 120, 75, 25, 0) GUICtrlSetOnEvent(-1, "_DownloadFile") GUICtrlCreateButton("Rename", 242, 120, 75, 25, 0) GUICtrlSetOnEvent(-1, "_RenameFile") GUISetOnEvent($GUI_EVENT_CLOSE, "_CloseFileGUI") GUISetState(@SW_SHOW) EndFunc ;==>_FTPFileGui Func _DeleteFile() EndFunc ;==>_DeleteFile Func _DownloadFile() EndFunc ;==>_DownloadFile Func _RenameFile() EndFunc ;==>_RenameFile Func _CloseFileGUI() GUIDelete($Form1) EndFunc ;==>_CloseFileGUI ;~ =================================================================== ;~ Profile Funcs ;~ =================================================================== Func _ProfileEvent() Local $CurSel = GUICtrlRead($Profile) If $CurSel = "New" Then _NewProfile() Else _LoadProfile($CurSel) EndIf EndFunc ;==>_ProfileEvent Func _NewProfile() $GUI2 = GUICreate("New Profile", 285, 144, -1, -1) GUICtrlCreateLabel("Host:", 24, 16, 42, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $HostIn = GUICtrlCreateInput("ftp.somehost.com", 64, 16, 185, 21) GUICtrlCreateLabel("Username:", 24, 49, 82, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $UsernameIn = GUICtrlCreateInput("user@somehost.com", 106, 49, 143, 21) GUICtrlCreateLabel("Password:", 21, 80, 77, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $PasswordIn = GUICtrlCreateInput("", 98, 81, 150, 21, $ES_PASSWORD) GUICtrlCreateButton("Save", 184, 112, 75, 25, 0) GUICtrlSetOnEvent(-1, "_NewProfileHelper") GUISetOnEvent($GUI_EVENT_CLOSE, "_ExitNew") GUISetState(@SW_SHOW) EndFunc ;==>_NewProfile Func _NewProfileHelper() If Not FileExists($FileDir) Then DirCreate($FileDir) $Host = GUICtrlRead($HostIn) $Username = GUICtrlRead($UsernameIn) $Password = GUICtrlRead($PasswordIn) $FileName = StringTrimRight($Username, 4) $File = $FileDir & $FileName & ".ini" _FileCreate($File) IniWrite($File, "Settings", "Host", $Host) IniWrite($File, "Settings", "Username", $Username) IniWrite($File, "Settings", "Password", $Password) _GUICtrlEdit_AppendText($Info, "New Profile Created: " & $FileName & @CRLF) _LoadProfile($FileName) _GenerateList($Profile, $FileDir) GUIDelete($GUI2) EndFunc ;==>_NewProfileHelper Func _ExitNew() GUIDelete($GUI2) EndFunc ;==>_ExitNew Func _LoadProfile($CurSel) $File = $FileDir & $CurSel & ".ini" $Host = IniRead($File, "Settings", "Host", "") $Username = IniRead($File, "Settings", "Username", "") $Password = IniRead($File, "Settings", "Password", "") _GUICtrlEdit_AppendText($Info, "Loaded Profile: " & $CurSel & @CRLF) EndFunc ;==>_LoadProfile Func _GenerateList($hListToUse, $vDirectoryToSearch) $aFileList = _FileListToArray($vDirectoryToSearch, "*.ini") For $i = 1 To UBound($aFileList) - 1 $fil = String($aFileList[$i]) $filee = StringTrimRight($fil, 4) GUICtrlSetData($hListToUse, $filee) Next EndFunc ;==>_GenerateList ;~ =================================================================== ;~ Close FTP Connections and ShutDown App ;~ =================================================================== Func _CleanUp() _WinINet_InternetCloseHandle($hInternetConnect) _WinINet_InternetCloseHandle($hInternetOpen) _GUICtrlEdit_AppendText($Info, "Closed connection to: " & $Host & @CRLF) GUICtrlSetData($FTPDir, "") EndFunc ;==>_CleanUp Func _Exit() _CleanUp() _WinINet_Shutdown() Exit EndFunc ;==>_Exit
-
np
-
Opt("PixelCoordMode", 2)
-
Ok looked through it and could get proccess info and such and mem usage but no CPU usage funcs I need to check how much CPU usage a certain proccess is using I'm not a noob I know it will spike but I will have a timer on it so if its at like 60+ for more then 20 secs it will kill process Thnx in ahead
-
Ok looked through it and could get proccess info and such and mem usage but no CPU usage funcs I need to check how much CPU usage a certain proccess is using I'm not a noob I know it will spike but I will have a timer on it so if its at like 60+ for more then 20 secs it will kill process Thnx in ahead
-
Thank you a lot First GUI project and you have helped a lot Thanks
-
Thank you very much on that Also about the Label... how can I make it just have the text show up and now the box with it?
-
Ok I made a program and want to make a fancy GUI now. I put together an image that will be the gui... I use $WS_POPUP properly to eliminate the border and such Now as you can tell the sides and such make it have white when I create it within a picture #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Auto-Awesom", 338, 207, 1, 1, $WS_POPUP) $Pic1 = GUICtrlCreatePic("C:\Users\T_LOKZz\Desktop\main.gif", 0, 0, 337, 206, -1, $GUI_WS_EX_PARENTDRAG) $Label1 = GUICtrlCreateLabel("Label1", 56, 72, 220, 17) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd It makes white around it Also... How can I make a label without the box around it. Even if I set it to black you can tell a differnce... The label will not stay the same as it will change If you need more information just ask
-
Made a tool that will get x/y coordinates for MouseClick... will automatically add Opt("MouseCoordMode", 2) WinTitle() WinWaitActive() Will add those again if win title changes F1 grabs coordinates and F2 clears clipboard Its all saved in clip board Sample Output: Opt("MouseCoordMode", 2) WinActivate("AutoIt Forums -> Posting New Topic - Mozilla Firefox") WinWaitActive("AutoIt Forums -> Posting New Topic - Mozilla Firefox") MouseClick("left", 121, 103) WinActivate("Awesom-O • User Control Panel • Compose message - Mozilla Firefox") WinWaitActive("Awesom-O • User Control Panel • Compose message - Mozilla Firefox") MouseClick("left", 132, 73) WinActivate("Getting Started with Firefox - Mozilla Firefox") WinWaitActive("Getting Started with Firefox - Mozilla Firefox") MouseClick("left", 228, 74) Source: Opt("MouseCoordMode", 2) $win2 = "" ClipPut('Opt("MouseCoordMode", 2)') HotKeySet("{F1}", "_GetPos") HotKeySet("{F2}", "_ClearClip") While 1 Sleep(500) WEnd Func _GetPos() $anothertemp = @CRLF $mousepos = MouseGetPos() $win = WinGetTitle("") If $win <> $win2 Then $anothertemp &= 'WinActivate("' & $win & '")' & @CRLF & 'WinWait("' & $win & '")' & @CRLF $anothertemp &= 'MouseClick("left", ' & $mousepos[0] & ", " & $mousepos[1] & ")" ClipPut(ClipGet() & $anothertemp) $win2 = $win EndFunc Func _ClearClip() ClipPut('Opt("MouseCoordMode", 2)') $win2 = "" EndFunc
-
tyvm for all your help, u have helped out a lot!
-
ahhh, now wut if I add a GUICtrlSetOnEvent(-1, "_MyEvent") after, is there a way to find the text of the checkbox that called the func? or wuld I have to jus do a complex save func? Save probably the proper way anyways
-
just thought array's couldnt hold a checkbox
-
I wan't to know if you use like Dim $CheckBox[5] For $i = 0 To 4 $Checbkox[$i] = GUICtrlCreateCheckbox("", 45, 45) Next Or something like that. I read a lua file and parse it and want to put them into a GUI. I don't wanna use set checkboxes because the wut the lua will have is random. Heres the func I have atm Func _Populate() Local $Quality, $String, $Temp $Count = 55 Dim $includes _FileReadToArray($luaincludes, $includes) For $i = 1 To $includes[0] If StringInStr($includes[$i], "Lua") <> 0 Then If StringInStr($includes[$i], "Magic") <> 0 Then $Quality = "Magics" ElseIf StringInStr($includes[$i], "Other") <> 0 Then $Quality = "Others" ElseIf StringInStr($includes[$i], "Rare") <> 0 Then $Quality = "Rares" ElseIf StringInStr($includes[$i], "Set") <> 0 Then $Quality = "Sets" ElseIf StringInStr($includes[$i], "Unique") <> 0 Then $Quality = "Uniques" ElseIf StringInStr($includes[$i], "White") <> 0 Then $Quality = "Whites" EndIf If $Quality <> "" Then $String = (StringLen($includes[$i]) - StringInStr($includes[$i], "lua")) + 2 $String = StringTrimRight($includes[$i], $String) $Temp = StringInStr($String, StringTrimRight($Quality, 1)) $String = StringTrimLeft($String, $Temp + StringLen($Quality)) $Temp = StringUpper(StringLeft($String, 1)) $String = StringTrimLeft($String, 1) $String = _StringInsert($Temp, $String, 1) If _GUICtrlTab_FindTab($GUITab, $Quality) = -1 Then GUICtrlCreateTabItem($Quality) $count = 55 EndIf GUICtrlCreateCheckbox($string, 45, $count) $count += 20 EndIf EndIf Next GUISetState(@SW_SHOW, $GUI) EndFunc If you need all the code or the lua file I'm parsing lmk. Thanks in advance!
-
Um, Help? Edit: http://www.autoitscript.com/forum/index.ph...l=pixelgetcolor Found That and it seems that Vista Ultimate's Aero Theme was messing it up
-
How to properly take PixelGetColor and use them in your scripts because I used this: HotKeySet("{F1}", "Check") Opt("MouseCoordMode", 2) Opt("PixelCoordMode", 0) While 1 Sleep(100) WEnd Func Check() $K = MouseGetPos() MouseMove(50,50,0) Sleep(100) $Color = PixelGetColor($K[0], $K[1], WinGetHandle(WinGetTitle(""), "")) ClipPut("If PixelGetColor(" & $K[0] & ", " & $K[1] & ") = " & $Color & " Then") EndFunc And it doesn't work properly. I'm using this to check if your in a game Diablo II, It will check if a certain pixel exists n an area that it only exists when your in game SS: http://img295.imageshack.us/img295/2267/18833832aq9.jpg Now, would PixelChecksum be better?