Majedz Posted February 14, 2021 Share Posted February 14, 2021 hi, any short version for to chثck if $L0 or $L1 is min: If $L0=$L0 and $L0<$L1 and $L0<$L2 and $L0<$L3 and $L0<$L4 and $L0<$L5 and $L0<$L6 and $L0<$L7 and $L0<$L8 and $L0<$L9 and $L0<$L10 Then MsgBox("", "L0 is min",$L0,5) If $L1<$L0 and $L1=$L1 and $L1<$L2 and $L1<$L3 and $L1<$L4 and $L1<$L5 and $L1<$L6 and $L1<$L7 and $L1<$L8 and $L1<$L9 and $L1<$L10 Then MsgBox("", "L1 is min",$L1,5) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 14, 2021 Moderators Share Posted February 14, 2021 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team 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...
Majedz Posted February 14, 2021 Author Share Posted February 14, 2021 Sorry Melba23 it was my mistake Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 14, 2021 Moderators Share Posted February 14, 2021 Majedz, No problem. Welcome to the AutoIt forums. As a possible solution, put all the values into an array and use _ArrayMin to determine the lowest. 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...
Majedz Posted February 14, 2021 Author Share Posted February 14, 2021 my problem Melba23 is I don’t know how to put my variables (values) into an array ; it works without using array, but very long (bad code), First step in my work (is done, no problems) I am reading 11 low and high values, from specified location of screen, by moving the mouse on a graph and reading High/Low data (using PixelChecksum function OCR /Copied and modified from an old post in this forum, and working well) the result is reading Low/ high values : $L0,$L1,$L2, ,$L3……,$L10 and SH0,$H1, $H2, ,$H3,…… ,$H10 Second step: is manipulating low/high data to get for example the min of the 11 Lows or max of highs….etc I go through help files regarding arrays but I am missing something, how to contract the 11 lows, 11 highs and Low variables array, any help is highly appreciated Link to comment Share on other sites More sharing options...
Musashi Posted February 14, 2021 Share Posted February 14, 2021 (edited) 32 minutes ago, Majedz said: I go through help files regarding arrays but I am missing something, how to contract the 11 lows, 11 highs and Low variables array, any help is highly appreciated #include <Array.au3> ; Testdata : Local $L0=3120, $L1=2120, $L2=131, $L3=923, $L4=8120, $L5=520, $L6=5120, $L7=6120, $L8=3120, $L9=4120, $L10=5120 Local $aLowValues[11] = [$L0,$L1,$L2,$L3,$L4,$L5,$L6,$L7,$L8,$L9,$L10] _ArrayDisplay($aLowValues) ; *** just for display MsgBox(0, "", "minimum Value = " & _ArrayMin($aLowValues,0) & @CRLF & "minimum Index = " & _ArrayMinIndex($aLowValues,0), 5) _ArraySort($aLowValues, 0) _ArrayDisplay($aLowValues) ; *** just for display Edited February 14, 2021 by Musashi Majedz 1 "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Majedz Posted February 15, 2021 Author Share Posted February 15, 2021 Thanks Musashi solved 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