sahinatam Posted June 9, 2020 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 ?
Developers Jos Posted June 9, 2020 Developers 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.
Danp2 Posted June 9, 2020 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? Latest Webdriver UDF Release Webdriver Wiki FAQs
sahinatam Posted June 9, 2020 Author Posted June 9, 2020 Below one is not also working. ShellExecute("C:\IPMS\NSClient++\nscp.exe", "test") Sleep(2000); WinSetState ( "nscp.exe", "", @SW_HIDE)
Danp2 Posted June 9, 2020 Posted June 9, 2020 What about this? ShellExecute("C:\IPMS\NSClient++\nscp.exe", "test", "", "open", @SW_HIDE) Latest Webdriver UDF Release Webdriver Wiki FAQs
sahinatam Posted June 9, 2020 Author Posted June 9, 2020 That worked thank you so much. But is it possible to show it 2 seconds then hide ?
Danp2 Posted June 9, 2020 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? Latest Webdriver UDF Release Webdriver Wiki FAQs
sahinatam Posted June 9, 2020 Author 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.
Danp2 Posted June 9, 2020 Posted June 9, 2020 Please show us the contents of the Visible Text tab. Latest Webdriver UDF Release Webdriver Wiki FAQs
Danp2 Posted June 9, 2020 Posted June 9, 2020 Do you get more than one window shown when you run this code? Local $aWinList = WinList("nscp.exe") _ArrayDisplay($aWinList) Latest Webdriver UDF Release Webdriver Wiki FAQs
Nine Posted June 9, 2020 Posted June 9, 2020 do you have set Opt ("WinTitleMatchMode", 2) ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
sahinatam Posted June 9, 2020 Author Posted June 9, 2020 @Nine Yes i set Opt ("WinTitleMatchMode", 2)
Danp2 Posted June 9, 2020 Posted June 9, 2020 18 minutes ago, sahinatam said: i only got one window. Those results are not from the code I posted. Latest Webdriver UDF Release Webdriver Wiki FAQs
Danp2 Posted June 9, 2020 Posted June 9, 2020 So that indicates that no matching windows were found. You'll need to figure that out. Latest Webdriver UDF Release Webdriver Wiki FAQs
Nine Posted June 9, 2020 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) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
sahinatam Posted June 9, 2020 Author Posted June 9, 2020 But that code returns one row. Local $aWinList = WinList("C:\IPMS\NSClient++\nscp.exe") _ArrayDisplay($aWinList)
sahinatam Posted June 9, 2020 Author Posted June 9, 2020 @Nine When i run your code, i, got the same result
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