Sign in to follow this  
Followers 0
critan

Run a constant loop help plz?

10 posts in this topic

I need help, How can i Run this code,

Run("STEALTH_MINER.exe") [,"C:\Documents and Settings\HP_Owner.computer2\My Documents\Downloads\STEALTH_MINER_FOLDER"])
Sleep (318000)

in a constant loop, any help would be much appreciated

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I need help, How can i Run this code,

Run("STEALTH_MINER.exe") [,"C:\Documents and Settings\HP_Owner.computer2\My Documents\Downloads\STEALTH_MINER_FOLDER"])
  Sleep (318000)

in a constant loop, any help would be much appreciated

read the helpfile? paying attention to the While loop part, and reading up about what happens if the value after the while is non-zero.

MDiesel

Edit: whilst you are in the helpfile, check the syntax for your code... Or run it...

Edited by mdiesel

Share this post


Link to post
Share on other sites

read the helpfile? paying attention to the While loop part, and reading up about what happens if the value after the while is non-zero.

MDiesel

I have tried to do a while/WEnd loop it just dont work it comes up with an while^ Error

Share this post


Link to post
Share on other sites

I have tried to do a while/WEnd loop it just dont work it comes up with an while^ Error

yer? well why didn't you say so! have you got some code for us to fix? no? well here you go:

While 1
   If MsgBox (4, "Loop test", "Currently in a never ending loop! exit?") = 6 Then Exit
WEnd

Thats all there is to it.

MDiesel

Share this post


Link to post
Share on other sites

I have tried to do a while/WEnd loop it just dont work it comes up with an while^ Error

What does the code you used looks like? ... and the error tells you what?

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

This is the code im using

While 1
Run("STEALTH_MINER.exe") [,"C:\Documents and Settings\HP_Owner.computer2\My Documents\Downloads\STEALTH_MINER_FOLDER"])
Sleep (318000)
WEnd

this is the error when i run it

Line -1:
Error:Illegal text at the end of statement(one statement per line)

what im assuming is that the sleep is interfering with the loop i think but i need it to sleep for that amount of sec then start up again

Edited by critan

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

how about this one:

Run("STEALTH_MINER.exe","C:\Documents and Settings\HP_Owner.computer2\My Documents\Downloads\STEALTH_MINER_FOLDER")
Edited by DYONISII

http://dev.dyonisii.com/

Share this post


Link to post
Share on other sites

This is the code im using

While 1
Run("STEALTH_MINER.exe") [,"C:\Documents and Settings\HP_Owner.computer2\My Documents\Downloads\STEALTH_MINER_FOLDER"])
Sleep (318000)
WEnd

this is the error when i run it

Line -1:
Error:Illegal text at the end of statement(one statement per line)

what im assuming is that the sleep is interfering with the loop i think but i need it to sleep for that amount of sec then start up again

Run it first interactively from SciTE by opening the sources and pressing F5.

It will tell you about an error in your run statement. You need to remove the square brackets.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

EDIT:: yup i found the problem. With your idea Jos about the brackets but i instead place the file in the folder and ran it and it works fine thx for the help

While 1
Run("STEALTH_MINER.exe")[removed this part]
Sleep (318000)
WEnd
Edited by critan

Share this post


Link to post
Share on other sites

hello,

i just changed the part that needed to be changed. you can still enclose it with while...wend.

thus:

While 1
  Run("STEALTH_MINER.exe","C:\Documents and Settings\HP_Owner.computer2\My Documents\Downloads\STEALTH_MINER_FOLDER")
  Sleep (318000)
WEnd

http://dev.dyonisii.com/

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