Jump to content

BSmit

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by BSmit

  1. Thank you kylomas!! you are awesome, "runwait" solved my problem!
  2. no sorry, what i mean is that when the user moves the mouse again , the script should "sleep" until the system gets idle again and then start notepad.exe once NO User activity for like 5 secs (in this example) -> start Notepad.exe once and when the user moves the mouse again , do nothing (and wait until the system gets idle again , then start notepad.exe ONCE)
  3. sorry, then i wasn't clear .... i really just want to run notepad.exe once and when the input is back , the script "waits" until the system gets idle again im trying all kinds of things and keep ya guys up2date
  4. Hi Kylomas, The code in post #10 keeps starting new instances of notepad.exe while the system is Idle i added "msgbox($mb_ok,'test','test ok') underneath run("notepad.exe") and now it starts notepad.exe only once but the user has to click the messagebox
  5. yes Im experimenting with AutoIT and im just trying to make a script that runs a program when there isnt any user activityfor a certain amount of time It works great so far, only problem is, is that it keeps running the program until the user moves the mouse...(and my goal is to run the program once, until the user moves the mouse)
  6. Exactly! you are right , the only problem with Exitloop is , is that it closes the whole script. when the system is idle for like 5 secs , it starts notepad.exe (and only once) but it also 'kills' the script itself. Im trying to make a script that A) starts notepad.exe when the system is idle (for 5 secs). when the input is back, it (the scripts basically "waits" until its idle again for 5 secs , then starts notepad.exe (once) Thank you for your fast replies!
  7. Thank you - compiled your version but it has the same behaviour here: - It starts notepad.exe after 6 secs and then starts it again 5 secs later, and then again ...( but i just want to start notepad.exe once after 5 secs)
  8. Sorry i must over look something, can you please show me what you changed in the source ?
  9. Thank you ! im gonna try it right now quickly
  10. Hi Kylomas, I compiled your version of the script but it also keeps starting notepad.exe
  11. i think i need to use something like this : http://www.autoitscript.com/autoit3/docs/keywords/ExitLoop.htm Or maybe "DO .....Until" Playing with some examples from this site
  12. thank you for your reply Satanttin My code so far ..: #include <Constants.au3> #include <winapiex.au3> local $count_down = 5 * 60 * 100 local $old_idle_time = 0, $secs, $mins, $diff while 1 sleep(1000) ; idle for a sec if $old_idle_time > _winapi_getidletime() then $old_idle_time = _winapi_getidletime() if _winapi_getidletime() > $count_down then ; run("notepad.exe") ;exit ; endif $diff = int( $count_down - _winapi_getidletime() ) $secs = int(Mod($diff, 60000)/1000) $mins = Mod(Int($diff / 60000), 60) wend
  13. Hello autoIT experts, Im new to AutoIT and trying to make a script that starts notepad.exe when there isnt any user activity on our Windows7 PC for like 3 minutes Problem is that the script keeps starting notepad (until i for example hit the ENTER button) Hope someone can help
×
×
  • Create New...