Jump to content

Search the Community

Showing results for tags 'expandvarstrings'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. Hello, I'd like to be able to create variables 'on the fly' by reading in some data from an SQLite database. Using this data i'd like to create variables. The data would be separated by colons (":")...'colon delimited'. I would perform a 'StringSplit' on the data to create arrays holding each colon separated value. Ideally I could then use these strings to create variables from them...possible? I know it cannot be done just piecing a string together such as "var = "$_" & 'some string'"... I think it might work using the 'Assign' command...and there is an 'Opt' option to 'ExpandVarStrings' which seems to indicate it is possible to include a "$" within a string...however the documentation is a bit spotty on that. Can anybody confirm that these might be the best practices to create variables dynamically? ...Perhaps there is another method I'm not thinking of...? I thank you in advance. Regards.
  2. The following code: Opt("ExpandVarStrings", True) $string1 = "something" $string2 = "another thing" $try = "this" $stringToUse="string1" ; Test bit 1 ConsoleWrite("=====" & @CRLF) ConsoleWrite("Test: '$try$', '$" & $stringToUse & "$'@CRLF@") ConsoleWrite("-----" & @CRLF) ; Test bit 2 ConsoleWrite("=====" & @CRLF) ConsoleWrite("Test: '$string2$'@CRLF@") ConsoleWrite("-----" & @CRLF) ... produces: Main question: can I read the variable to read from from a variable, like I tried in "Test bit 1"? (If not, then why?) Second question: if I cannot and if it is because the string expansion is done at "compile time" or something, why does it break the expansion of the "@CRLF@" after the concatenated string as well (but not before - the $try$ is expanded just fine), but then still just outputs a string and doesn't throw any errors? I don't have a particular thing I'm trying to accomplish; another question about language files just made me remember that I used this option long ago and it helped me greatly for that purpose. This to say that I don't need other approaches. I'm just playing around - I probably wouldn't use the ExpandVarStrings for anything serious at this point anyway
×
×
  • Create New...