Harmonful Posted October 14, 2009 Share Posted October 14, 2009 Link to comment Share on other sites More sharing options...
FuryCell Posted October 14, 2009 Share Posted October 14, 2009 More detail? HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Mat Posted October 14, 2009 Share Posted October 14, 2009 $sFile = FileOpenDialog ("Open file...", @WorkingDir, "Autoit script (*.au3)|All files (*.*)") If @Error Then Exit $sData = FileRead ($sFile) $ans = _Addup ($sData) MsgBox (0, "Result", $ans) Func _AddUp ($sData) ; split up the lines $aData = StringRegExp ($sData, "([0-9]+)", 3) ; Start loop $ret = 0 For $i = 0 to UBound ($aData) - 1 $ret += $aData[$i] Next Return $ret EndFunc ; ==> _AddUp is what I think you want to do... AutoIt Project Listing Link to comment Share on other sites More sharing options...
Harmonful Posted October 14, 2009 Author Share Posted October 14, 2009 $sFile = FileOpenDialog ("Open file...", @WorkingDir, "Autoit script (*.au3)|All files (*.*)") If @Error Then Exit $sData = FileRead ($sFile) $ans = _Addup ($sData) MsgBox (0, "Result", $ans) Func _AddUp ($sData) ; split up the lines $aData = StringRegExp ($sData, "([0-9]+)", 3) ; Start loop $ret = 0 For $i = 0 to UBound ($aData) - 1 $ret += $aData[$i] Next Return $ret EndFunc ; ==> _AddUp is what I think you want to do... Thx It works Link to comment Share on other sites More sharing options...
Mat Posted October 14, 2009 Share Posted October 14, 2009 KK... but do you understand it? I am probably a bit too helpful at times (and very good at guessing!) And just because it works doesn't mean its the right way to do it either. Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
CodyBarrett Posted October 15, 2009 Share Posted October 15, 2009 yes there are a hundred different ways to implement code.. haha mat yes you are too helpful at times but who's complaining? [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Diablo2 Posted October 15, 2009 Share Posted October 15, 2009 (edited) Posted in the wrong topic lol Edited October 15, 2009 by Diablo2 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