confucion Posted December 25, 2006 Posted December 25, 2006 Read that this method doesn't work any more and strings need to be concactenated, what's the best way to convert this old code? CODEGUICtrlSetData(-1,"_ Option A| _ -------------------------------------------|_ Option B| _ -------------------------------------------|_ Option C| _ ") Change it to: CODE$newformat = "Option A| _" $newformat = $newformat & "-------------------------------------------|_" $newformat = $newformat & "Option B| _" $newformat = $newformat & "-------------------------------------------|_" $newformat = $newformat & "Option C| _" GUICtrlSetData(-1, $newformat) Or is there another way I don't know of?
Thatsgreat2345 Posted December 25, 2006 Posted December 25, 2006 (edited) ur first way works u just need to put quotes around each line but not around the _ and dont forget the & sign & _ Edited December 25, 2006 by Thatsgreat2345
MHz Posted December 25, 2006 Posted December 25, 2006 $string = 'string' & _ 'string' & _ 'string' & _ 'string' MsgBox(0, '', $string) Perhaps the easiest method as Thatsgreat2345 suggests.
confucion Posted December 25, 2006 Author Posted December 25, 2006 Thatsgreat2345, You said my old code works, just need to reformat it differently. So would it look like this? CODE'GUICtrlSetData(-1,"' & _ 'Option A|' & _ '-------------------------------------------|' & _ 'Option B|' & _ '-------------------------------------------|' & _ 'Option C|' & _ '")'
confucion Posted December 25, 2006 Author Posted December 25, 2006 Also, I read there is a 4000 byte limit, what if I need more? Tks
Thatsgreat2345 Posted December 25, 2006 Posted December 25, 2006 (edited) no no ' and " are interchangeable and dont put quotes around the ) it closes the statement and you dont put it around the function thats calling it a string of data which it isnt and what is your plan on achieving a 4000 byte limit? GUICtrlSetData(-1,_ 'Option A|' & _ '-------------------------------------------|' & _ 'Option B|' & _ '-------------------------------------------|' & _ 'Option C|') Edited December 25, 2006 by Thatsgreat2345
confucion Posted December 25, 2006 Author Posted December 25, 2006 ah, got it. Tks. As for the 4K limit, I'm already using 2000 bytes already since I have a combo menu with long option names and many options. Is there anyway around this in case I ever pass this limit? I don't think I will pass the limit but knowing that there is a solution IN CASE I ever do would be nice
Thatsgreat2345 Posted December 25, 2006 Posted December 25, 2006 I was un-aware of this 4000 byte limit care to point me in the direction of where you got your information.
confucion Posted December 25, 2006 Author Posted December 25, 2006 I was un-aware of this 4000 byte limit care to point me in the direction of where you got your information.Think I misread one of the old posts, nevermind, don't think there is this limit.
Zedna Posted December 25, 2006 Posted December 25, 2006 There is limit 4096 controls in AutoIt GUI. It's related also to ListView items created by GUICtrlCreateListViewItem() because this function creates control (with it's control ID). Resources UDF ResourcesEx UDF AutoIt Forum Search
Moderators SmOke_N Posted December 25, 2006 Moderators Posted December 25, 2006 There is limit 4096 controls in AutoIt GUI. It's related also to ListView items created by GUICtrlCreateListViewItem() because this function creates control (with it's control ID).And a 4095 Char limit on lines.RemarksMaximum string length is 2147483647 characters (but keep in mind that no line in an AutoIt script can exceed 4095 characters.)a string will be converted to a binaryString when concatenating a Chr(0) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
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