AdmiralAlkex Posted March 10, 2008 Posted March 10, 2008 No, I have read the helpfile, it returns a 1demension array, I thought maybe it would work if I just used $Pos, but maybe not, and its in a loop? read the posts above, you cant just come into a thread and post because of the last post.I have read every post in this thread and I even got the cookie, while you posted bugged code and you are complaining??Seriously man, you cant read a 1-dimensional array like a variable because they aren't the same thing and you would know that if you read the help-file or had some common sense. And the op wanted the script to WAIT UNTIL THE COMP IS IDLE!!! How can you do that if you only check one time?? A loop or adlib would work but your code wouldn't do a squat. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Swift Posted March 10, 2008 Posted March 10, 2008 (edited) I'm staying out of this. Edited March 10, 2008 by Swift
JustinReno Posted March 10, 2008 Posted March 10, 2008 (edited) At least I tried, all ive seen you do here is cry, post, and critize. Do some work before you yell at others.There is a plethora of things wrong in that sentence. Nobody cried, except you, a lot of people post here (Get used to it), and its not critisicism. He's not yelling, like you were.So your backing out? Edited March 10, 2008 by JustinReno
Nbanonimous Posted March 10, 2008 Author Posted March 10, 2008 (edited) iight now this is ridiculous back on topic... HOW DO I DO THIS? fuckin wait for idle then run program Edited March 10, 2008 by Nblufire12 Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com
AdmiralAlkex Posted March 10, 2008 Posted March 10, 2008 At least I tried, all ive seen you do here is cry, post, and critize. Do some work before you yell at others.I will only say this one more timeI got the cookie, while you posted bugged code and you are complaining?? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Nbanonimous Posted March 10, 2008 Author Posted March 10, 2008 wow off topic AGAIN Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com
Swift Posted March 10, 2008 Posted March 10, 2008 There is a plethora of things wrong in that sentence. Nobody cried, except you, a lot of people post here (Get used to it), and its not critisicism. He's not yelling, like you were.So your backing out? I don't want to make a fool of myself, like you already have.
JustinReno Posted March 10, 2008 Posted March 10, 2008 I don't want to make a fool of myself, like you already have.Haha, No.You have, not me.
cppman Posted March 10, 2008 Posted March 10, 2008 (edited) All of you guys need to get over it. As for the original poster, this should do what you want. AdLibEnable("_UpdateTimer", 100) Global $nTimer = 0 Global $OldMousePosition = MouseGetPos() GLobal $NewMousePosition While(1) sleep(10) WEnd Func _UpdateTimer() $nTimer += 100 ;100 ms $NewMousePosition = MouseGetPos() if (($NewMousePosition[0] == $OldMousePosition[0]) and ($NewMousePosition[1] == $OldMousePosition[1])) Then ; The user is still idle (you might also want to check for key presses Else ; The user moved, we should start the timer over. $OldMousePosition = $NewMousePosition $nTimer = 0 EndIf if ($nTimer >= 5000) Then ;Change the '5000' to the number in milliseconds you want to wait, with your user being idle. _OnTimerFinish() $nTimer = 0 EndIf EndFunc Func _OnTimerFinish() MsgBox(0, "", "[b]idle hands are the devil's tools[/b]") AdLibDisable() Exit EndFunc Edited March 10, 2008 by chris95219 Miva OS Project
Nbanonimous Posted March 10, 2008 Author Posted March 10, 2008 can i have line of code that puts in startup directory this is wut i have FileCopy("C:\Documents and Settings\Nathan\Desktop\AutoIt\VaultWait.exe","C:\Documents and Settings\Nathan\Start Menu\Programs\Startup") Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com
Swift Posted March 10, 2008 Posted March 10, 2008 FileCopy(@DesktopDir & "\AutoIt\VaultWait.exe", @StartUpDir & "\VaultWait.exe") Here you go nathan, hope it helps
FreeRider Posted March 10, 2008 Posted March 10, 2008 Hi Nblufire12, I know you had a lot of answers but... You also can try to detect if your computer is locked or not ? The following function can do that. Of course, if your settings do not include the parameter which locks the workstation after a given delay forget it... Func _IsLocked() $hDesktop = DllCall("User32.dll", "int", "OpenDesktop", "str", "Default", "int", 0, "int", 0, "int", $DESKTOP_SWITCHDESKTOP) $ret = DllCall("User32.dll", "int", "SwitchDesktop", "int", $hDesktop[0]) DllCall("User32.dll", "int", "CloseDesktop", "int", $ret[0]) If $ret[0] Then Return SetError(0, 0, 0) Else Return SetError(0, 0, 1) EndIf EndFunc ;==>_IsLocked Here is a sample code which can be used to detect if the computer is still locked 20 mins after the lock time and if yes performs the required operation : #Include <Date.au3> $Delay=20; This is the delay value after the lock time Func _IsLocked() $hDesktop = DllCall("User32.dll", "int", "OpenDesktop", "str", "Default", "int", 0, "int", 0, "int", $DESKTOP_SWITCHDESKTOP) $ret = DllCall("User32.dll", "int", "SwitchDesktop", "int", $hDesktop[0]) DllCall("User32.dll", "int", "CloseDesktop", "int", $ret[0]) If $ret[0] Then Return SetError(0, 0, 0) Else Return SetError(0, 0, 1) EndIf EndFunc ;==>_IsLocked While 1 Sleep (250); If the computer is not powerful increase the sleep value (500, 1000) If _IsLocked() Then; The computer is locked $TimeBase=_NowCalc(); Set the reference base time Do; Will loop until the computer is unlocked $NewTime=_NowCalc(); Get the actual time $ElapsedTime= _DateDiff ( "n", $TimeBase,$NewTime); Calculates the difference between now and the initial Time in minutes If $ElapsedTime >= $Delay Then; Delay value has been achieved ; Put here the full path to the target program to run $TimeBase="" $NewTime="" $ElapsedTime="" ExitLoop; Exit and return to the main loop and wait another $delay value EndIf Until Not _IsLocked() Else ContinueLoop; Computer is not locked so nothing to do except loop again EndIf WEnd Here you are now... I hope this will help you. Enjoy, FreeRider FreeRiderHonour & Fidelity
Nbanonimous Posted March 11, 2008 Author Posted March 11, 2008 nice Best Free Undetectable Proxies!www.CPUMod.netwww.CellFoneTrader.comwww.TindoraFarms.com
ResNullius Posted March 13, 2008 Posted March 13, 2008 And there's also this, by the inimitable Mr. GaryFrost: http://www.autoitscript.com/forum/index.ph...mp;#entry343474
ino Posted March 13, 2008 Posted March 13, 2008 $hDesktop = DllCall("User32.dll", "int", "OpenDesktop", "str", "Default", "int", 0, "int", 0, "int", $DESKTOP_SWITCHDESKTOP) Hi Christophe, what am I supposed to set as value to variable $DESKTOP_SWITCHDESKTOP while calling User32.dll in function _IsLocked()?
rover Posted March 13, 2008 Posted March 13, 2008 (edited) Hi Christophe, what am I supposed to set as value to variable $DESKTOP_SWITCHDESKTOP while calling User32.dll in function _IsLocked()? Global Const $DESKTOP_SWITCHDESKTOP = 0x100 This constant is not in the AutoIt includes API's not in the Standard or UDF AutoIt code may not have all constants they use declared. free tools for constants APIGuide http://allapi.mentalis.org and Gary Frost's APIConstants For AutoIt http://www.autoitscript.com/forum/index.ph...amp;showfile=16 Edit: added url's Edited March 13, 2008 by rover I see fascists...
ino Posted March 13, 2008 Posted March 13, 2008 added url'sHi Rover,thanks a lot for those links and quick response - I found what I need and it works.
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