n9mfk9 Posted April 25, 2005 Share 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) Link to comment Share on other sites More sharing options...
bshoenhair Posted April 25, 2005 Share Posted April 25, 2005 Check Out: AdlibEnable ( "function" [, time] ) Link to comment Share on other sites More sharing options...
Blue_Drache Posted April 25, 2005 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now