Jump to content

IchBistTod

Active Members
  • Posts

    255
  • Joined

  • Last visited

Recent Profile Visitors

639 profile views

IchBistTod's Achievements

Universalist

Universalist (6/7)

3

Reputation

  1. I was wondering if it was possible to auto-scroll a text box(edit control) so that it automatically scrolls the full height of the control (like a chat window) and if so how would I do it? Thanks a lot.
  2. Okay I'm making a simple AV scanner for the registry and startup dir to detect certain viruses. The problem is I cant properly identify a string in a string it always returns false. here is how I make the signitures $file = FileOpen("C:\Users\Owner\AppData\Local\Google\Chrome\Application\chrome.exe", 8) $data = binary(FileRead($file)) $length = StringLen($data) $start = random(0, $length/Random(2,4,1), 1) $sig = StringMid($data, $start, 500) FileWrite("DB.mwi", $sig&",") Give a DB like 050D24B004CD24B0048D24B0050CD4B0040D24B003CD24B004CCD4B0034D24B0030D24B002CD24B0028D24B0024D24B0020D24B001CD24B00D8B74B0018D24B008C8F4B0048CD4B0014D24B0010D24B000CD24B0008D24B0044CD4B0000D24B00FCD14B0040CD4B00F8D14B003CCD4B00F0D14B0038CD4B0034CD4B0030CD4B00E8D14B00E4D14B00E0D14B002CCD4B00DCD14B00D8D14B00D4D14B00D0D14B00CCD14B00C8D14B0084AE4B00C4D14B00C0D14B00C0864B00BCD14B0028CD4B0024CD4B00B0D14B00ACD14B00A8D14B0020CD4B00A4D14B001CCD4B00A0D14B0018CD4B0014CD4B0010CD4B000CCD4B0098D14B0008CD4B0094D,03F8B4DF4C7070F000000E926FFFFFFA90000FF0074168B7E040FBE573F8BC8C1E910884C3A4C8B4E04FE413F8B4DF4A900FF000074198B7E040FBE573F8BC8C1E908884C3A4C8B4E04FE413F8B4DF48B56040FBE7A3F8844174C8B46048B7D0CFE403FC7070F000000E9C7FEFFFF0FB7500233DB6685D20F94C34B83E31081C3D9000000EB120FB750026685D20F848A010000BBE800000033D2668950028B55E8B800010000663942067558817DDC710A0000754F03C8518B0D24724C00E87D17010084C0743A8B4DE88B7DF833C0668941028BC3C1E0100D00E800000BD88B45EC2B4608D1F8483B7DF00F83C600000081FBFF00000076458, Pretty Clean so far, however when I go to scan using this code func _checkdb($string) $strings = FileRead(@scriptfullpath&"\DB.mwi") $strings = StringSplit($strings, ",") if $strings[0] > 0 Then $file = FileOpen($string, 8) $data = binary(FileRead($file)) for $i = 1 to $strings[0] if StringInStr($data, $strings[$i]) then $ret += 1 ConsoleWrite($ret&"*"&@CRLF) EndIf next EndIf EndFunc I get nothing.
  3. Lets say I have an exe that I want to dlete but it is running, how do I find the process and kill it?
  4. I fixed it with code $hPDHQuery=_PDH_GetNewQueryHandle() $aCPUCounters=_PDH_GetCPUCounters($hPDHQuery,$sPCName) $iTotalCPUs=@extended _PDH_CollectQueryData($hPDHQuery) Sleep(50) $cpu = "" _PDH_CollectQueryData($hPDHQuery) For $i=0 To $iTotalCPUs-1 $iCounterValue=_PDH_UpdateCounter($hPDHQuery,$aCPUCounters[$i][1],1,True) ConsoleWrite($iCounterValue&@CRLF) $cpu = $iCounterValue&"%" Next _PDH_FreeQueryHandle($hPDHQuery) _PDH_UnInit()
  5. I tried with the following code $hPDHQuery=_PDH_GetNewQueryHandle() $aCPUCounters=_PDH_GetCPUCounters($hPDHQuery,$sPCName) $iTotalCPUs=@extended _PDH_CollectQueryData($hPDHQuery) _PDH_CollectQueryData($hPDHQuery) $cpu = 0 For $i=0 To $iTotalCPUs-1 $iCounterValue=_PDH_UpdateCounter($hPDHQuery,$aCPUCounters[$i][1],0,True) If $i<>$iTotalCPUs-1 Then $cpu&=$iCounterValue&" %" Else $cpu&=$iCounterValue&"%" EndIf Next _PDH_FreeQueryHandle($hPDHQuery) _PDH_UnInit() But the result I get is. "00 %0 %0%"
  6. I've looked all over the help file but cant seem to find this simple answer. How do I get the CPU load percentage?
  7. Also I have removed the buffer problem, and also accidental exit of the application by adding some checks and balances to make sure the GUIs only accept commands to their respective windows (using the advanced guigetmsg paramter as melba suggested) to stop the parent gui from accepting messages while the child window is open, and to stop the guis from accepting messages from one another.
  8. This is not the case the GUI dissapears regardless of if there are commands in the buffer or not, thanks for the advice though. I have isolated the CAUSE, if the msgbox is a child to the child window, the specified behavior occurs, however if is a child to the parent, the specified behavior does not. I believe this may be a bug in autoit source as this should not logically happen. Either way a WinActivate() is required to keep the GUIs in order (as assigning the parent, asthe parent of the msgbox puts the child gui behind the parent gui and requires that it be brought back to the front) Thanks for your help, but if this is not a bug in the autoit source code, then what logical cause could be behind this happening?
  9. This error really isnt logically making any sense Okay I click the Support button(bottom-left) and an additional GUI pops up with independent variables(I'VE TRIED USING BOTH GLOBAL AND LOCAL VARIABLES). When I close the second gui without clicking on anything it deletes the second GUI properly, however when I interact with the second gui by clicking the emergency support button, then attempt to close the secondary GUI, BOTH guis are deleted. Here is my code, any insight would be very helpful. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("MedWare, Inc. Support Center", 341, 388, -1, -1, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE)) GUISetBkColor(0xFFFFFF) $Button3 = GUICtrlCreateButton("Button1", 180, 16, 135, 160, $BS_BITMAP) GUICtrlSetImage(-1, "img04.bmp", 0) $Button4 = GUICtrlCreateButton("Button1", 16, 16, 135, 160, $BS_BITMAP) GUICtrlSetImage(-1, "img03.bmp", 0) $Button5 = GUICtrlCreateButton("Button1", 16, 202, 135, 160, $BS_BITMAP) GUICtrlSetImage(-1, "img02.bmp", 0) $Button8 = GUICtrlCreateButton("Button1", 180, 202, 135, 160, $BS_BITMAP) GUICtrlSetImage(-1, "img05.bmp", 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $button5 _support() EndSwitch WEnd func _support() Global $Form1_1 = GUICreate("Support", 182, 146, -1, -1, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE)) Local $Button1_1 = GUICtrlCreateButton("Email Support", 8, 8, 163, 17, 0) Local $Button2_2 = GUICtrlCreateButton("Telephone Support", 8, 35, 163, 17, 0) Local $Button3_3 = GUICtrlCreateButton("FAQ Center", 8, 60, 163, 17, 0) Local $Button4_4 = GUICtrlCreateButton("EMERGENCY SUPPORT", 1, 96, 179, 49, 0) GUICtrlSetFont(-1, 9.5, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) GUICtrlSetTip(-1, "For emergencies only") GUICtrlSetCursor (-1, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete($Form1_1) ExitLoop Case $button4_4 Local $msg = MsgBox(20, "Warning", "This feature will contact ALL support reprentitives by text message for support at ANY hour day or night for immediate support, and the first one able to respond will do so. There is a $20 fee assesed to your account for the use of this feature, please use this feature only in situations where a technological emergency is present. Are you sure you wish to continue?") ConsoleWrite($msg&@CRLF) EndSwitch WEnd Return EndFunc
  10. I have a gui that can be resized but I want the gui to not be able to go under its original size. Like how do I stop from resizing smaller than a certain size?
  11. Nevermind I figured it out on my own =]
  12. I know there is a printing UDF but I cant seem to figure out a small problem I have. I have an application that looks at ticket IDs to see if a ticket is valid or not. at the moment we are writing the ticket IDs ont he tickets by hand, which is taking FOREVER. There is a little white box in the bottom right corner of the ticket for the ticket ID and the tickets are 400x200 and print out 6 to a page So my question is how would I use autoit to automatically place the IDs int he square then print then out? Like overlay text(the Id) on am image(the ticket) using GDI(which I have no Idea how to use) then print them out 6 to a page, or even though its a waste of paper, if thats not possible, just print them out one to a page? Any help would be much appreciated.
  13. wow that is amazing! I had no idea that the process could be simplified to such a small amount of code. I suppose i should really start to learn these GUIRegisterMsg(0x0111, "On_WM_COMMAND") and other "registermessage"'s any advice on where to look to learn more about them?
  14. The reason I ask this is because I have a series of input boxes next to one another and when one has been filled out I want to switch to the next. I know its gonna take some coding magic to make users be able to go back in the sequence and start from the point they selected(eg: they typed a wrong letter). Its a product key input GUI. I already have it verifying the product key algorithm and telling the user if input is invalid before allowing them to continue.
×
×
  • Create New...