Jump to content

MaXiMiUS

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by MaXiMiUS

  1. This is what I wanted to do.. Func ReleaseAllKeys() For $i = 32 To 126 Send("{" & Chr($i) & " Up}") Next EndFunc But even after a very brief examination, it's obvious that won't work. I can't really think of a way to do this easily =/
  2. I have an old AutoHotKey script I'm trying to figure out how to convert to AutoIt3. A couple of the functions seem easy enough to copy over, but others, such as the Dll ones, I have no clue how to make work in AutoIt3. #SingleInstance force GroupAdd, Excludes, Windows Task-Manager ahk_class #32770 GroupAdd, Excludes, ahk_class _As12__TaskSwitchXP_TaskSwitchWnd_ GroupAdd, Excludes, ahk_class Progman GroupAdd, Excludes, ahk_class Shell_TrayWnd #IfWinNotActive, ahk_group Excludes ^F11:: Critical hWnd := WinActive("A") ToggleFullScreen(hWnd) Return ToggleFullScreen(ByRef hWnd) { ;IniFile := A_ScriptName ".tmp" ;IniRead, Array, %IniFile%, Handles, %hWnd%, Empty If 1 ;(Array="Empty") { hMenu := DllCall("GetMenu", "UInt", hWnd) WinGet, Maximized, MinMax DllCall("SetMenu", "UInt", hWnd, "UInt", 0) WinSet, Style, -0xC00000 WinSet, Style, -0x800000 WinSet, Style, -0x40000 WinMaximize WinMove, , , 0, 0, 1680, 1038 ; (1 680 - 24) / 1 047 = 1.58166189 ;IniWrite, %hMenu%`,%Maximized%, %IniFile%, Handles, %hWnd% } ;Else ;{ ;StringSplit, Array, Array, `, ;hMenu := Array1 ;Maximized := Array2 ;DllCall("SetMenu", "UInt", hWnd, "UInt", hMenu) ;WinSet, Style, +0xC00000 ;WinSet, Style, +0x800000 ;WinSet, Style, +0x40000 ;If !(Maximized) ; { ; WinRestore ; } ;IniDelete, %IniFile%, Handles, %hWnd% ;} } Just in case you're curious why I'm trying to do this, it's because I have some other code in AutoIt3, and I want to merge them. Any help you can provide is greatly appreciated :3
  3. Try ControlSend("Ragnarok Online Client Title", "", "", "String of Text to Send")
  4. It would be very useful if I could use MemGetStats() for certain programs. For example, let's say program.exe normally uses 50MB of memory. But sometimes, it encounters an error, and starts accumulating more and more memory. The big jumps are from 100MB to 150MB, 150MB to 250MB, 250MB to 400MB, 400MB to 650MB, and then it tops off at around 700-800MB. This is fairly easy to monitor with MemGetStats(), as the percentage goes from around 30%, to 40%, to 49%~. But the problem arises when other high-memory use programs are running. That 40% can suddenly become 60%, and it doesn't have anything to do with program.exe. Maybe there's some sort of MemGetStats(program.exe) ? Just a clarification: I don't have access to the source for this program, so I can't fix the memory leak. Only manage it.
  5. Does anybody know of a way to send keypresses to non-active windows? My script works, but it's a bit annoying, taking focus roughly every 5 minutes, minimizing whatever I was doing. Here's an example. I wish I could remove the BlockInput and WinActivate parts, though currently, it doesn't work properly without them. If I remove the BlockInput and click something, that window loses focus, and everything that was being sent goes into the wrong window. In this case, I'm not certain the WinActivate was needed, but I kept it there for consistancy. BlockInput(1);We don't want user input mixing with the script $begin2 = TimerInit() Run("TELNET 127.0.0.1 8888", "C:\WINDOWS\system32\", @SW_HIDE) Sleep(2048);Delay, allow program to exit if connection fails $nocrash = WinExists("Telnet 127.0.0.1");Check if this was successful $mem = MemGetStats() If $nocrash = 0 Or $mem[0] > 40 Then $nocrash = 0 Announce("", 1) EndIf WinActivate("Telnet 127.0.0.1");This must be active to recieve input Send("password{Enter}exit{Enter}") ProcessClose("telnet.exe") BlockInput(0) What I'd like to be able to do is: Send("password{Enter}exit{Enter}", "Telnet 127.0.0.1") Let me know if I've overlooked anything.
×
×
  • Create New...