Anyone know how to run a function in the background without the application be completely inactive for the user?
If the function is in a button click the function runs fine in the background and the application is still usable.
However, I’m trying to run a repeating function on start of my application, but when I do this the whole application becomes inactive. I have tried awake from nib and on finished launching…etc., but I still get the same results. Is there a way around this?
Thank you!
regulus6633, thank you for the post. Yeah, I tried a a shell script and a separate AppleScript, but what I am trying to do is not working. If user default runVar = true then run function at start of app. This will work if I put the function in “on idle” and my app will be active for the user. However, I will have to write a bit more code to handle the on idle call if the runVar is read in as false.
Thanks!
I think you might be able to use ignoring:
ignoring application responses
do shell script "/path/to/script"
end ignoring