mikkokh Posted January 9, 2006 Posted January 9, 2006 I have this code to run WebMon with global settingfile. Normaly it use user homedirectory and i have many profiles in my computer, so it is not best option for me. Dim $exePath, $dataFolder, $exeArgs $exePath = "C:\Program Files\WebMon\webmon.exe" $dataFolder = "D:\Additional File Storage For Programs\WebMon\Current" $exeArgs = "-prefs " & FileGetShortName($dataFolder & "\Prefs.ini") & " -pages " & FileGetShortName($dataFolder & "\WebPages.dat") Run(FileGetShortName($exePath) & " " & $exeArgs, "", @SW_MINIMIZE) But, why program (webmon.exe) does not run in Minimized mode? I know that it work also that way, begause i have been same script in CMD Batch File and it work like it should be - if that opening DOS woindow does not bother... OS: Win XP Pro [Finnish], SP2 - miXza-81 -
nfwu Posted January 9, 2006 Posted January 9, 2006 I have this code to run WebMon with global settingfile. Normaly it use user homedirectory and i have many profiles in my computer, so it is not best option for me. Dim $exePath, $dataFolder, $exeArgs $exePath = "C:\Program Files\WebMon\webmon.exe" $dataFolder = "D:\Additional File Storage For Programs\WebMon\Current" $exeArgs = "-prefs " & FileGetShortName($dataFolder & "\Prefs.ini") & " -pages " & FileGetShortName($dataFolder & "\WebPages.dat") Run(FileGetShortName($exePath) & " " & $exeArgs, "", @SW_MINIMIZE) But, why program (webmon.exe) does not run in Minimized mode? I know that it work also that way, begause i have been same script in CMD Batch File and it work like it should be - if that opening DOS woindow does not bother... OS: Win XP Pro [Finnish], SP2 Try this: Dim $exePath, $dataFolder, $exeArgs, $exeName $exePath = "C:\Program Files\WebMon\" $exeName = "webmon.exe" $dataFolder = "D:\Additional File Storage For Programs\WebMon\Current" $exeArgs = "-prefs " & FileGetShortName($dataFolder & "\Prefs.ini") & " -pages " & FileGetShortName($dataFolder & "\WebPages.dat") Run(FileGetShortName($exePath&$exeName) & " " & $exeArgs, $exePath, @SW_MINIMIZE) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
mikkokh Posted January 9, 2006 Author Posted January 9, 2006 Try this: Dim $exePath, $dataFolder, $exeArgs, $exeName $exePath = "C:\Program Files\WebMon\" $exeName = "webmon.exe" $dataFolder = "D:\Additional File Storage For Programs\WebMon\Current" $exeArgs = "-prefs " & FileGetShortName($dataFolder & "\Prefs.ini") & " -pages " & FileGetShortName($dataFolder & "\WebPages.dat") Run(FileGetShortName($exePath&$exeName) & " " & $exeArgs, $exePath, @SW_MINIMIZE) Still same result... This CMD Batch code works: set _WebMonDataDir_="D:\Additional File Storage For Programs\WebMon\Current" start /min /dC:\Progra~1\WebMon webmon.exe -prefs %_WebMonDataDir_%\Prefs.ini -pages %_WebMonDataDir_%\WebPages.dat" set _WebMonDataDir_= So, why AutoIt 3 code not work? This is weird. Thanks. - miXza-81 -
ChrisL Posted January 9, 2006 Posted January 9, 2006 Still same result... This CMD Batch code works: set _WebMonDataDir_="D:\Additional File Storage For Programs\WebMon\Current" start /min /dC:\Progra~1\WebMon webmon.exe -prefs %_WebMonDataDir_%\Prefs.ini -pages %_WebMonDataDir_%\WebPages.dat" set _WebMonDataDir_= So, why AutoIt 3 code not work? This is weird. Thanks. The batchfile uses "Start" with the switch /Min For some reason it seems to ignore the $SW_Minimized in your script, you could launch it and then WinWait("webmon") or whatever the title is And then use winsetstate to minimize it [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
ChrisL Posted January 9, 2006 Posted January 9, 2006 or use run (@comspec.....) and use the same as the batchfile [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
mikkokh Posted January 9, 2006 Author Posted January 9, 2006 The batchfile uses "Start" with the switch /MinFor some reason it seems to ignore the $SW_Minimized in your script,you could launch it and thenWinWait("webmon") or whatever the title isAnd then use winsetstate to minimize itThat's works. Thanks. - miXza-81 -
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