mikelee33 Posted January 19, 2008 Share Posted January 19, 2008 Performing a forum search on this topic shows me that it is difficult (not possible?), and I'm afraid I haven't seen it completely addressed. I wish to hide the box, or at least minimize it. Many thanks for any help. Mike Link to comment Share on other sites More sharing options...
Developers Jos Posted January 19, 2008 Developers Share Posted January 19, 2008 Are you using Run/RunWait ? if so Check the helpfile for the 3rd parameter. 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. Link to comment Share on other sites More sharing options...
Xenobiologist Posted January 19, 2008 Share Posted January 19, 2008 (edited) Hi, or somethig like this: expandcollapse popupGlobal $a = ProcessGetId('cmd.EXE') If IsArray($a) Then ConsoleWrite(ProcessGetWindow($a[1]) & @CRLF) WinSetState(ProcessGetWindow($a[1]), "", @SW_HIDE) Sleep(2000) WinSetState(ProcessGetWindow($a[1]), "", @SW_SHOW) EndIf Func ProcessGetWindow($PId) If IsNumber($PId) = 0 Or ProcessExists(ProcessGetName($PId)) = 0 Then SetError(1) Else Local $WinList = WinList() Local $i = 1 Local $WindowTitle = "" While $i <= $WinList[0][0] And $WindowTitle = "" If WinGetProcess($WinList[$i][0], "") = $PId Then $WindowTitle = $WinList[$i][0] Else $i += 1 EndIf WEnd Return $WindowTitle EndIf EndFunc ;==>ProcessGetWindow Func ProcessGetId($Process) If IsString($Process) = 0 Then SetError(2) ElseIf ProcessExists($Process) = 0 Then SetError(1) Else Local $PList = ProcessList($Process) Local $i Local $PId[$PList[0][0] + 1] $PId[0] = $PList[0][0] For $i = 1 To $PList[0][0] $PId[$i] = $PList[$i][1] Next Return $PId EndIf EndFunc ;==>ProcessGetId Func ProcessGetName($PId) If IsNumber($PId) = 0 Then SetError(2) ElseIf $PId > 9999 Then SetError(1) Else Local $PList = ProcessList() Local $i = 1 Local $ProcessName = "" While $i <= $PList[0][0] And $ProcessName = "" If $PList[$i][1] = $PId Then $ProcessName = $PList[$i][0] Else $i += 1 EndIf WEnd Return $ProcessName EndIf EndFunc ;==>ProcessGetName Mega Edited January 19, 2008 by Xenobiologist Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
mikelee33 Posted January 19, 2008 Author Share Posted January 19, 2008 Where this works perfectly well: run ( $prog2 & ' ' &' -r -E -b '& $optionread & ' "'&GUICtrlRead($file)&'"') If I add this: run ( $prog2 & ' ' &' -r -E -b '& $optionread & ' "'&GUICtrlRead($file)&'"', @SW_HIDE) it doesn't. I get an unable to execute external program error. Link to comment Share on other sites More sharing options...
GaryFrost Posted January 19, 2008 Share Posted January 19, 2008 Where this works perfectly well: run ( $prog2 & ' ' &' -r -E -b '& $optionread & ' "'&GUICtrlRead($file)&'"') If I add this: run ( $prog2 & ' ' &' -r -E -b '& $optionread & ' "'&GUICtrlRead($file)&'"', @SW_HIDE) it doesn't. I get an unable to execute external program error. Try: run ( $prog2 & ' ' &' -r -E -b '& $optionread & ' "'&GUICtrlRead($file)&'"', "", @SW_HIDE) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
mikelee33 Posted January 19, 2008 Author Share Posted January 19, 2008 GaryFrost, Perfect! Such a little (but important) thing has just made my day. Thank you. 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