sahinatam 0 Posted June 9, 2020 We have autoit code to run and hide some software. It was working on windows 7 successfully. But when we migrate to windows 10, we saw that it didn't work while hiding window. ShellExecute("C:\IPMS\NSClient++\nscp.exe", "test",@SW_HIDE) Sleep(2000); WinSetState ( "nscp.exe", "", @SW_HIDE) When i print return code of WinSetState, it is 1 (no error) Do you have any idea ? Share this post Link to post Share on other sites
Jos 2,175 Posted June 9, 2020 Moved to the appropriate forum. Moderation Team 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. Share this post Link to post Share on other sites
Danp2 893 Posted June 9, 2020 5 minutes ago, sahinatam said: ShellExecute("C:\IPMS\NSClient++\nscp.exe", "test",@SW_HIDE) You do realize that this won't work because you have the showflag in the wrong position, correct? [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
sahinatam 0 Posted June 9, 2020 Below one is not also working. ShellExecute("C:\IPMS\NSClient++\nscp.exe", "test") Sleep(2000); WinSetState ( "nscp.exe", "", @SW_HIDE) Share this post Link to post Share on other sites
Danp2 893 Posted June 9, 2020 What about this? ShellExecute("C:\IPMS\NSClient++\nscp.exe", "test", "", "open", @SW_HIDE) [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
sahinatam 0 Posted June 9, 2020 That worked thank you so much. But is it possible to show it 2 seconds then hide ? Share this post Link to post Share on other sites
Danp2 893 Posted June 9, 2020 I'm sure that it is. It's likely that your WinSetState command isn't working as expected because it is finding a different window than you are targeting. Have you tried supplying some text from the window as the 2nd parameter of WinSetState to assist in finding the correct window? [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
sahinatam 0 Posted June 9, 2020 When i use the autoit window info tool (https://www.autoitscript.com/autoit3/docs/intro/au3spy.htm) to find the title of my application, i got the info in the attachment. When i use the Title part int this tool, it didnt work. Share this post Link to post Share on other sites
Danp2 893 Posted June 9, 2020 Please show us the contents of the Visible Text tab. [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
sahinatam 0 Posted June 9, 2020 Nothing on the Visible Text tab. Share this post Link to post Share on other sites
Danp2 893 Posted June 9, 2020 Do you get more than one window shown when you run this code? Local $aWinList = WinList("nscp.exe") _ArrayDisplay($aWinList) [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
Nine 932 Posted June 9, 2020 do you have set Opt ("WinTitleMatchMode", 2) ? Not much of a signature, but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites
sahinatam 0 Posted June 9, 2020 @Danp2 i only got one window. Share this post Link to post Share on other sites
sahinatam 0 Posted June 9, 2020 @Nine Yes i set Opt ("WinTitleMatchMode", 2) Share this post Link to post Share on other sites
Danp2 893 Posted June 9, 2020 18 minutes ago, sahinatam said: i only got one window. Those results are not from the code I posted. [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
sahinatam 0 Posted June 9, 2020 @Danp2 Sorry, i added below the ss. Share this post Link to post Share on other sites
Danp2 893 Posted June 9, 2020 So that indicates that no matching windows were found. You'll need to figure that out. [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
Nine 932 Posted June 9, 2020 Did you run the exe before ? Now let's make a full runable script so we can stop guessing : #include <Array.au3> Opt ("WinTitleMatchMode", 2) ShellExecute("C:\IPMS\NSClient++\nscp.exe", "test") Sleep(2000) $array = WinList ("nscp.exe") _ArrayDisplay ($array) Not much of a signature, but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites
sahinatam 0 Posted June 9, 2020 But that code returns one row. Local $aWinList = WinList("C:\IPMS\NSClient++\nscp.exe") _ArrayDisplay($aWinList) Share this post Link to post Share on other sites
sahinatam 0 Posted June 9, 2020 @Nine When i run your code, i, got the same result Share this post Link to post Share on other sites