Mechaflash Posted June 4, 2012 Share Posted June 4, 2012 Is there a way? Such as: Do _Func Until 'Expression' For $file in $asFiles _Func Next etc. Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 4, 2012 Moderators Share Posted June 4, 2012 mechaflash213, No. Why? M23 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...
Mechaflash Posted June 4, 2012 Author Share Posted June 4, 2012 Building a bit of a large application... wanting to clean up the look of the director code a bit so instead of having 3 lines I'd have 1 line for a loop calling a function. It's like how PHP uses the ; character to specify EOL for a command, I was hoping something that could be used for that kind of functionality. Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” Link to comment Share on other sites More sharing options...
SlowCoder74 Posted June 4, 2012 Share Posted June 4, 2012 Building a bit of a large application... wanting to clean up the look of the director code a bit so instead of having 3 lines I'd have 1 line for a loop calling a function.It's like how PHP uses the ; character to specify EOL for a command, I was hoping something that could be used for that kind of functionality.I agree that would be useful. I don't think AutoIT is capable of handling more than 1 statement/command on a single line. Link to comment Share on other sites More sharing options...
BrewManNH Posted June 4, 2012 Share Posted June 4, 2012 AutoIt can not handle more than one statement per line, because there's no line/statement end indicator it's harder to tell where you want the statement to end. Besides, troubleshooting code all written on one line would be a major pain in the butt. Melba23 1 If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Skitty Posted June 4, 2012 Share Posted June 4, 2012 Building a bit of a large application... wanting to clean up the look of the director code a bit so instead of having 3 lines I'd have 1 line for a loop calling a function.It's like how PHP uses the ; character to specify EOL for a command, I was hoping something that could be used for that kind of functionality.I tried mentioning that somewhere, but I was too high and I don't think anyone could understand what I was trying to say, but you hit the head on the nail there.It would be cool to be able to write scripts in PHP style, but what would really be the functionality for such a thing in autoit? Other than making things more complicated. Link to comment Share on other sites More sharing options...
JohnOne Posted June 4, 2012 Share Posted June 4, 2012 If I wanted to write scripts php style, I'd most likely use php. You simply cannot have everything under on roof. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ProgAndy Posted June 4, 2012 Share Posted June 4, 2012 (edited) Create your own preprocessor and replace a colon which is not part of a string with a linefeed. Now you have multiple statements per line. Edited June 4, 2012 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...
Mechaflash Posted June 4, 2012 Author Share Posted June 4, 2012 (edited) AutoIt can not handle more than one statement per line, because there's no line/statement end indicator it's harder to tell where you want the statement to end. Besides, troubleshooting code all written on one line would be a major pain in the butt.I can totally understand that. However, for my use, I'm wanting to perform a loop over a function, and I find using up 3 lines just to do this is a waste of vertical eye space 0.o. Since I'm 1/2 Korean and have slanted eyes... I see things better horizontally and not veritcally =( Edited June 4, 2012 by mechaflash213 Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 4, 2012 Moderators Share Posted June 4, 2012 mechaflash213,You could use the [+] in the left margin of SciTE to collapse the loop.#region/#endregion allow you to collapse still further - at the moment I have a 4500+ line script reduced to 17 lines using nested regions but easily expandable into larger sections when required. M23 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...
Mechaflash Posted June 4, 2012 Author Share Posted June 4, 2012 mechaflash213, You could use the [+] in the left margin of SciTE to collapse the loop. #region/#endregion allow you to collapse still further - at the moment I have a 4500+ line script reduced to 17 lines using nested regions but easily expandable into larger sections when required. M23 Hows about on printout? Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” Link to comment Share on other sites More sharing options...
Mechaflash Posted June 4, 2012 Author Share Posted June 4, 2012 Create your own preprocessor and replace a colon which is not part of a string with a linefeed. Now you have multiple statements per line.What should I start looking into to create the preprocessor? I haz no clue. Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 4, 2012 Moderators Share Posted June 4, 2012 What should I start looking into to create the preprocessor? I haz no clue.Did you do a forum search? A quick search of preprocess turned up a number of threads for me. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 4, 2012 Moderators Share Posted June 4, 2012 Hows about on printout?Where are your green credentials? I have not printed out any code for years now - and if your AutoIt code is so complex that you cannot follow it on-screen (with only the relevant parts expanded) then it might well benefit from being rewritten*. M23* Personal opinion, of course! 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...
Mechaflash Posted June 4, 2012 Author Share Posted June 4, 2012 Where are your green credentials? I have not printed out any code for years now - and if your AutoIt code is so complex that you cannot follow it on-screen (with only the relevant parts expanded) then it might well benefit from being rewritten*. M23* Personal opinion, of course! Hehe I never view code on printed paper... but someone who is old and is my boss does. She's an old programmer and she hates computers... that should tell you something =/ Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” Link to comment Share on other sites More sharing options...
czardas Posted June 4, 2012 Share Posted June 4, 2012 Ah, this is easy. _LoopMyFunc(5) ; Example of Do _MyFunc Until $iCount = 5 Func _LoopMyFunc($iLoops) $iCount = 0 Do _MyFunc($iCount) Until $iCount = $iLoops EndFunc Func _MyFunc(ByRef $iCount) $iCount += 1 EndFunc operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
guinness Posted June 4, 2012 Share Posted June 4, 2012 She's an old programmer and she hates computers... that should tell you something =/What did she program in to hate computers? UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
JohnOne Posted June 4, 2012 Share Posted June 4, 2012 Ah, this is easy. _LoopMyFunc(5) ; Example of Do _MyFunc Until $iCount = 5 Func _LoopMyFunc($iLoops) $iCount = 0 Do _MyFunc($iCount) Until $iCount = $iLoops EndFunc Func _MyFunc(ByRef $iCount) $iCount += 1 EndFunc lol _LoopMyFunc("_WhateverFunc", 6) Func _LoopMyFunc($sFunc, $iLoops) For $i = 1 To $iLoops Call($sFunc) Next EndFunc ;==>_LoopMyFunc AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
andre21 Posted June 5, 2012 Share Posted June 5, 2012 i can,t get you friends. Can you please tell me about what you are talking? let me try to put a shot on it. what do you say? reply me. Link to comment Share on other sites More sharing options...
Kidney Posted June 5, 2012 Share Posted June 5, 2012 i can,t get you friends. Can you please tell me about what you are talking? let me try to put a shot on it. what do you say? reply me.oh god...... 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