JohnOne Posted August 26, 2010 Share Posted August 26, 2010 (edited) I discovered this problem trying to help someone in another thread but forgot about it. Wondering if anyone could shed an light why this might be happening. Not sure if its a scite issue or something else, so would appreciate suggestions. If I run this code from scite, its all fine and nothing seems out of the ordinary. Run("notepad.exe") $hwnd = WinGetHandle("Untitled - Notepad") While 1 sleep(100) WEnd however if I run this code with the added #RequireAdmin, ir opens notepad, and scite reports the script as exited code 0, but the tray icon is still present and it reported as running in taskmanager too. #RequireAdmin Run("notepad.exe") $hwnd = WinGetHandle("Untitled - Notepad") While 1 sleep(100) WEnd Its pretty difficult to debug your code from within scite when this is happening. Edited August 26, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ShawnW Posted August 26, 2010 Share Posted August 26, 2010 I am unable to duplicate the problem at work (winxp, domain admin). Both examples keep running. Are you saying that when you are not the admin it still keeps running but claims to exit? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 26, 2010 Share Posted August 26, 2010 (edited) #RequireAdmin makes the script start a new copy of itself and request admin privileges for that (but only if it isn't running with admin privileges already), then the original exits. There isn't much you can do about that I think, but you can work around it. Like starting SciTE as admin. Edit: clarity. Edited August 26, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
JohnOne Posted August 26, 2010 Author Share Posted August 26, 2010 #RequireAdmin makes the script start a new copy of itself and request admin privileges for that (but only if it isn't running with admin privileges already), then the original exits.There isn't much you can do about that I think, but you can work around it.Like starting SciTE as admin.Edit: clarity.Starting as admin solves the issue, thanks AdmiralAlkex.I have never seen this issue before, and think it must be something to do with UAC being turned on, even with admin account.@shawnw, no it is the other way around use admin and it exits in scite but the au3 script keeps running. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now