Phaethon Posted September 14, 2007 Share Posted September 14, 2007 Hey everyone, it is me again. I need a little bit of help. If I have a variable coming back like this: $MyVar = 2+2 How do I solve the math inside the variable thus changing the variable to the sum (in this case, $MyVar = 4) so that I can use it elsewhere. Help is very appreciated as usual Coder's Helper >> Here[center][/center] Link to comment Share on other sites More sharing options...
goldenix Posted September 14, 2007 Share Posted September 14, 2007 $MyVar = 2+2 How do I solve the math inside the variable thus changing the variable to the sum (in this case, $MyVar = 4) so that I can use it elsewhere. I think you are looking for this: $a = '1' $b = '2' $MyVar = $a+$b MsgBox(0,"",$MyVar) My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
Phaethon Posted September 14, 2007 Author Share Posted September 14, 2007 I don't think you understand. I'm getting a value off of my GUI that is LITERALLY 2+2, and it is put into a variable. I need for the variable to be "solved". Coder's Helper >> Here[center][/center] Link to comment Share on other sites More sharing options...
weaponx Posted September 14, 2007 Share Posted September 14, 2007 $string = "2+2+2+2+4" $result = Execute($string) Link to comment Share on other sites More sharing options...
Phaethon Posted September 14, 2007 Author Share Posted September 14, 2007 Thanks man! Coder's Helper >> Here[center][/center] 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