Sign in to follow this  
Followers 0
Demon777

1 problemm

12 posts in this topic

#1 ·  Posted (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 by Demon777

Share this post


Link to post
Share on other sites



Can u post the code plz?

Share this post


Link to post
Share on other sites

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....

Share this post


Link to post
Share on other sites

Try giving us the code

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by Forsaken

Share this post


Link to post
Share on other sites

#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 :)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

$i = $i + 1
not
$i = $i + 0

I understand what you mean.. hang on

Edited by Forsaken

Share this post


Link to post
Share on other sites

Ill help you tomorrow... i got to bed now

Share this post


Link to post
Share on other sites

Np m8 :) i ll wait for any help. And thx again

Share this post


Link to post
Share on other sites

So ??? Can somebody help me with it ???

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

#12 ·  Posted (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 by Forsaken

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0