Jump to content

100% CPU usage when script is over!


Recommended Posts

I have a ~1000 line script. Everything is working just great. Once the last line if executed, the AutoIt tray icon disappears and right after the CPU usage rise to 100%. The process using the 100% CPU is AutoIt.exe. Please note that during the run, the CPU usage is 20% or even less.

How come? My script is over!

10x

Link to comment
Share on other sites

I dont' seem to get autoIt to use over 10% CPU when I try, unless I accidentally loop my functions. Only the one script? I have tried to reproduce it on my comp while watching my CPU usage, but nothing wierd happens like that.

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

HotKeySet ( "{f1}" ,"test")
For $i = 1 to 2
$i=1
Next

Func test()
exitloop
$pos = MouseGetPos()
msgbox(0, "x & y", $pos[0] & "," & $pos[1])
EndFunc

that little sucker right there will not exit. i have to get task manager to exit it.

it will complete the reported task but it will not exit. stays active in memory and stays there. so who knows if you have multiple loops running maybe they are not exiting to. just performing the task but not exiting.

Edited by beerman
Link to comment
Share on other sites

  • Administrators

It's a "bad syntax" script. Download the unstable version, http://www.hiddensoft.com/autoit3/files/unstable/ , and all will be revealed :whistle:

Btw, I don't mean "bad" as in bad, I mean bad as in not as I intended B)

Link to comment
Share on other sites

HotKeySet ( "{f1}" ,"test")
For $i = 1 to 2
if $i = 3 then exitloop
$i=1
Next

Func test()
$i=3
$pos = MouseGetPos()
msgbox(0, "x & y", $pos[0] & "," & $pos[1])
EndFunc

yeah i figured it out with that unstable beta.

also found out that it won't allow a using of the function keys either as hotkeys.

so i went back to the previous

yes i found my folly in what i did wrong.

just a question for you john even tho you wanted to put a limiter on the hot key functions, 1-0 a-z. to stop key logger worries, but are you and why is there a limit on a single function keys. besides they aren't working in that unstable version i tried. well i was trying !{f1}

Link to comment
Share on other sites

I removed the modifier requirement for a-z, 0-9 and I could then use single characters on {END}, {PAUSE}, etc. So it's either the keycode check or how the keycode is assigned for keys involving the lookup table.

-FunkyDo

EDIT: I just found the problem and posted the fix here:

http://www.hiddensoft.com/forum/index.php?...view=getnewpost

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