Demon777 Posted December 2, 2007 Share Posted December 2, 2007 (edited) I wanna run script and this script should stay in memory and always repeat urself (code that wrote in script) or just stay in Memory and do what i wrote so long as possible... And it should no show urself in task Manager. Thats all with what i need help. How to do it ??? Is it possible ??? Coz when i used Do - Until it opening urself again and again and again so PC crashs !!! Plz help Waiting for answer. Thx Edited December 2, 2007 by Demon777 Link to comment Share on other sites More sharing options...
thomaatje Posted December 2, 2007 Share Posted December 2, 2007 Can u post the code plz? Link to comment Share on other sites More sharing options...
Demon777 Posted December 2, 2007 Author Share Posted December 2, 2007 I just tryed to make it so i deleted all tests that i made.... sry... And i dont know what i wrote there.... Btw: Is there no Function or something for it ??? I am new in AutoIt, just 2 Days.... Link to comment Share on other sites More sharing options...
eldara Posted December 2, 2007 Share Posted December 2, 2007 Try giving us the code Link to comment Share on other sites More sharing options...
thomaatje Posted December 2, 2007 Share Posted December 2, 2007 (edited) If you want to run a program and have a loop in your script, don't put the Run() command in the loop. Like this: Run("notepad.exe") $i = 0 Do Send("Value of $i is:" & $i) $i = $i + 1 Until $i = 10 Edited December 2, 2007 by Forsaken Link to comment Share on other sites More sharing options...
Demon777 Posted December 2, 2007 Author Share Posted December 2, 2007 #NoTrayIcon $i = 0 Do DirCreate("C:\Test1") DirCreate("C:\Test2") DirCreate("C:\Test3") $i = $i + 0 Until $i = 10 This for Exampel.... It staying in Memory but if i delete one of this Folders it ll not recopy urself.... I want that when i delete 1 of this Folders it will copy ur self again without stopping programm..... So Programm ll look at this Folders and if 1 of this Folders will be deleted it ll recopy this Folder in the same folder. But it does not work. It just copy urself 1 time and stopping. So - Help plz Link to comment Share on other sites More sharing options...
thomaatje Posted December 2, 2007 Share Posted December 2, 2007 (edited) $i = $i + 1 not $i = $i + 0 I understand what you mean.. hang on Edited December 2, 2007 by Forsaken Link to comment Share on other sites More sharing options...
thomaatje Posted December 2, 2007 Share Posted December 2, 2007 Ill help you tomorrow... i got to bed now Link to comment Share on other sites More sharing options...
Demon777 Posted December 2, 2007 Author Share Posted December 2, 2007 Np m8 i ll wait for any help. And thx again Link to comment Share on other sites More sharing options...
Demon777 Posted December 3, 2007 Author Share Posted December 3, 2007 So ??? Can somebody help me with it ??? Link to comment Share on other sites More sharing options...
Nevin Posted December 3, 2007 Share Posted December 3, 2007 Well if the loop only runs ten times, it won't keep recopying itself. It needs to be a sentinel-controlled loop, not counter-controlled. Those ten iterations are going to take almost no time at all. There needs to be another way to stop it, like using HotKeySet or something like that. I would say just close the script, from the tray, but you seem to want to hide this program (for some reason) Link to comment Share on other sites More sharing options...
thomaatje Posted December 3, 2007 Share Posted December 3, 2007 (edited) This should help #NoTrayIcon While 1 ;keep your program running. If Not FileExists("C:\Test1\Test1") Then ;Check if the file in the directory exists. DirCreate("C:\Test1") $File1 = FileOpen("C:\Test1\Test1", 8) ;if the file doesn't exsit it creates the folder and the file. FileClose("C:\Test1\Test1") EndIf If Not FileExists("C:\Test1\Test2") Then DirCreate("C:\Test2") FileOpen("C:\Test1\Test2", 8) FileClose("C:\Test1\Test2") EndIf If Not FileExists("C:\Test1\Test3") Then DirCreate("C:\Test3") FileOpen("C:\Test1\Test3", 8) FileClose("C:\Test1\Test3") EndIf WEnd Edited December 3, 2007 by Forsaken 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