robinsiebler Posted August 29, 2006 Share Posted August 29, 2006 I have a string that is 28 chars long: Extract to "C:\Obj00074.txt". If I specify$saveFile = StringMid($buttonText, 13, (StringLen($buttonText) - 2)) the text that is returned is C:\Obj00074.txt". However, if I use '15' for the 3rd paratemeter, I getC:\Obj00074.txt. (StringLen($buttonText)- 2) should equal 15. Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 29, 2006 Share Posted August 29, 2006 HI, you have to post your script, otherwise it will be hard to test it. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Developers Jos Posted August 29, 2006 Developers Share Posted August 29, 2006 I have a string that is 28 chars long: Extract to "C:\Obj00074.txt". If I specify(StringLen($buttonText)- 2) should equal 15.My vote goes to 28-2=26Why do you say it should be 15 ? 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...
Moderators SmOke_N Posted August 29, 2006 Moderators Share Posted August 29, 2006 (edited) The example your giving doesn't make any sense really. 1. Your starting from the 13th Char. 2. Your using the "Entire StringLen - 2", but you already moved forward 13? So your output would always be the rest of the string from the 13 char. Where you trying to do this? $String = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz' MsgBox(0, 'info', StringMid($String, 13, (StringLen($String) - 13) - 2))Note how the example leaves off the "yz" in the string return. Edited August 29, 2006 by SmOke_N 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. 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