icu Posted June 26, 2011 Share Posted June 26, 2011 Dear AutoIt Community, I was wondering if AutoIt has a Goal Seek function like what you get in Excel? Good old F1 doesn't shed any light on the matter. Many thanks, -icu Link to comment Share on other sites More sharing options...
water Posted June 26, 2011 Share Posted June 26, 2011 I don't think so. AutoIt has the math functions you can find in the help file. Some UDFs might extend the functionality. But it depends on what you want to do. You could either write the function you need with AutoIt or let Excel do the calculations. Can you describe in more detail what you want to do? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
icu Posted June 26, 2011 Author Share Posted June 26, 2011 @water: Thanks for your quick reply. Yeah if you have the underlying formula you can always use algebra to solve for the goal seek. I was just being lazy because I know the formula to solve for the goal seek. In this particular case I wanted to write a GUI for math noobs at work to work out the card charges embedded in the price we charge customers. For example, Let Amount without card charge = a Total amount = T Card Charge = c If T = 100 c = 0.025 And T = a x (1 + c ) Solve for a => a = T/(1 + c) So yeah something like: ; Maths Test $T = 100 $c = 0.025 $a = $T / (1 + $c) ConsoleWrite ($a) works fine. But it got me thinking, what if you don't have Excel and don't know the formula (i.e. a very complex equation that will do your head in). Here at work only the top top managers have work stations with Excel installed, the rest of us plebs are running Open Office and it'll be a pain to write all the code to open the Open Office Calc spreadsheet, run the goal seek, and scrape the result back into the GUI. Also my algebra is okay but not amazing... I'm no maths professor ;-) Thus I was hoping for a Goal Seek UDF... and if no one has done it, I was wondering how hard would it be to code for? Certainly the Micro$oft coders must have some code they run in Excel that can be duplicated for in AutoIt. Kind regards, -icu Link to comment Share on other sites More sharing options...
ProgAndy Posted June 26, 2011 Share Posted June 26, 2011 (edited) There are some linear equation solvers in AutoIt, but for other equations you will have to use some approximation method. Edit: Newton's method: Edited June 26, 2011 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes 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