Jump to content

Executing infinitely


rliiack
 Share

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

meaning if you had the commands in a while loop:

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

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...