trinitrotoluen Posted April 14, 2009 Share Posted April 14, 2009 How can creat function with endless vars like StringFormat ( "format control", var1 [, ... var32] ) Link to comment Share on other sites More sharing options...
Marlo Posted April 14, 2009 Share Posted April 14, 2009 Create a function with 32 optional parameters? Click here for the best AutoIt help possible.Currently Working on: Autoit RAT Link to comment Share on other sites More sharing options...
AlmarM Posted April 14, 2009 Share Posted April 14, 2009 You could use stringsplit. #include <Array.au3> $Test = Test("Test1|Test 2|Test,3|Testiiiiiiiiiiiing|TEST") _ArrayDisplay($Test) Func Test($MyVar) Return StringSplit($MyVar, "|") EndFunc AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 14, 2009 Moderators Share Posted April 14, 2009 (edited) trinitrotoluen, Use an array as the parameter. M23 Edit: A quick search produced this which agrees with my suggestion. Edited April 14, 2009 by Melba23  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area  Link to comment Share on other sites More sharing options...
Richard Robertson Posted April 14, 2009 Share Posted April 14, 2009 Using an array is always better than variable arguments. Link to comment Share on other sites More sharing options...
ProgAndy Posted April 14, 2009 Share Posted April 14, 2009 (edited) If you really need function with parameters and not an Array, you can use this to create them: http://www.autoitscript.com/forum/index.ph...st&p=619415 Edited April 14, 2009 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...
trinitrotoluen Posted April 15, 2009 Author Share Posted April 15, 2009 Thank you ! 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