Idea Posted September 19, 2005 Share Posted September 19, 2005 (edited) Thanks for all the help. It's working. Edited September 20, 2005 by Idea Link to comment Share on other sites More sharing options...
Developers Jos Posted September 19, 2005 Developers Share Posted September 19, 2005 Q1:You have 3 times $[] in stead of $c[] ...Q2: This $t = $c[1] & $c[2] & $c[3] & $c[4] creates a string becaue your concatenate the 4 values as strings.PS your example in Q2 gives an error because you dim $a[4] which means $a[0] - $a[3] 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...
Idea Posted September 19, 2005 Author Share Posted September 19, 2005 (edited) Q1:You have 3 times $[] in stead of $c[] ...It is still not working:If Number(IsNumber($c[1] + $c[2] + $c[3] + $c[4])) And _;2005 ($c[5] == "-") And _ ;- Number(IsNumber($c[6] + $c[7])) And _ ;09 ($c[8] == "-") And _ ;- Number(IsNumber($c[9] + $c[10])) And _ ;19 ($c[11] == "") And _ ; Number(IsNumber($c[12] + $c[13])) And _ ;08 ($c[14] == ":") And _ ;: Number(IsNumber($c[15] + $c[16])) And _ ;57 ($c[17] == ":") And _ ;: Number(IsNumber($c[18] + $c[19])) And _ ;43 ($c[20] == "") And _ ; ($c[21] == ":") And _ ;: ($c[22] == "") And _ ; StringIsUpper( $c[23] & $c[24] ) And _ ;IN ($c[25] == "`") And _ ;` Number(IsNumber($c[26] + $c[27] + $c[28] + _;1234567 $c[29] + $c[30] + $c[31] + $c[32] + _ $c[33])) And _ ($c[34] == "`") Then ;` MsgBox(0, "ok!", "ok") EndIfSame error as before. Q2: This $t = $c[1]& $c[2] & $c[3] & $c[4] creates a string becaue your concatenate the 4 values as strings.How do I concatenate as numbers then? Using + will add them literally 2 and 3 become 5 instead of 23 for example.Thank you. Edited September 19, 2005 by Idea Link to comment Share on other sites More sharing options...
seandisanti Posted September 19, 2005 Share Posted September 19, 2005 How do I concatenate as numbers then? Using + will add them literally 2 and 3 become 5 instead of 23 for example.Thank you.create your numeric string the way you already are, then explicitly typecast it as a number with the Number() function Link to comment Share on other sites More sharing options...
Idea Posted September 19, 2005 Author Share Posted September 19, 2005 (edited) create your numeric string the way you already are, then explicitly typecast it as a number with the Number() functionThank you. I wrongly assumed I didn't have to preform typecasting in AutoIt.I updated the code (see 2nd post) to include the typecasting and I get a new error now. Line 10 Error: "If" statements must have a "Then" keyword. Well the Then keyword is there so I do not see why it is incorrect. Thanks for your time. Edited September 19, 2005 by Idea Link to comment Share on other sites More sharing options...
seandisanti Posted September 19, 2005 Share Posted September 19, 2005 Thank you. I wrongly assumed I didn't have to preform typecasting in AutoIt.typically you don't since all variables are variants, but i believe that when you typecast a variable by concatenating it, or performing mathematical calculations on it, to use it any other way you have to re-cast it. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 19, 2005 Developers Share Posted September 19, 2005 (edited) Same error as before. Maybe you can explain what you want to do with Number(IsNumber()) logic , because I don't understand ?I do not get any AutoIt3 error when i runn this code... Edited September 19, 2005 by JdeB 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...
seandisanti Posted September 19, 2005 Share Posted September 19, 2005 Maybe you can explain what you want to do with Number(IsNumber()) logic , because I don't understand ?I do not get any AutoIt3 error when i runn this code...seems like it should be... IsNumber(Number()).... else it would just return a 0 right? Link to comment Share on other sites More sharing options...
Idea Posted September 19, 2005 Author Share Posted September 19, 2005 seems like it should be... IsNumber(Number()).... else it would just return a 0 right?Er, yeah. The error I'm getting is the If has no matching Then statement. I'm not useing the beta so maybe it somehow works on the beta? :\ Link to comment Share on other sites More sharing options...
Developers Jos Posted September 19, 2005 Developers Share Posted September 19, 2005 (edited) Er, yeah. The error I'm getting is the If has no matching Then statement. I'm not useing the beta so maybe it somehow works on the beta? :\ 3.1.1.0 doesn't support comments on continuation lines...... Edited September 19, 2005 by JdeB 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...
jefhal Posted September 19, 2005 Share Posted September 19, 2005 How do I concatenate as numbers then?How about:$a = 2 $b = 3 $c = string($a) & string($b) $d = int($c) MsgBox(1,"",$c & " " & $d) ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
Idea Posted September 20, 2005 Author Share Posted September 20, 2005 3.1.1.0 doesn't support comments on continuation lines......Well that would be why! Does the beta support this feature? Link to comment Share on other sites More sharing options...
Developers Jos Posted September 20, 2005 Developers Share Posted September 20, 2005 Well that would be why! Does the beta support this feature? yeap... 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...
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