Regency Posted May 30, 2008 Posted May 30, 2008 I want to have it so i get a ibjects inner test (i have that par working) but i want it to be able to subtract. like.. The out put from the consolewrite is like this "$1,000,000" in money form. I want to be able to compare it.. But i need to make it so it subtracts and compares it.. Any possible way? Like i want it to have $oDiv3 = _IEGetObjById($oLoginPage, "ctl00_MainPageContent_lblBusinessBank") ConsoleWrite(_IEPropertyGet($oDiv3, "innertext") & @CR) $variable3 = _IEPropertyGet($oDiv3, "innertext") If $variable3 > "$16,400,000" Then After the THEN i want it to make it so it takes the money away so it = the amount i specifid... any way?
PsaltyDS Posted May 30, 2008 Posted May 30, 2008 I want to have it so i get a ibjects inner test (i have that par working) but i want it to be able to subtract. like.. The out put from the consolewrite is like this "$1,000,000" in money form. I want to be able to compare it.. But i need to make it so it subtracts and compares it.. Any possible way? Like i want it to have $oDiv3 = _IEGetObjById($oLoginPage, "ctl00_MainPageContent_lblBusinessBank") ConsoleWrite(_IEPropertyGet($oDiv3, "innertext") & @CR) $variable3 = _IEPropertyGet($oDiv3, "innertext") If $variable3 > "$16,400,000" Then After the THEN i want it to make it so it takes the money away so it = the amount i specifid... any way? Strings with dollar/euro signs and any punctuation other than a decimal point will not work for numeric comparisons, so remove that formatting: Global $variable1 = "$16,400,000.38" ; $variable3 = _IEPropertyGet($oDiv3, "innertext") Global $variable3 = "$15,500,001" ; Remove anything other than numbers or decimal point $variable1 = StringRegExpReplace($variable1, "[^\d\.]", "") $variable3 = StringRegExpReplace($variable3, "[^\d\.]", "") If $variable3 > $variable1 Then MsgBox(64, "More", $variable3 & " is more than " & $variable1) Else MsgBox(64, "Less", $variable3 & " is less than or equal to " & $variable1) EndIf Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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