n9mfk9 0 Posted April 25, 2005 I made this script with autoiy bata 3.113 so i could use the com interface once start this script i went this script to run as long as a program is runing an I went it to write to a file every 5 min thank for any help Dim $omUIV $omUIV = ObjCreate("UIView32.clsUIV") MsgBox(0, "", "TEST" &$omUIV.intStationCount ) Dim $file $file = FileOpen("yourIncludeFile.js", 2) ; Check if file opened for writing OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWrite($file, "var number="&$omUIV.intStationCount) FileClose($file) Share this post Link to post Share on other sites
bshoenhair 0 Posted April 25, 2005 Check Out: AdlibEnable ( "function" [, time] ) Share this post Link to post Share on other sites
Blue_Drache 260 Posted April 25, 2005 (edited) Check Out:AdlibEnable ( "function" [, time] )<{POST_SNAPBACK}>If Mod(@MIN, 5) = 0 And $mod = 0 Then ControlClick($hwndTally, "", $buttonRefresh, $primary, 1) $mod = 1; flag variable. This is so that a button isn't clicked like mad, once every 20 msec for a full minute. ElseIf Mod(@MIN, 5) > 0 And $mod = 1 Then ; this is to reset the flag variable, once we're no longer evenly divisible. $mod = 0 EndIfThis little snippet runs inside my main GUI loop and gets executed every 20 ms or so. It only clicks the "refresh" button once when the system clock's minutes are evenly divisible by five. I'm sure that you could easily modify it to update a file.Mod(number,divisor) (or Modulus)Returns zero if the number is evenly divisible. Otherwise Mod will return the remainder. Edited April 25, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Share this post Link to post Share on other sites