Emiel Wieldraaijer Posted December 21, 2007 Share Posted December 21, 2007 (edited) when i use this text in a messagebox "/hs will run program in hidden mode and shutdown the computer when finished" it's displayed in Windows XP correctly but in vista it's not, in vista the line is seperated into two lines ""/hs will run program in hidden mode and shutdown the computer" and the next line "when finished" The code i use Func _CMD_Help () MsgBox(0, "Commandline", "Program <parameter>" & @LF & _ @LF & _ "/h Program will be run in hidden mode" & @LF & _ "/hs will run program in hidden mode and shutdown the computer when finished" & @LF & _ "/debug program will run in debug mode" & @LF & _ "/reset program will be reset to default settings") Exit EndFunc are there limitations to the lenght or is this a bug, according to the help message box appears centered on screen and resizes according to the text it contains. However, the title could get truncated if the SYSTEMMODAL flag (4096) is used.. Thnx Emiel Edited December 21, 2007 by Emiel Wieldraaijer Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
martin Posted December 21, 2007 Share Posted December 21, 2007 (edited) when i use this text in a messagebox "/hs will run program in hidden mode and shutdown the computer when finished" it's displayed in Windows XP correctly but in vista it's not, in vista the line is seperated into two lines ""/hs will run program in hidden mode and shutdown the computer" and the next line "when finished" The code i use Func _CMD_Help () MsgBox(0, "Commandline", "Program <parameter>" & @LF & _ @LF & _ "/h Program will be run in hidden mode" & @LF & _ "/hs will run program in hidden mode and shutdown the computer when finished" & @LF & _ "/debug program will run in debug mode" & @LF & _ "/reset program will be reset to default settings") Exit EndFunc are there limitations to the lenght or is this a bug, according to the help Thnx Emiel As you say, it works ok on XP. I haven't tried it on Vista but it sounds as though you need to use @LFCR or @CR instead of @LF. Try experimenting. Edited December 21, 2007 by martin 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...
Emiel Wieldraaijer Posted December 22, 2007 Author Share Posted December 22, 2007 Hi Martin, Changing it to @CRLF and @CR has no postive effect Message box displayed correct in Windows XP and in Vista not i think it must be a bug Emiel Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Developers Jos Posted December 22, 2007 Developers Share Posted December 22, 2007 (edited) Hi Martin, Changing it to @CRLF and @CR has no postive effect Message box displayed correct in Windows XP and in Vista not i think it must be a bug EmielAutoit3 is using standard windows calls. Try this version to see if it still goes wrong : _CMD_Help() Func _CMD_Help() _MsgBox(0, "Commandline", "Program <parameter>" & @LF & _ @LF & _ "/h Program will be run in hidden mode" & @LF & _ "/hs will run program in hidden mode and shutdown the computer when finished" & @LF & _ "/debug program will run in debug mode" & @LF & _ "/reset program will be reset to default settings") Exit EndFunc ;==>_CMD_Help Func _MsgBox($type,$title,$text) DllCall("user32.dll","int","MessageBoxA","Hwnd",0,"str",$text,"str",$title,"int",$Type) EndFunc Edited December 22, 2007 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted December 22, 2007 Author Share Posted December 22, 2007 (edited) Hi Jos, no the problem still exists .. i've added two images to show you the difference between XP and Vista Emiel Edited December 22, 2007 by Emiel Wieldraaijer Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Developers Jos Posted December 22, 2007 Developers Share Posted December 22, 2007 Hi Jos,no the problem still exists .. i've added an image to show you the result EmielIt just proves its either something with your setup or with Vista itself and doesn't have anything to do with AutoIt3. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted December 22, 2007 Author Share Posted December 22, 2007 I'll check a real vista computer, because this one is done in a virtual machine.. i'll report back Emiel Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted December 22, 2007 Author Share Posted December 22, 2007 (edited) I've tested it on 4 vista machines- Vista Home Premium Dutch - Vista Business Dutch- Vista Business English - Vista Ultimate Englishand all the same problem .. so i believe message box appears centered on screen and resizes according to the text it contains. However, the title could get truncated if the SYSTEMMODAL flag (4096) is used..isn't correct for Vista operating systems or it's a bugEmiel Edited December 22, 2007 by Emiel Wieldraaijer Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Richard Robertson Posted December 23, 2007 Share Posted December 23, 2007 It could be a Vista bug. It wouldn't be the first. If you can, report it to Microsoft. Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted December 23, 2007 Author Share Posted December 23, 2007 I would be nice if someone else could reproduce this error with another programming language (i only know autoit a bit) Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Developers Jos Posted December 23, 2007 Developers Share Posted December 23, 2007 The only issue you see is that it is autowrapped in Vista where XP doesnt do that with your example ..right ? In WinXP it will also autowrap when the text gets long enough: msgbox(0,"test","this is a very long line and that is also autowrapped by the standard MessageboxA in windows xp for me.'this is a very long line and that is also autowrapped by the standard MessageboxA in windows xp for me. this is a very long line and that is also autowrapped by the standard MessageboxA in windows xp for me.") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted December 23, 2007 Author Share Posted December 23, 2007 Hi Jos, yes you are correct... when the lines becomes large enough the problem also exists in Windows XP So it isn't a bug thnx Emiel Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Developers Jos Posted December 23, 2007 Developers Share Posted December 23, 2007 If you want to force it to display as you want it the only solution is to create your own MsgBox func and have that create a GUI that looks as you want it. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted December 23, 2007 Author Share Posted December 23, 2007 yeah to bad.. Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
GEOSoft Posted December 23, 2007 Share Posted December 23, 2007 yeah to bad.. You could also write the MsgBox() so it looks right in Vista. Then it should look about the same in XP. I think this is probably a change in the way MS has designed the dialog in Vista. They have so much happening in Vista that they may have decided to make the maximum width for dialogs smaller. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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