stev379 Posted December 31, 2009 Share Posted December 31, 2009 I searched and didn't find what I'm looking for here on the net. I want to read a file and paste it into a GUI. What's my best option and how should I go about it? Should I use an array? I've go no trouble reading into an array, but I'm blanking on how to print the entire array to a GUI. If it were a string, no problem to dump it to a label, but how do I turn the entire file contents into a string? We're talking small logon script files here. Thanks for any help or suggestions! Happy New Year! -Steve Link to comment Share on other sites More sharing options...
kaotkbliss Posted December 31, 2009 Share Posted December 31, 2009 From the help file: Places the elements of an array into a single string, separated by the specified delimiter. #Include <Array.au3> _ArrayToString(Const ByRef $avArray[, $sDelim = "|"[, $iStart = 0[, $iEnd = 0]]]) Parameters $avArray Array to combine $sDelim [optional] Delimiter for combined string $iStart [optional] Index of array to start combining at $iEnd [optional] Index of array to stop combining at Return Value Success: string which combined selected elements separated by the delimiter string. Failure: "", sets @error: 1 - $avArray is not an array 2 - $iStart is greater than $iEnd 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
martin Posted December 31, 2009 Share Posted December 31, 2009 I searched and didn't find what I'm looking for here on the net. I want to read a file and paste it into a GUI. What's my best option and how should I go about it? Should I use an array? I've go no trouble reading into an array, but I'm blanking on how to print the entire array to a GUI. If it were a string, no problem to dump it to a label, but how do I turn the entire file contents into a string? We're talking small logon script files here. Thanks for any help or suggestions! Happy New Year! -Steve Just read the text from the file and write it to an edit. $text = FileRead($scriptFullPath) GuiCtrlSetData($edit1,$text) Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
stev379 Posted December 31, 2009 Author Share Posted December 31, 2009 From the help file: Places the elements of an array into a single string, separated by the specified delimiter. #Include <Array.au3> _ArrayToString(Const ByRef $avArray[, $sDelim = "|"[, $iStart = 0[, $iEnd = 0]]]) How'd I miss that... grrr.... Thank you much! It prints to a GUI label perfectly. 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