Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/11/2019 in all areas

  1. ripdad

    Live FFT Visual Spectrum

    I ran across a topic while researching the BASS UDF... https://www.autoitscript.com/forum/topic/155845-carpenter-needs-help-performing-serious-surgery-on-audiometer2/ and then remembered another topic... https://www.autoitscript.com/forum/topic/121624-sound-level-sampling/ which got me to thinking as to how I could get the first topic to go LIVE without the need of loading an mp3. This will accept any LIVE AUDIO INPUT. Be sure to read this post if you have trouble with it... https://www.autoitscript.com/forum/topic/121624-sound-level-sampling/?do=findComment&comment=1400178 Also, read the comments I made in the script, so you will know how it will react to LIVE INPUT streams. Live FFT Visual Spectrum.zip LIVE Multiband FFT Visual Spectrum.au3
    1 point
  2. Hello again everyone, I am trying to make a simple bot/AI to help me at work. I need it to read the subject line of emails, open them if a certain subject line is found, and then copy the contents of the said email and paste it in a different program. Can the Autoit outlook UDF help me achieve this? Also, I have tried the Outlook UDF and so far I have only figured out how to find all the unread emails (thanks to one of water's example scripts. @water you are a genius just saying). I am very new to this UDF and would love any help that would guide me into making this bot/AI a reality at work.
    1 point
  3. You could probably perform some tasks using IE UDF. There is also a INetSmtpMailCom that Jos wrote awhile ago that you may be use...
    1 point
  4. The index of an array starts with 0, the row in Excel start with 1. So you need to to add 1 to get the row in Excel. What you do is to process the content of the array where you need to process the index of the array: Func Hotkey2() Local $aUsedRange = _Excel_RangeRead($oWorkbook, 1) _ArrayDisplay($aUsedRange) For $iRow = UBound($aUsedRange) - 1 to 3 Step -1 If $aUsedRange[$iRow][13] = 0 Then _Excel_RangeDelete($oWorkbook.Worksheets(1), $iRow+1 & ":" & $iRow+1, Default, 1) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeDelete Example 2", "Error deleting rows." & @CRLF & "@error = " & @error & ", @extended = " & @extended) EndIf Next EndFunc
    1 point
  5. water

    Trying to open Excel file.

    Your path is wrong Local $sFilePath = @ScriptDir & "trans.xlsx" should be Local $sFilePath = @ScriptDir & "\trans.xlsx"
    1 point
  6. Jos

    AutoIT Editor Dark Theme

    I'll match your file with the current beta to see the differences. Thanks Jos
    1 point
  7. The newest SciTE comes with a dark theme, cool !, now switching back to light(standard) theme, there are leftovers from the dark theme, so, i merged those two and recreate them to not leave leftovers from the prior (Light/Dark). Did not do it for all the themes, just those two default standard themes. ...I've got to this back and forth due to Switching to and from "High contrast" windows themes, so I wanted to do the same flawlessly in SciTE, hence the above code. Do your own copy and paste, or to a new file, just in case you wanna keep the original install, original. WARNING: These themes are gravely flawed ( as discussed farther down ). Side effect include messing up any other extension type coloring due to inclusions of global parameters, out of place in a user only configuration file !!!. It will be better to check out the betas that are available.
    1 point
  8. Melba23

    Check for Right Click?

    UritOR Welcome to the AutoIt forums. In future please do not resurrect threads from this far back - the language has changed so much that it is likely that the functionality has already been incorporated and the previously posted code will almost certainly not run in the current version of AutoIt without modification. And does this help? #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> $hGUI = GUICreate("Test", 500, 500) $cButton = GUICtrlCreateButton("Test", 10, 10, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cButton MsgBox($MB_SYSTEMMODAL, "Pressed", "LEFT") Case $GUI_EVENT_SECONDARYUP $aCInfo = GUIGetCursorInfo($hGUI) If $aCInfo[4] = $cButton Then MsgBox($MB_SYSTEMMODAL, "Pressed", "RIGHT") EndIf EndSwitch WEndM23
    1 point
  9. Hawk, Here is an amended script which solves your BS_DEFPUSHBUTTON problem and also addresses Yashied's comment about requiring focus on the ListView: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <GUIListView.au3> #include <WinAPI.au3> Global $hListView, $hDummy Example_UDF_Created() Func Example_UDF_Created() Local $GUI, $sHeader = "Full header of any width at all" $GUI = GUICreate("Test", 400, 300) $hListView = _GUICtrlListView_Create($GUI, "", 10, 10, 200, 200) ConsoleWrite($hListView & @CRLF) _GUICtrlListView_AddColumn($hListView, $sHeader) _GUICtrlListView_AddColumn($hListView, "") ; Add items _GUICtrlListView_AddItem($hListView, "Item 1") _GUICtrlListView_AddItem($hListView, "Item 2") _GUICtrlListView_AddItem($hListView, "Item 3") _GUICtrlListView_SetColumnWidth($hListView, 0, $LVSCW_AUTOSIZE_USEHEADER) _GUICtrlListView_SetColumnWidth($hListView, 1, 0) $hDummy = GUICtrlCreateDummy() Local $hButton = GUICtrlCreateButton("Test", 10, 260, 80, 30, $BS_DEFPUSHBUTTON) ; <<<<<<<<<<<<<<<<<<<<<<<<<< GUISetState() GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton If _WinAPI_GetFocus() = $hListView Then ; <<<<<<<<<<<<<<<<<<<<<<<<<< ; Move to next section ContinueCase ; <<<<<<<<<<<<<<<<<<<<<<<<<< Else ; Action the DEFPUSHBUTTON MsgBox(0, "Aha", "Button pressed") ; <<<<<<<<<<<<<<<<<<<<<<<<<< EndIf Case $hDummy ; We get here if the handler fired the control or if the ListView had focus when enter was pressed $iIndex = _GUICtrlListView_GetSelectedIndices($hListView) $sText = "Selected in ListView : " & _GUICtrlListView_GetItemText($hListView, $iIndex) MsgBox(0, "Hi", $sText) ; Reset focus away from listview GUICtrlSetState($hButton, $GUI_FOCUS) EndSwitch WEnd GUIDelete() EndFunc ;==>Example_UDF_Created Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg, $iwParam $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hListView Switch $iCode Case $NM_DBLCLK $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) ; Fire dummy control GUICtrlSendToDummy($hDummy) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFYPlease ask if you have any questions. M23
    1 point
×
×
  • Create New...