Sign in to follow this  
Followers 0
911radio

Help splitting return from IniRead

3 posts in this topic

Hello, I have the following line of code:

$var = IniRead(@ScriptDir & "\config.ini", "config", "group1", "")

It will return something like: C:\testing,C:\testing2

I want to split that using the comma so that I can populate 2 text boxes in a GUI.

Help, thanks!

Share this post


Link to post
Share on other sites



It will return something like:  C:\testing,C:\testing2

I want to split that using the comma so that I can populate 2 text boxes in a GUI.

#include <Array.au3>
$var="C:\testing,C:\testing2"
$path=stringsplit($var,",",3)  ;strinsplit returns an array!
_arraydisplay($path)
msgbox(0,0,$path[0]&@crlf&$path[1])
 

Share this post


Link to post
Share on other sites

Perfect, thanks! I had been close, but arrays and that sort of thing are not my strong point and I couldn't completely wrap my head around it!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0