Synapsee Posted May 22, 2016 Posted May 22, 2016 (edited) Hi, on a script i use something like that on a W7X64 machine : #NoTrayIcon If $CMDLINE[0] > 0 Then ;Any code Exit EndIf TraySetIcon() ;Reproduce "cursor loading flick problem" (make your cursor on desktop for sample) $command1 = "something" while 1 sleep(500) Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & @ScriptFullPath & '" ' & $COMMAND1, @ScriptDir, @SW_HIDE) Wend That works but this produce a "cursor loading flick problem", the ask is how can i fix that ? Related post : https://www.autoitscript.com/forum/topic/136704-is-it-possible-run-a-function-with-autoit3executeline/?do=findComment&comment=955591 Edited May 23, 2016 by Synapsee
Synapsee Posted May 23, 2016 Author Posted May 23, 2016 3 hours ago, AutoBert said: use a longer sleep time this not really help... ^^ i want disable the cursor loading, not increase the time between i have discover "cursor loading" = $OCR_APPSTARTING i have maybe found a path : expandcollapse popup;Include #include <WinAPIRes.au3> ;commented for current test only ;#NoTrayIcon If $CMDLINE[0] > 0 Then ;Any code Sleep(5000) Exit EndIf ;commented for current test only ;TraySetIcon() ;CopyCursor Local $h_NORMAL = _WinAPI_CopyCursor(_WinAPI_LoadCursor(0, $OCR_NORMAL)) Local $h_APPSTARTING = _WinAPI_CopyCursor(_WinAPI_LoadCursor(0, $OCR_APPSTARTING)) ;now you will see multi trayicon but no more $OCR_APPSTARTING flick :D $command1 = "something" $i = 0 while $i < 20 $i = $i + 1;for exit after 20 ticks sleep(500-200) ;Run AutoIt without fire $OCR_APPSTARTING _WinAPI_SetSystemCursor($h_NORMAL, $OCR_APPSTARTING, True);replace $OCR_APPSTARTING with $OCR_NORMAL ;Run AutoIt, this fire $OCR_APPSTARTING so now this fire for no change Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & @ScriptFullPath & '" ' & $COMMAND1, @ScriptDir, @SW_HIDE) ;I place a part of the sleep here because we need wait $OCR_APPSTARTING AutoIt Operation sleep(200) ;Reset $OCR_APPSTARTING to normal value _WinAPI_SetSystemCursor($h_APPSTARTING, $OCR_APPSTARTING, True) Wend ;Clear CopyCursor ressource _WinAPI_DestroyCursor($h_NORMAL) _WinAPI_DestroyCursor($h_APPSTARTING)
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