Sign in to follow this  
Followers 0
rliiack

Executing infinitely

11 posts in this topic

I copied

Run('Calc') Run('Notepad') MsgBox(64, 'Functions', 'I started Calculator and Notepad.')
directly from the tutorial to my script file. Every time I execute it, it will run infinitely freezing my computer. I can only shut it down and restart my computer in order to use it again.

Can anyone explain to me how to fix this problem?

Thanks,

rliiack


My Projects:Smart Icons

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

hmmm...how were you able to run it? pasting the line exactly just makes AU3Check throw an error, and when i click continue anyway, it opens calc, and then crashes due to the syntax error that AU3Check said there was, but does not lock my computer up.

If i start it with each function on a different line, it does just what it is supposed to, opens calc, opens notepad, and pops a message box up.

Run('Calc')
Run('Notepad')
MsgBox(64, 'Functions', 'I started Calculator and Notepad.')
Edited by Kealper

Share this post


Link to post
Share on other sites

Sorry I put my code like you do, but mine tends to freeze... Now I'm scared to execute anything.


My Projects:Smart Icons

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Sorry I put my code like you do, but mine tends to freeze... Now I'm scared to execute anything.

firstly, there is an AutoIt3 icon in the systemstray where you can always stop the execution of any script by default. (are you maybe clicking that causing the script to pause?)

Secondly, do you see the Calc and Notepad starting and also see the MsgBox() ? (Isn't the MsgBox behind either the Calc or Notepad window waiting for you to click it?

Have you compiled the script and what is its name?

Jos

Edited by 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

#5 ·  Posted (edited)

After compiling I can eventually stop its execution, but by that time it had already execute too many times.

I can see several calc and notepad but not the message box.

I had compiled it and it shows no error. Here is the message:

Run.au3 - 0 error(s), 0 warning(s)

Edited by rliiack

My Projects:Smart Icons

Share this post


Link to post
Share on other sites

What do you mean? I don't have a while loop...


My Projects:Smart Icons

Share this post


Link to post
Share on other sites

no, those three lines are my only codes


My Projects:Smart Icons

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Unlikely, but:

Did you by chance accidentally name the script or the compiled version of the script "calc" or "notepad"?

If so, this would cause the program to run itself, open another program, and open a message-box continuously.

- an accidental fork bomb.

example:

calc.au3 (compiled in same directory as "calc.exe")

Run('Calc')
Run('Notepad')
MsgBox(64, 'Functions', 'I started Calculator and Notepad.')

Example in AutoIt 3.3.0.0,

Run seems to choose a program in the current directory over the working directory, even if set by the 2nd parameter :|

Note: it's not my intention to explain how to do this, but rather that this could have happened by accident in this case.

Edit: added note and missing "the"

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

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