blindwig Posted June 9, 2005 Share Posted June 9, 2005 OK, this works: $Command = 'pause' RunWait(@Comspec & ' /c ' & $Command) and this: AutoItSetOption('ExpandEnvStrings',1) $Command = '%comspec% /c pause' RunWait($Command) but this does not: AutoItSetOption('ExpandEnvStrings',1) $Command = IniRead(); let's assume that this returns '%comspec% /c pause' RunWait($Command) In fact, the whole process of expanding environment variables seems to be quirky, because this doesn't work: AutoItSetOption('ExpandEnvStrings',0) $Command = '%comspec% /c pause' AutoItSetOption('ExpandEnvStrings',1) RunWait($Command) nor does this: AutoItSetOption('ExpandEnvStrings',0) $Command1 = '%comspec% /c pause' AutoItSetOption('ExpandEnvStrings',1) $Command = $Command1 RunWait($Command) I wish there was just a function like ExpandEnvStrings() that would return an adjusted string. Maybe I'll go work on that... My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
blindwig Posted June 9, 2005 Author Share Posted June 9, 2005 OK, I wrote a function to expand the variables:http://www.autoitscript.com/forum/index.php?showtopic=12298 My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
GaryFrost Posted June 9, 2005 Share Posted June 9, 2005 OK, this works:$Command = 'pause' RunWait(@Comspec & ' /c ' & $Command)and this:AutoItSetOption('ExpandEnvStrings',1) $Command = '%comspec% /c pause' RunWait($Command)but this does not:AutoItSetOption('ExpandEnvStrings',1) $Command = IniRead(); let's assume that this returns '%comspec% /c pause' RunWait($Command)In fact, the whole process of expanding environment variables seems to be quirky, because this doesn't work:AutoItSetOption('ExpandEnvStrings',0) $Command = '%comspec% /c pause' AutoItSetOption('ExpandEnvStrings',1) RunWait($Command)nor does this:AutoItSetOption('ExpandEnvStrings',0) $Command1 = '%comspec% /c pause' AutoItSetOption('ExpandEnvStrings',1) $Command = $Command1 RunWait($Command)I wish there was just a function like ExpandEnvStrings() that would return an adjusted string. Maybe I'll go work on that...<{POST_SNAPBACK}>I tried the bottom 2 on my system with release version and beta, and both worked. 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...
blindwig Posted June 9, 2005 Author Share Posted June 9, 2005 I tried the bottom 2 on my system with release version and beta, and both worked.<{POST_SNAPBACK}>I'm using 3.1.1.0, and all 3 of the bottom ones return something like this:>"C:\Program Files\AutoIt3\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\UserName\Desktop\New AutoIt v3 Script.au3"C:\Documents and Settings\UserName\Desktop\New AutoIt v3 Script.au3 (5) : ==> Unable to execute the external program.: RunWait($Command) The system cannot find the file specified. My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
blindwig Posted June 9, 2005 Author Share Posted June 9, 2005 Just tried on 3.1.1.44, same results My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
MHz Posted June 9, 2005 Share Posted June 9, 2005 Bottom 2 examples: 3.1.1 fails 3.1.1.40 works Link to comment Share on other sites More sharing options...
blindwig Posted June 9, 2005 Author Share Posted June 9, 2005 (edited) Just tried on 3.1.1.44, same results<{POST_SNAPBACK}>Oops, nevermind. It does work on 3.1.1.44, but not 3.1.1.0 Edited June 9, 2005 by blindwig My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions 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