Jump to content

Hooch

Active Members
  • Posts

    225
  • Joined

  • Last visited

Hooch's Achievements

Polymath

Polymath (5/7)

0

Reputation

  1. Hmm Im on XP, tried the quick backup, pointed destination to c:\temp and it said complete but no backup file in target directory....
  2. ... for my anti-idle, which I run in my startup so I never idle out, uses the "INSERT" key. This doesn't affect any part of my gameplay and counts as a key event.
  3. I put some thought into this same type of script. The first thing I tried was to see if when I left the bg that I was still in the exact same position in front of the battlemaster, I wasn't. That kind of blows the whole idea. I only tried it once mind you. Beyond that you would ideally like to not sit at the spawn point idling. Much more likely to be reported. Instead I thought of the old mod, autotravel, that was broken by requiring a key event to actually move. If you could resurrect that mod and use Autoit to perform the key presses you could have your character move to some other position in the battleground and, in my case, just hide. A possible way to beat the first problem of entering the bg may be to use a macro to /target the battlemaster, that works, then pixel search for the green ring at the base of the targeted NPC, turning the character if needed. Then you could just click higher up on the same x-axis and aquire the entrance dialog. It would also be useful to watch for incomming whispers and issue some ambiguos reply. Maybe even do a /logout if you receive more than 4-5 whispers.
  4. Loves it.... My only problem with it is that in a dual monitor config it snaps to the left side of the main monitor but my secondary in on the left, so the "hidden" portion of the bar is visible on the second monitor..
  5. Ok, what I want to do: Get a list of running processes, identify the java process running as a particular user, lets say "steve", and then kill it. I was unable to find a way to get the owner of a process so I took a suggestion from the forum and tried to filter it by the directory the process is running out of. This seemed to be a good approach as when I was testing it seemed to work. Now however the same kind of testing is showing the process running from the home dir of the JRE and not where the jar file is located. Why this behaivor changed I am not sure but either way I have to deal with it. So below is my current code, if anyone has any ideas I am all ears... ;===================================== ;~ Runtime ;~ Aquire a list of all running java processes ;~ Isolate the ones that are run from $killMe ;~ ("C:\home\nbatch\PROD\batchExecutable") ;~ Terminate the process ;===================================== #include <Array.au3> $killMe = "C:\home\nbatch\PROD\batchExecutable" $grossProcessList = _runningEXE() $myProcessList = '' ;~ _ArrayDisplay ( $grossProcessList, "Array Display" ) For $i = 1 To UBound($grossProcessList) - 1 if StringInStr($grossProcessList[$i], "java.exe") then $myProcessList = $myProcessList & $grossProcessList[$i] & @LF endIf Next local $myProcessArray = StringSplit($myProcessList, @LF) For $i = 1 to UBound($myProcessArray) - 1 If StringInStr($myProcessArray[$i], $killMe) Then local $thisProcess = $myProcessArray[$i] local $myPIDstring = StringSplit($thisProcess, "|") local $myPID = $myPIDstring[2] ProcessClose($myPID) endIf Next ;===================================== ;~ Functions ;===================================== Func _runningEXE() Local $a_ProcessList = ProcessList() Local $a_DummyProcessList For $iProcessList = 1 To $a_ProcessList[0][0] $a_DummyProcessList = $a_DummyProcessList & GetProcessName($a_ProcessList[$iProcessList][1]) & "|" & $a_ProcessList[$iProcessList][1] & Chr(01) Next Return StringSplit(StringTrimRight($a_DummyProcessList, 1), Chr(01)) EndFunc ; Func GetProcessName(ByRef $PID) Local $Process, $Modules, $Ret Const $PROCESS_QUERY_INFORMATION = 0x0400 Const $PROCESS_VM_READ = 0x0010 $Process = DLLCall("kernel32.dll","hwnd","OpenProcess","int", _ BitOR($PROCESS_QUERY_INFORMATION,$PROCESS_VM_READ),"int",0,"int",$PID) If $Process[0] = 0 Then Return SetError(1) $Modules = DLLStructCreate("int[1024]") DLLCall("psapi.dll","int","EnumProcessModules","hwnd",$Process[0],"ptr",DllStructGetPtr($Modules), _ "int",DllStructGetSize($Modules),"int_ptr",0) $Ret = DLLCall("psapi.dll","int","GetModuleFileNameEx","hwnd",$Process[0],"int",DllStructGetData($Modules,1), _ "str","","int",2048) $Modules = 0 If StringLen($Ret[3]) = 0 Then Return SetError(1) Return $Ret[3] EndFunc ;
  6. Had an obvious error in my last post, so here is a script that will look for a process running from a specified directory and terminate it. This version only deals with java.exe processes though... ; $killMe = "path\to\my\process.exe" $grossProcessList = _runningEXE() $myProcessList = '' For $i = 1 To UBound($grossProcessList) - 1 if StringInStr($grossProcessList[$i], "java.exe") then $myProcessList = $myProcessList & $grossProcessList[$i] & @LF endIf Next ; local $myProcessArray = StringSplit($myProcessList, @LF) For $i = 1 to UBound($myProcessArray) - 1 If StringInStr($myProcessArray[$i], $killMe) Then local $thisProcess = $myProcessArray[$i] local $myPIDstring = StringSplit($thisProcess, "|") local $myPID = $myPIDstring[2] ProcessClose($myPID) endIf Next ; Func _runningEXE() Local $a_ProcessList = ProcessList() Local $a_DummyProcessList For $iProcessList = 1 To $a_ProcessList[0][0] $a_DummyProcessList = $a_DummyProcessList & GetProcessName($a_ProcessList[$iProcessList][1]) & "|" & $a_ProcessList[$iProcessList][1] & Chr(01) Next Return StringSplit(StringTrimRight($a_DummyProcessList, 1), Chr(01)) EndFunc ; Func GetProcessName(ByRef $PID) Local $Process, $Modules, $Ret Const $PROCESS_QUERY_INFORMATION = 0x0400 Const $PROCESS_VM_READ = 0x0010 $Process = DLLCall("kernel32.dll","hwnd","OpenProcess","int", _ BitOR($PROCESS_QUERY_INFORMATION,$PROCESS_VM_READ),"int",0,"int",$PID) If $Process[0] = 0 Then Return SetError(1) $Modules = DLLStructCreate("int[1024]") DLLCall("psapi.dll","int","EnumProcessModules","hwnd",$Process[0],"ptr",DllStructGetPtr($Modules), _ "int",DllStructGetSize($Modules),"int_ptr",0) $Ret = DLLCall("psapi.dll","int","GetModuleFileNameEx","hwnd",$Process[0],"int",DllStructGetData($Modules,1), _ "str","","int",2048) $Modules = 0 If StringLen($Ret[3]) = 0 Then Return SetError(1) Return $Ret[3] EndFunc ;
  7. mmm works nicely except, unlike the topic of that thread, the process I need access to is not visible as it is a background java process, no window.... Perhaps I can massage it..
  8. Yup that would suffice!
  9. Hey all, I need to write a script to shut down a java.exe process. The problem is I can't use a shotgun and take out any and all java.exe processes, I need to kill the one owned by a particular user (dummy batch process id) Looking at the available functions I don't see a way to access that information. A forum search was unenlightening. Thoughts?
  10. I didn't know you could program for the controller. I have been waiting for the scene to hack the 360 so it is mod ready...
  11. AH yes, very nice implemetation. Love it.
  12. Hey guys, Ok, first off I have the latest beta and the latest scite install. I have an app I wrote that uses GuiTab.au3, when I try to beta run it from the menu in Scite I get.... C:\Program Files\AutoIt3\Include\GuiTab.au3 (217) : ==> Unknown function name.: However I can run the beta compile and the app runs just fine. Second issue, the "beta help" menu item under tools in Scite has the wrong path, it pops up an alert saying error while launching cannot find "beta/autoit3help.exe" The file is in there and I just made a direct shortcut to it but thought someone should know... ...oh and the function it complains about is DllStructCreate....
  13. Ah sweet, thanks guys
  14. Crap, I don't suppose there is a way to flush the sucker...
  15. Hey all, I recently tried to build a wrapper gui around some functionality that typically takes place in a cmd window. I harnessed the stout and in and hide the cmd window and tried using an edit control to display the ins and outs Anyways, it worked just fine but when left for a long time autoit would lose it's 'grip' on the stout and just not display it anymore. The cmd window was still runningin the background and doing things still, just no output reaching autoit. My only guess at this time is that there is a limited buffer on the edit control and once it fills up that's it. No error was thrown or anything, just stopped working. Any thoughts?
×
×
  • Create New...