quicksilver Posted August 30, 2005 Share Posted August 30, 2005 Hi i want to create a Textform where i can output some text to post infos for the user. Can anyone help me? Link to comment Share on other sites More sharing options...
Raindancer Posted August 30, 2005 Share Posted August 30, 2005 If you have a GUI look at GUICtrlCreateEdit in addition with the $ES_READONLY Style, and GUICtrlSetData to fill it with Information... Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer Link to comment Share on other sites More sharing options...
quicksilver Posted August 30, 2005 Author Share Posted August 30, 2005 (edited) ok thanks .) it works edit: an how can i put text from a array into the form? the whole array with a loop? Edited August 30, 2005 by quicksilver Link to comment Share on other sites More sharing options...
trids Posted August 30, 2005 Share Posted August 30, 2005 Or you can use the under-appreciated Autoit "console" .. here is an example, based on Cyberslug's excellent idea. I use it all the time http://www.autoitscript.com/forum/index.ph...wtopic=5823&hl=HTH Link to comment Share on other sites More sharing options...
Raindancer Posted August 30, 2005 Share Posted August 30, 2005 an how can i put text from a array into the form? the whole array with a loop?<{POST_SNAPBACK}>For $i = 1 to UBound($array) - 1 GUICtrlSetData($edit, $array[$i]) Next Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer Link to comment Share on other sites More sharing options...
quicksilver Posted August 30, 2005 Author Share Posted August 30, 2005 Thanks .) and how can i check if the var $array is null? isdeclared doesnt work ) Link to comment Share on other sites More sharing options...
Raindancer Posted August 30, 2005 Share Posted August 30, 2005 Thanks .)and how can i check if the var $array is null?isdeclared doesnt work )<{POST_SNAPBACK}>IsArray($array) Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer Link to comment Share on other sites More sharing options...
quicksilver Posted August 30, 2005 Author Share Posted August 30, 2005 Hm i dont understand this... $file = Fileopen("ini.ini",0) $commands = FileReadLine($file,2) $cmds = StringSplit($commands, ";") IF IsArray($cmds) then .... EndIf but line 2 is empty in the ini .. but he jumps into the loop and execute the commands .. Link to comment Share on other sites More sharing options...
Raindancer Posted August 30, 2005 Share Posted August 30, 2005 Hm i dont understand this... $cmds = StringSplit($commands, ";") IF IsArray($cmds) then .... EndIf<{POST_SNAPBACK}>StringSplit ALWAYS returns an array, even when there is nothing to split...You can check with If UBound($array) > 1 AND NOT $array[1] = "" Then Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer Link to comment Share on other sites More sharing options...
Gigglestick Posted August 30, 2005 Share Posted August 30, 2005 If you're using an INI file, use INI functions. Why are you using FileReadLine? IniRead("filename", "section", "key", "default") ...as in... $commands = IniRead("ini.ini", "Commands", "Commands", "#ERROR") If $commands = "#ERROR" Then ...do something... EndIf GUICtrlSetData($edit, StringReplace($commands, ";", @CRLF)) The question is: is your INI file a true INI file or just a plaintext file with a list of commands? If it's the latter, is the entire file what you want in the edit box? If so: $filename = "ini.ini" GUICtrlSetData($edit, FileRead($filename, FileGetSize($filename))) My UDFs: ExitCodes Link to comment Share on other sites More sharing options...
Gigglestick Posted August 30, 2005 Share Posted August 30, 2005 You can check with If UBound($array) > 1 AND NOT $array[1] = "" ThenWhy not:$cmds = StringSplit($commands, ";") If @error Then ...error-checking code... EndIf My UDFs: ExitCodes Link to comment Share on other sites More sharing options...
Raindancer Posted August 30, 2005 Share Posted August 30, 2005 Why not:$cmds = StringSplit($commands, ";") If @error Then ...error-checking code... EndIf<{POST_SNAPBACK}>Yeah... Why not... Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer 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