Jump to content

kjcdude

Active Members
  • Posts

    137
  • Joined

  • Last visited

About kjcdude

  • Birthday 03/17/1988

Profile Information

  • Location
    Orange County, CA

kjcdude's Achievements

Adventurer

Adventurer (3/7)

0

Reputation

  1. I'm using _accessQueryLike() on a script that pulls from a database containing over a million financial transaction entries. I use the querylike to search for the current date's revenue and then it outputs it and is graphed in real time. One major issue I've been running into is the amount of time it takes for querylike to search through all those entries. It's currently taking about 5-6 seconds. It's fine that it's taking that long, but I have about 5 autoit scripts constantly pulling data every 30 seconds as well as the core server program writing data constantly. Is there anyway to tell querylike what line to start searching from? My goal would be to record where the querylike found the data last time and start searching from that point on next run. Thanks
  2. I've ran into the limit for the character limit transfered in the parameter field of ShellExecuteWait. Autoit pops the error "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access this item" with the exe trying to launch as the title. Does anyone know the exact character limit? Thanks
  3. From the suggestions above here's what I cam up with. Here's what I cam up with. I'm going to use _NowCalc() instead of the date variables for the start and end time. To calculate the time I'm going to use _DateDiff(s, $, $) then take that return and use _TicksToTime($ * 1000, $, $, $) to get a clean hour, min, sec return. Thanks for the all the help.
  4. I'm working on writing a function that can take in the difference between two full date/time strings and convert it back to date time. I imagine someone has written something like, if not I'll create my own. $start = @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC sleep(1000) $end = @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC $time = $end - $start I need to take the $time variable and output a clean difference output such as 00:00:01 Example times: Start: 20100416140654796 End: 20100416232951176 "Ticks": 92296380 Thanks
  5. I'm also wondering the same. I'd like to be able to add data to a spreadsheet that outputs to a graph for internal use.
  6. WindowFromPoint was exactly what I was looking for, worked perfectly. Little example of how I used it. #include <WinAPI.au3> Global $Struct = DllStructCreate($tagPoint) DllStructSetData($Struct, "x", 805) DllStructSetData($Struct, "y", 234) $mhwnd = _WinAPI_WindowFromPoint($Struct) while 1 Pos() $hwnd = _WinAPI_WindowFromPoint($Struct) if $mhwnd <> $hwnd Then MsgBox(0, "", "on top") EndIf ToolTip($hwnd & @CRLF & MouseGetPos(0) & " X " & MouseGetPos(1)) WEnd Func Pos() DllStructSetData($Struct, "x", MouseGetPos(0)) DllStructSetData($Struct, "y", MouseGetPos(1)) EndFunc ;==>Pos
  7. I'm looking for a function that can detect when a window is visible by the human eye. I know that WinGetState() will return if it exists, is "visible", enabled, and active. But that doesn't tell me if the window is covered or if it's visible by the human eye. From the tests I've run it will only return 7 even if the window is covered by another application, even a full screen application. The good thing is the window I'm monitoring is inside a script, so if I need to use a gui function that won't be a problem. Thanks for the help.
  8. Thanks to whoever created this. Very useful code to see when a guictrl is clicked on.
  9. I'm having a very weird issue getting data to stream from a console window into stdoutread. Here's the source code working without stdoutread so you can see what my goal is. I can't figure out any possible way to enter the prompts via rsync variables. Take a look at the two attached images for the prompts that come up. $v = "-r -v --progress admin@10.10.10.37:" & "'" & '"/share/Public/public/Games & Patches/Aion/"' & "'" & " /cygdrive/c/test/" ShellExecute("rsync.exe", $v, "C:\Program Files\cwRsync\bin", "open", @SW_HIDE) WinWait("C:\Program Files\cwRsync\bin\rsync.exe", "") $wa = WinWait("C:\Program Files\cwRsync\bin\rsync.exe", "") Sleep(1000) WinActivate($wa) WinWaitActive($wa) send("yes" & "{ENTER}") sleep(2000) WinActivate($wa) WinWaitActive($wa) send("admin" & "{ENTER}") while 1 Sleep(1000) Select Case ProcessExists("rsync.exe") = 0 MsgBox(0, "", "Process Closed") ExitLoop Case WinExists($wa) = 0 MsgBox(0, "", "Window Closed") ExitLoop EndSelect WEnd Here's the stdoutread code that i'm trying to use, but nothing streams to stdoutread. #include <Constants.au3> $v = "-r -v --progress admin@10.10.10.37:" & "'" & '"/share/Public/public/Games & Patches/Aion/"' & "'" & " /cygdrive/c/test/" $p = Run("C:\Program Files\cwRsync\bin\rsync.exe " & $v, "", @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD) while 1 $line = StdoutRead($p) MsgBox(0, "", $line) if ProcessExists($p) = 0 Then Exit WEnd
  10. I ran it live on 5 servers on Tuesday night and ran into no issues. Each server was handling about 160 clients with no issue. Thanks for the fix!
  11. Initial tests looks great, no failures so far. Running with 200 concurrent connections, everything is reporting correctly. I'm going to run my full version of the program on 5 servers next week. I'll report back with some more real world results. Thanks for the fix!
  12. Just saw this post. I'll test and report back with results.
  13. The reason for the extra if statement was to confirm twice for debugging out to the msgbox. The actual code is this: while 1 local $ct = WinGetTitle("Steam - Updating -", "") sleep(30000) Select Case WinGetTitle("Steam - Updating -", "") = $ct ProcessClose("steam.exe") FileDelete("C:\Program Files\Steam\ClientRegistry.blob") FileDelete("C:\Program Files\Steam\AppUpdateStats.blob") ShellExecuteWait("SteamService.exe", "/repair", "C:\Program Files\Steam\bin") run($gsteamlauncher) ExitLoop Case WinExists("Steam - Updating -", "") = 0 ExitLoop EndSelect WEnd I'll definitely try your suggestion, it looks to be a lot cleaner and more efficient than mine.
  14. winactivate("", "") winwaitactive("", "") send({MouseUp})
  15. I'm running into a very strange issue. It looks like a bug, but I'm not entirely sure. Here's the code with the error. while 1 local $ct = WinGetTitle("Steam - Updating -", "") sleep(30000) SplashTextOn("", "$CT = " & $ct & @CRLF & "Wingettitle = " & WinGetTitle("Steam - Updating -", ""), 300, 100, -1, -1, 16, "Veranda", 9) Select Case WinGetTitle("Steam - Updating -", "") = $ct if WinGetTitle("Steam - Updating -", "") = $ct Then MsgBox(0, "TRUE", "$CT = " & $ct & @CRLF & "Wingettitle = " & WinGetTitle("Steam - Updating -", "")) Else MsgBox(0, "FALSE", "$CT = " & $ct & @CRLF & "Wingettitle = " & WinGetTitle("Steam - Updating -", "")) EndIf ProcessClose("steam.exe") FileDelete("C:\Program Files\Steam\ClientRegistry.blob") FileDelete("C:\Program Files\Steam\AppUpdateStats.blob") ShellExecuteWait("SteamService.exe", "/repair", "C:\Program Files\Steam\bin") run($gsteamlauncher) ExitLoop Case WinExists("Steam - Updating -", "") = 0 ExitLoop EndSelect WEnd What will occur is it will provide a false positive. If the window is no longer open it will output 0 like it should, but case and the if statements return a TRUE result meaning "Steam - Updating - 81%" = "0" which it obviously doesn't. When there is an active title it will react correctly and provide a false statement as it should. As a temporary fix I changed the Case line to. Case WinGetTitle("Steam - Updating -", "") = $ct and WinGetTitle("Steam - Updating -", "") <> 0 See the attached screenshot for an example of the error.
×
×
  • Create New...