skippynz Posted September 1, 2008 Share Posted September 1, 2008 not sure if this is possible but i have an INI file with the macro @startupcommondir in it - and wanted to convert that to be able to be used in create dir. INI File [default] Iconlocation=@startmenucommondir & '\new folder' thought of using this $Iconlocation = IniRead("icons.ini", "default", "Iconlocation", "NotFound") DirCreate(_StringProper($Iconlocation)) but it didnt work - any ideas ? TIA Craig Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 1, 2008 Share Posted September 1, 2008 not sure if this is possible but i have an INI file with the macro @startupcommondir in it - and wanted to convert that to be able to be used in create dir. INI File [default] Iconlocation=@startmenucommondir & '\new folder' thought of using this $Iconlocation = IniRead("icons.ini", "default", "Iconlocation", "NotFound") DirCreate(_StringProper($Iconlocation)) but it didnt work - any ideas ? TIA Craig If you can read that string from the file with IniRead() then you can resolve it with Execute(): $sString = "@startmenucommondir & '\new folder'" $sString = Execute($sString) ConsoleWrite("$sString = " & $sString & @LF) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
skippynz Posted September 1, 2008 Author Share Posted September 1, 2008 If you can read that string from the file with IniRead() then you can resolve it with Execute(): $sString = "@startmenucommondir & '\new folder'" $sString = Execute($sString) ConsoleWrite("$sString = " & $sString & @LF) thanks that worked a treat - i will have to remember that one for next time - such a simple piece of code.. Link to comment Share on other sites More sharing options...
DW1 Posted September 1, 2008 Share Posted September 1, 2008 (edited) I don't get it... why the need for the Execute()? How are these any different? test1() test2() Func test1() $sString = @startmenucommondir & '\new folder' ConsoleWrite("$sString = " & $sString & @LF) EndFunc Func test2() $sString = "@startmenucommondir & '\new folder'" $sString = Execute($sString) ConsoleWrite("$sString = " & $sString & @LF) EndFunc EDIT: Never mind... right after the post I realized it's because it was in a string from the IniRead... duh.. sorry Edited September 1, 2008 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 1, 2008 Moderators Share Posted September 1, 2008 http://www.autoitscript.com/forum/index.ph...c=72435&hl= Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
skippynz Posted September 1, 2008 Author Share Posted September 1, 2008 http://www.autoitscript.com/forum/index.ph...c=72435&hl=i must have done a "man search" as my wife says - Link to comment Share on other sites More sharing options...
Szhlopp Posted September 1, 2008 Share Posted September 1, 2008 If you can read that string from the file with IniRead() then you can resolve it with Execute(): $sString = "@startmenucommondir & '\new folder'" $sString = Execute($sString) ConsoleWrite("$sString = " & $sString & @LF) Lol I couldn't figure this out either... Thanks RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+' 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